Hi guys, Why this code is out of range? it is in init() function
for(int i=1; i<=iBars(NULL,PERIOD_M1)-1; i++) { Print(High[i]); }
You are getting the bar count from the M1 time-frame.
You are getting the high value from whatever the chart time-frame is.
You should not get any values like this in init as they may not be loaded yet.
You are getting the bar count from the M1 time-frame.
You are getting the high value from whatever the chart time-frame is.
You should not get any values like this in init as they may not be loaded yet.
Actually it shows result for 200 to 220 bars while there is more than 2000+ bars
Actually it shows result for 200 to 220 bars while there is more than 2000+ bars
Also in OnCalculate() function there is result for 200-220 bars and after this it says array out of range, what is the problem?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys, Why this code is out of range? it is in init() function