int FirstBarIndex = iBars(NULL,0)-1;
Swing_Begin = FirstBarIndex;
Swing_End = FirstBarIndex;
if (iClose(NULL,0,FirstBarIndex-1) < iClose(NULL,0,FirstBarIndex))
Swing = "DESC";
Swing = "ASC";
Thank you for your reply but indeed when i first select 5m chart on the OnInit functin already there are information about bar history.
So your awnswer must no be correct. It must be something else....
The problem was on the array declaration Indicator;
To add comments, please log in or register