% = modulus, remainder at division: so what remains if you divide by 2 in this case.
Seems the author was trying to get all even "i"s.
I wonder though, could he have done if(!(i%2))...?
I wonder though, could he have done if(!(i%2))...?
Yes, he could have. ;)
Or simply
for(i=0;i<K;i+=2)
/me feels stupid right now :)))))
awesome. Thank you for that explanation, make complete sense now. as a matter of fact, I contrived some seriously ad-hoc code to get all even numbers for more own purposes some time ago..if only I had known :)
![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
So some syntax in an EA from the code base I didnt understand:
What does the "%" inside the if-statement mean??