Setting up a moving averages crossover indicator
Code example: Crossover on the current bar
Thank you. Exactly what I was searching for.
You agree to website policy and terms of use
Hello guys,
based on 2 moving averages (fast and slow), I want to create an indicator cv which is
When I add the indicator to the chart, cv[i] is always zero and checking the log, ExtFastMaBuffer[0] never changes the value besides being a Timeseries (set true in OnInit()). Strangely enough, the same code run in the Strategy Tester actually outputs sometimes cv[i] = 1. Any advice is appreciated.