[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 461

 
gvi2504 писал(а) >>

When I was looking for an error every action was overAlagged, and it turns out TP passes when modifying, but SL is not too close.

it seems there is no error - too close, there is a wrong stop. Maybe this wrong stop was caused by something else? Expert Advisor's wrong logic, error, or something else? Just in case, check in the Market Watch in the symbol properties if there is a difference between the stops

 
Techno >>:

кажется нету ошибки - слишком близко, есть неправильный стоп. Может этот неправельный стоп вызван чем то еще? Неправильная логика эксперта, ошибка, или еще что? На всякий пожарный посмотри в обзоре рынка в свойствах инструмента есть ли различия между стопами

Added a triple point to the minimum, the problem seems to have gone away. Thank you.

 

There is a need to draw/modify a graphical object (one single object) in one window

and have it automatically rendered/updated in another window of the same currency. As far as I understand, this can be

achieve only by saving the coordinates to a file in one window and reading them from the file in another window.

- Will this work?

- Are there any other options?

- What would the update rate depend on and would it be possible to use it when the internet is disconnected?


PS Now I'm thinking - maybe it would be better to put the coordinates of the object into global variables?

 
chief2000 писал(а) >>

There is a need to draw/modify a graphical object (one single object) in one window

and have it automatically rendered/updated in another window of the same currency. As far as I understand, this can be

achieve only by saving the coordinates to a file in one window and reading them from the file in another window.

- Will this work?

- Are there any other options?

- What would the update rate depend on and would it be possible to use it when the internet is disconnected?

PS Just a thought, maybe it would be better to store object coordinates in global variables?

In MQL4 it is possible to save data to a file? I have not heard about it...

If you need to store a couple of variables between windows - I use global variables.

 
Axmed >>:

В MQL4 можно осуществить сохранение данных в файл??.. Не слышал о таком...

Если требуется предеать пару-тройку переменных между окнами - использую глобальные переменные.

Saving is possible (FileOpen, FileWrite), the rest I haven't checked yet.

 
chief2000 писал(а) >>

Saving is possible (FileOpen, FileWrite), the rest I haven't checked yet.

Indeed... The list of functions has a good toolkit for working with .dat files... Thanks for the insight!

At the same time, I'll ask my question to the pros =)

I have a problem, when using external procedure (dll) while working with Expert Advisor.

I've been experimenting with dll for a couple of days now, until now all imported functions ran smoothly...

The problem occurred with the procedure, which performs processing of dynamic arrays. When I connect the Expert Advisor to the chart, the critical error window pops up


At the same time, the procedure works normally with small parameter values (including those affecting the size of the dynamic arrays).

May be memory overflow...? Has anyone encountered something like this?

 

I have this problem: when writing an Expert Advisor, there was a line

iLots = NormalizeDouble(FindLastLot() * ExpStep, Digits);

and it returns 0.26 - but the Expert Advisor starts on a place where MODE_LOTSTEP = 0.1, which means the lot should be either 0.2 or 0.3, and of course the error of wrong volume appears, how to make it so to say the function MathRound - the function turns out only for integers - what should I do?

 
T-G писал(а) >>

I have this problem: when writing an Expert Advisor, there was a line

it returned 0.26 - but the Expert Advisor started on a place where MODE_LOTSTEP = 0.1, which means the lot should be either 0.2 or 0.3, and of course an error of wrong volume was displayed - how to make it work with MathRound - the function is designed for integers only - what should I do?

and if a fractional number to make an integer by multiplying by a power of 10, then rounding, and then dividing by the same power?

 
Can you tell me how to write an if condition in the code that will only be checked in the last 10 minutes of each hour? for example: from 12:50 to 13:00, 13:50 to 14:00, etc.
 
Techno >>:

а если из дробного числа сделать целое путем умножения на степень 10, потом округления, а потом уже деления на эту же степень?

Well if so, then everything works )) thank you

Reason: