Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 503

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
It works brilliantly!
From two positions chose the last one, namely on the 11th bar, which you can see in the screenshot:
Validation code
I decided to change the condition to enter the position, just set Limit to Low[2] worked, but when the condition as in my first call today, it does not work, so it is in the condition itself before the function is called
I decided to change the condition for entering a position, just set the limit to Low[2] it worked, but when the condition as in my first call today, it does not work, so the problem is in the condition itself before the function is called
It is you who set an order and not a position entry (Buy, Sell).
Ok, so it's a good thing.
It was you who set the order, not the entry into the position(Buy, Sell).
Ok, we've got it figured out - so it's good.
i meant that first there was a condition for enteringif(Open[2]>Close[2] && Open[1]>Close[1] && Close[1]<Low[2]
then I called this function to return the bar index, but now I just removed it and put Low[2] in OrderSend and it works
After all, I did not waste a day on it, it's a bit of a shift from the dead point
maybe 1 and 1 ?/i.e. true and error code 1
Your whole code is wrong.
Your whole code is wrong.
it checks the bar number against the time there...
he checks the bar number against the time there...
Yes, didn't notice the bracket.
it checks the bar number by time there...
maybe 1 and 1 ?/i.e. true and error code 1
Print(takelimit,GetLastError()) returns two values because the 1st variable is of bool type and it doesn't need GetLastError, and because it has a comma, GetLastError returns the last error in the code at the moment of calling GetLastError?