Wrote a system, it uses let's say 2 price levels (b8 and s8) to open positions which I save in variables like fractional, and in case the terminal restarts it loses these values I set Alert.
if((в рынке ордеров>0 && (b8==0||s8==0))==false)
{
}
else Alert("Error");
Zero values are only set when there are 0 orders in the market. I checked in the test all is normal all is working, put on a real, and now has passed about a day -/+ 20 minutes and it starts to spit Alert (for a day it has opened 1 order and it was open).
What is the problem? Maybe in the lifetime of the variable?
Wrote a system, it uses let's say 2 price levels (b8 and s8) to open positions which I save in variables like fractional, and in case the terminal restarts it loses these values I set Alert.
if((в рынке ордеров>0 && (b8==0||s8==0))==false)
{
}
elseAlert("Error");
Zeroing is set only when there are 0 orders in the market. I checked in the test, all normal, everything works, put on a real, and now has passed about a day -/+ 20 minutes and it begins to spit me Alert. (for the day he opened 1 order and it was open)
What is the problem? Maybe in the lifetime of the variable?
You need to compare variables with type double via NormalizeDouble()
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
YES
Instead of what I advised in the previous post, change to this line, it might work.
What is the error? I can not understand not much. I have output the strings for the condition also outputs itself. It's not about the condition above.
Solved!
Can anyone explain why this was the case?
What is the error? I can't understand it much. I have output the strings for the condition also outputs itself. It's not about the condition above.
Solved!
Can someone explain to me why it was like this?
The operator ends with a semicolon. (;)
Wrote a system, it uses let's say 2 price levels (b8 and s8) to open positions which I save in variables like fractional, and in case the terminal restarts it loses these values I set Alert.
if((в рынке ордеров>0 && (b8==0||s8==0))==false)
{
}
else Alert("Error");
Zero values are only set when there are 0 orders in the market. I checked in the test all is normal all is working, put on a real, and now has passed about a day -/+ 20 minutes and it starts to spit Alert (for a day it has opened 1 order and it was open).
What is the problem? Maybe in the lifetime of the variable?
Wrote a system, it uses let's say 2 price levels (b8 and s8) to open positions which I save in variables like fractional, and in case the terminal restarts it loses these values I set Alert.
Zeroing is set only when there are 0 orders in the market. I checked in the test, all normal, everything works, put on a real, and now has passed about a day -/+ 20 minutes and it begins to spit me Alert. (for the day he opened 1 order and it was open)
What is the problem? Maybe in the lifetime of the variable?
Use NormalizeDouble() to compare variables of type double
0 is not a double type.
And this crap, what type:
... 2 price levels (b8 and s8)
And this shit, of what type:
It clearly and explicitly says, "into a variable of the fractional type" :)))
You could get spit onby Alert for such questions :))
And this stuff, what kind of stuff:
and why does it compare to zero?