I'm trying to develop a indicator that divides the VOL by the range of the bar Open/Close.
It shows no error on compiling but on the log it shows
Default Error on setting indicator plot for indicator 'VolOpenClose'. Value outside of valid range.
The RangeOpenClose is the indicator that calculates the range of Open/Close and works ok.
Could You help me?
Thank You
namespace NinjaTrader.Indicator { [Description("Calculates the volume per range open/close.")] public class VolOpenClose : Indicator { protected override void Initialize() { Add(new Plot(Color.White, PlotStyle.Bar, "VOpenClose")); } protected override void OnBarUpdate() { if ( CurrentBar < 2) { return; } VOpenClose.Set(VOL()[0]/(RangeOpenClose().RangeOC[0]*10000)); } [Browsable(false)] [XmlIgnore()] public DataSeries VOpenClose { get { return Values[0]; } } } }
Comment