Loop Break
-
I can't seem to find any method to break out of a loop early before it finishes iterating.
ie: "loop (pass "n" times)"
-
Decreasing the 'n' number, maybe?
-
i made a loop for a certain condition, once the condition met the loop must be terminated. the bot should run the loop for each new candle but unfortunately it stop after the first run. anybody could help on this situation?
https://fxdreema.com/shared/nmtMOajHd -
@ehsanarab
This block means a different loop, see picture (framed in red), try it like this, but I haven't tested the code because I only use MQL5. Since you are using CID_X for counting, you can use it to force a stop if stop means a new start, otherwise you first have to think about how you want to restart after a stop.
Another note: You must never use the same name for a constant and a variable (loop_counter)!!!