Download MetaTrader 5

Multiple Trades problem

To add comments, please log in or register
munnassh
7
munnassh 2016.07.22 10:22 

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
4733
Marco vd Heijden 2016.07.22 10:25  
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