The end goal of this would be able to calculate the average range between each crossover. The first step in accomplishing this would be to find the average number of candles inbetween crossovers.
I have been trying to find a way to count the number of bars between crossovers of two MAs. I would then need either a way to print the values or automatically average them.
For example the 10 SMA would cross the 20 SMA. The number of bars between that point in time and the point at which they cross again is counted.
This value would then be either printed in a document so I could average them using a calculator/excel or averaged in NinjaTrader.
Is there an easy way to do this? Or is there another method to find the ATR of a crossover?
Thanks
Comment