I have a couple of newbie questions:
1. I want to calculate the standard deviation on the bar size (high - low for each bar) for a series of bars.
Given that standard deviation calculation StdDev requires an iDataSeries as a parameter, how can I achieve this?
Eg, for a calculation on the standard deviation for the previous 10 bars, for instance,
double value = StdDev((High - Low), 10); will not compile since you can't subtract one data series from another.
2. Similarly, I want to calculate the average bar length (high - low) for a series going back a specific number of bars, but I can't see an appropriate method for this.
3. Given that I will be calculating the above 2 calculations on previous bars in a series I imagine that if i try to calculate, say, standard deviation on the first bar in the series for the previous 10 bars in the series I would raise an out of bounds exception, what is an easy way to check that I am not going on the first bar in the series?
Comment