MauzerVII: Can you tell me how to set the format of accuracy (number of digits after the decimal point) in the script when outputting the alert to 7 digits?
Can you tell me how should the code look like with the following conditions: if the colour of the indicator changes from red to blue, put a pending order buystop, if on the contrary, the colour of the indicator changed from blue to red, then sellstop?
The indicator draws buffers. The blue line is one buffer and the red line is another one. Check the buffer values: if red buffer on the second bar has a non-empty value, and on the first bar an empty and at the same time blue buffer on the second bar has a non-empty value and on the first bar a non-empty value ---- we have a colour change on the first bar from red to blue.
Guys, does anyone have a function to determine how much time (seconds) has elapsed since the start of the day ?
It should work:
Thank you very much.
????
What's not to understand?
The value of this expression is the number of seconds since the start of the day!
Can you tell me how to set the format of accuracy (number of digits after the decimal point) in the script when outputting the alert to 7 digits?
Alert(DoubleToStr(N,7));
Alert(DoubleToStr(N,7));
Thank you, it works.
What's unclear?
The value of this expression is the number of seconds since the beginning of the day!
TimeCurrent() % 86400 - I haven't seen this anywhere.... % - ???
I don't understand this expression. can you give me an example?
TimeCurrent() % 86400 - I haven't seen this anywhere.... % - ???
I don't understand this expression. give me an example?
Can you tell me how should the code look like with the following conditions: if the colour of the indicator changes from red to blue, put a pending order buystop, if on the contrary, the colour of the indicator changed from blue to red, then sellstop?
if
red buffer on the second bar has a non-empty value, and on the first bar an empty
and at the same time
blue buffer on the second bar has a non-empty value and on the first bar a non-empty value ---- we have a colour change on the first bar from red to blue.
h ttps://docs.mql4.com/ru/basis/operations/math
It's original, but it should work too))) Residual from dividing all twenty-four hours since 1970 by the number of seconds in a day)))