if (Time[i]<TimeArray[y]) y++;
This fails when there are missing bars in TimeFrame chart. Use while not if. This is why I recommend not using the ArrayCopySeries but iBarShift.
y = iBarShift(NULL, timeframe, Time[i]);
- You want to repaint all TimeFrame bar zero values
// for(i=0,y=0;i<limit;i++) for(i=0,y=0;i<limit || y == 0;i++)
Thank you WHRoeder, now it is working fine.

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
How this can be fixed within the indicator's code ?