int tflist[8]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
// or let compiler count
int tflist[]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
// or let compiler count
int tflist[]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
WHRoeder:
int tflist[8]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
// or let compiler count
int tflist[]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
// or let compiler count
int tflist[]={PERIOD_M1,PERIOD_M5,PERIOD_M10,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
both those options generated errors. by both declaring and initializing as a global, the problem was solved; it also worked when declared and initialized in OnCalculate. naturally, it would not work at all when declared and initialized in OnInit. could not declare in global and initialize in OnInit.
rwbta: by both declaring and initializing as a global, the problem was solved;
Isn't that what I posted?
rwbta:
both those options generated errors. by both declaring and initializing as a global, the problem was solved; it also worked when declared and initialized in OnCalculate. naturally, it would not work at all when declared and initialized in OnInit. could not declare in global and initialize in OnInit.
You can declare it as global, and initialize in OnInit but not with the same syntax, you have to initialize an item at a time.
both those options generated errors. by both declaring and initializing as a global, the problem was solved; it also worked when declared and initialized in OnCalculate. naturally, it would not work at all when declared and initialized in OnInit. could not declare in global and initialize in OnInit.
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
it is declared global
int tflist[];
it is initialized in OnInit
it generates this error: '{' - expression expected. What am I doing wrong?