A small modification to the NT reference indicator SpreadOscilliator uncovers an issue.
Please find attached the modified script. The change converts the SpreadOscillator to just Spread (i.e. series two minus series one). This change does not present any issue.
The issue presents in the SMA (the issue could be in SMA script which downloads with the SpreadOscillator indicator). As the SMA period is reduced (e.g. period = 5) the issue is more apparent. The issue can be seen in the attached screenshot. The SMA plot (orange) is consistently below the Spread (grey) and by a significant margin. It is as though the calculation the SMA is dividing by (period -1) (i.e. one fewer than expected).
Regards
Shannon
Comment