I would like to create an indicator, "RangeRatio" which calculates "AveRange" / "SDRange"
I tried to create 3 DataSeries (one for Range, one for Averange, and one for SDRange) because i wasnt sure how to call an indicator within an indicator.
i then tried to ...
protected override void OnBarUpdate() { myRange.Set(Close[0] - Open[0]); myAveRange.Set(SMA(myRange,Period)); mySDRange.Set(StdDev(myRange,Period)); AvgRatio.Set(myAveRange/mySDRange)[0]; }
i would like to know the easier way to do this but i would also like to know why this way wouldnt work. Thanks. BB
Comment