hello, if my global variable is call
abc1,abc2,abc3,abc4.....
can i use like "for i=1 to 4" to calculate abc"i" ??
thank you for reply
Sheldon Kam: hello, if my global variable is call abc1,abc2,abc3,abc4..... can i use like "for i=1 to 4" to calculate abc"i" ?? thank you for reply
Use an array — Documentation on MQL5: Language Basics / Variables
double ABC[5]; // Declare array void SomeFunction( void ) { int SizeOfABC = ArraySize( ABC ); // Get size of array for( int i = 0; i < SizeOfABC; i++ ) ABC[i] = i * 3.1415; };
Please not that the above was not tested or compiled, and was just typed out on this post as an example.
Documentation on MQL5: Language Basics / Variables
- www.mql5.com
Variables - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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