{
public class DeltaDiv : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "DeltaDiv";
Calculate = Calculate.OnBarClose;
IsOverlay = true;
DisplayInDataBox = true;
DrawOnPricePanel = true;
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;
PaintPriceMarkers = true;
ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
//Disable this property if your indicator requires custom values that cumulate with each new market data event.
//See Help Guide for additional information.
IsSuspendedWhileInactive = true;
}
else if (State == State.Configure)
{
}
}
protected override void OnBarUpdate()
{
if (Close[0] > Open[0])
{
if(DeltaCandles[0] >0) the error is on this line with DeltaCandles which is an indicator I also use when I create sound alerts
BackBrush = Brushes.Green;
}
else if(Close[0]< Open[0])
{
if(DeltaCandles[0] <0) the error is on this line with DeltaCandles which is an indicator I also use when I create sound alerts
BackBrush = Brushes.Green;
}
}
}
}
Comment