Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 504
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all!
I spent half the night trying to figure out why a simple condition does not work, please help me figure it out:
I am running on historical data, the variables macd1,2, lowprice, highprice are assigned values, but the condition does not want to run, I broke my head can not understand where to dig ... (((
maybe 1 and 1 ?/i.e. true and error code 1
Total mess and no understanding of what you are doing
Print(takelimit,GetLastError()) returns two values because the 1st variable is of bool type and does not need GetLastError, and since there is a comma, GetLastError returns the last error in the code at the time of calling GetLastError?
Yeah... there's two values that print.....
That's almost exactly what you wrote.
Yes... there are two values to print.....
That's almost exactly what you wrote.
A complete mess and a misunderstanding of what you're doing...
I'm not actually doing anything, I just assumed that the man will print 1 and 1 instead of 11))
and that's all...
A complete mess and misunderstanding of what you're doing...
Ah... so you're responding to the wrong person... I see)
I'm not actually doing anything, I just assumed that the person will print not 11, but 1 and 1.)
Like this line here:
Should I print "11"?
It'll print "1:1" then.
The error code 1 is no error, but the result is unknown.
Like this line here:
Can it print "11"?
It'll print "1:1" then.
The error code 1 is no error, but the result is unknown.
Yes, I've already changed it!
Ah... so you're responding to the wrong person... I see)
Yes, I was replying to the same person you were replying to. But you also told him the wrong thing - read when MODE_TRADES is required and when it is not. And how an order should be selected on a ticket.
Well, yes, I was answering the same person you were answering. But you also have not told him everything correctly - read when MODE_TRADES is required and when it is not. And how to select an order by ticket.
MODE_TRADES hasn't looked at it yet, just the piece that 11 printed...