The code is so simple that I am assuming is missed doing something to get a region to paint between two plot lines as shown in the SS. I put Print statements (not in the code below) to make sure the values are correct, which they are. The indicator does not run in the price panel.
NT Version is 8.0.14.1 64-bit.
So, what did I not do correctly?
Thank you.
protected override void OnBarUpdate() { if (CurrentBar < 1) { this.TrendREMA[0] = 0; this.CycleREMA[0] = 0; return; } if (CurrentBar < 1) { this.TrendREMA[0] = 0; this.CycleREMA[0] = 0; return; } this.TrendREMA[0] = (trema[0]); this.CycleREMA[0] = (crema[0]); if( CycleREMA[0] > TrendREMA[0] ) Draw.Region(this, "CycleAbove", CurrentBar, 0, CycleREMA, TrendREMA, null, Brushes.LightGreen, 50); if( CycleREMA[0] < TrendREMA[0] ) Draw.Region(this, "TrendAbove", CurrentBar, 0, CycleREMA, TrendREMA, null, Brushes.LightCoral, 50); } [Browsable(false)] [XmlIgnore] public Series<double> TrendREMA { get { return Values[0]; } } [Browsable(false)] [XmlIgnore] public Series<double> CycleREMA { get { return Values[1]; } }
Comment