Loop with increments > 1 possbile?

 

Hello,

I know from Visual Basic that it is possible to use higher increments than 1. There you can add a "step 5" for an increment of 5 instead of 1. Is that also possible with MQL4? I want to make a for-loop and I need the numbers 10,15,20,25,30,35,40,45,50 in my calculation within the loop. I just wanted to know if I can use them as a loop counter or if I have to use another variable.

 
mar:

Hello,

I know from Visual Basic that it is possible to use higher increments than 1. There you can add a "step 5" for an increment of 5 instead of 1. Is that also possible with MQL4? I want to make a for-loop and I need the numbers 10,15,20,25,30,35,40,45,50 in my calculation within the loop. I just wanted to know if I can use them as a loop counter or if I have to use another variable.


Of course, it's possible.


   for(int i=10 ; i<=50 ; i+=5)
   {
    //...
   }
 
Thank you !!