public class CallBuySell : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "CallBuySell";
Calculate = Calculate.OnEachTick;
IsOverlay = false;
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;
AddPlot(Brushes.Orange, "CloseValue");
}
}
protected override void OnBarUpdate()
{
if (CurrentBar < 0 || CurrentBar <= BarsRequiredToPlot)
return;
CloseValue[0] = SampleBuySellVolume().SjClose[0];
}
public Series<double> CloseValue
{
get { return Values[0]; }
}
}
Here is the Non-Visual Indicator:
SampleBuySellVolume.zip

Comment