I managed to solve the problem:
int start() { int counted_bars=IndicatorCounted(); if (counted_bars >0) counted_bars--; int limit=Bars-counted_bars; spread = (Ask - Bid) / Point; for (int i=0; i<limit-1; i++) { Spread[i] = MathMax(Spread[i], spread); } return(0); }

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
However, this wont work.
Of course, I am only interested recording the spread starting at the time when the indicator was attached to the chart... candles before this time would be "null".