- OrderClose() issue mql4
- Having trouble trying to close an order
- Error in OrderClose #129
On the next tick your condition is still true, count is zero, and you open another. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12
On the next tick your condition is still true, count is zero, and you open another. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12
I don't know if correct, but the problem can be the loop for, right?
for(int ci = OrdersTotal();ci >= 0;ci--) { if(OrderSelect(ci,SELECT_BY_POS,MODE_TRADES)) {
-
That loop selects all orders. You don't show what the loop is doing.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problemWe can't see your broken code.
- That loop has nothing to do with what I guessed is your problem.
-
That loop selects all orders. You don't show what the loop is doing.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problemWe can't see your broken code.
- That loop has nothing to do with what I guessed is your problem.
William, hello, how are you? Another thing I didn't understand is: the -1 in PositionsTotal(), sometimes, people uses -1 instead of purely PositionsTotal(), why?
If there are n items, their positions are [0 … n-1].
William, hello, how are you? Another thing I didn't understand is: the -1 in PositionsTotal(), sometimes, people uses -1 instead of purely PositionsTotal(), why?
MQL5 has PositionsTotal().
MQL4 doesn't as far as I know.
MQL5 has PositionsTotal().
MQL4 doesn't as far as I know.
I forgot this section is for MQL4 only, sorry.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use