Why are you using the value of OrdersTotal and then checking History?
OrdersTotal can only be a positive number or zero, so your loop will not run with i<0.
Chances are its way wrong. Only stated with MQL4 this week. I tried some of the other "last profit" codes in the forum. Cant seem to get it right though.
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.
Is this in a function?
If not, why are you using return in a loop?
Why are you using the value of OrdersTotal and then checking History?
OrdersTotal can only be a positive number or zero, so your loop will not run with i<0.
Is this in a function?
If not, why are you using return in a loop?
Why are you using the value of OrdersTotal and then checking History?
OrdersTotal can only be a positive number or zero, so your loop will not run with i<0.
Chances are its way wrong. Only stated with MQL4 this week. I tried some of the other "last profit" codes in the forum. Cant seem to get it right though.
This is another piece of code I am trying.
Ill keep at it til I get it right.
Is this in a function?
If not, why are you using return in a loop?
Why are you using the value of OrdersTotal and then checking History?
OrdersTotal can only be a positive number or zero, so your loop will not run with i<0.