I want to make below code (difine)
bool LIST_GBPUSD;
...... many pairs
Something wrong with it.
Can you point it out??
you cannot create variable names like that...
Best to use an array of type bool instead.
You can use enumeration to provide a friendly reference.
#property strict enum PAIRS {EURUSD,GBPUSD,EURJPY,USDJPY}; bool ListPair[4]; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { ListPair[EURUSD] = true; ListPair[GBPUSD] = false; }
so in this example you can use the enum as a ref to the index of the array.
the enum translation is as follows: EURUSD = 0, GBPUSD = 1 etc...
you cannot create variable names like that...
Best to use an array of type bool instead.
You can use enumeration to provide a friendly reference.
so in this example you can use the enum as a ref to the index of the array.
the enum translation is as follows: EURUSD = 0, GBPUSD = 1 etc...
wow!!!
Thank you so much.
wow!!!
Thank you so much.
you are welcome
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to make below code (difine)
bool LIST_EURUSD;bool LIST_GBPUSD;
...... many pairs
Something wrong with it.
Can you point it out??