Download MetaTrader 5

Multiple Trades problem

To add comments, please log in or register
munnassh
7
munnassh  

Hi,

I'm very new to coding in mql, and if I use any aimple code it is iterating multiple times, even if I used any loop conditions to stop after 2 iterations, it is  iterating again and again .
So, what can I do to stop it ?

Thanks a ton. 

Files:
Marco vd Heijden
Moderator
6152
Marco vd Heijden  
munnassh:

Hi,

I'm very new to coding in mql, and if I use any aimple code it is iterating multiple times, even if I used any loop conditions to stop after 2 iterations, it is  iterating again and again .
So, what can I do to stop it ?

Thanks a ton. 

Because you reset the value of counter on every tick because int conter=1; is in the on tick function.

It will order on every tick so you must remove it.

To add comments, please log in or register