Use for cycle for last 100 bars. For examples
for (int i=rates_total; i<rates_total; i++) { indicator_buffer[i]= // close[i], time[i] etc. {
See also Indexing Direction in Arrays, Buffers and Timeseries and article The Principles of Economic Calculation of Indicators

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
Hi i have script like this
why it doesnt show up ? and if i put some Print info to debug. it took soooo long to cyclle from first day in history to current day.
i what calculate just current day ..not whole bars in history .Do you have some suggestion how to achieve it ? thanks