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 !!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.