Questions from Beginners MQL5 MT5 MetaTrader 5 - page 521

 
Alexey Viktorov:

Well I guess the moderators have free storage or you have ... whatever the reason...

...

Citizens, you should first go toMQL5 Storage: Storage Connection - MetaEditor- to find out that the Storage is FREE!
 
Karputov Vladimir:
Citizens, you should first go through the linkMQL5 Storage: Connecting the Storage - MetaEditor- to find out that the Storage is FREE!
Oh Vladimir, thank you. I wouldn't know it's free for everyone, but I have no desire to use it anyway...
 
Hello! Could you please tell me how to correctly write this condition in MQL4: "If the difference between the values of two variables is more than 15 points then...".
 
toni_stark:
Hello, could you please tell me how to correctly write this condition in MQL4: "If the difference between the values of two variables is more than 15 points, then...".

if (value1 - value2 > 15)

 
toni_stark:
Hello! Could you please tell me how to correctly write this condition in MQL4: "If the difference between the values of two variables is more than 15 points then...".
if ((v1 - v2) > (15.0 * Point())) 
 {
   ...
 }
 
Yury Reshetov:
I have not stated the idea accurately. If v1-v2= -0.0015 (v1 and v2 are price values, which can be greater or less than each other), then the condition is not met because -0.0015 <(15.0 * Point)? And also(15.0 * Point) needs to be replaced by an external variable, so that this value can be changed in the settings.
 
toni_stark:
I have not stated the point accurately. If v1-v2= -0.0015 (v1 and v2 are price values, which can be greater or less than each other), then the condition is not satisfied because -0.0015 <(15.0 * Point)? And also(15.0 * Point) needs to be replaced by an external variable, so that this value can be changed in the settings.

Then:

input double v3 = 15.0;

...

if (MathAbs(v1 - v2) > (v3 * Point())) 
 {
   ...
 }
 
Yury Reshetov:

Then:

Thank you! Very helpful!
 
Can you please tell me the code: EA opens one order per day, how to close these orders at the end of the day, e.g. 23:50?
 
Yury Reshetov:

Then:

(v3 * Point())
Зачем скобки? Что за трюк?
Reason: