Example picture attached. Idea is from: https://github.com/jackiewoodall/tv-...readme-ov-file, which is for Tradovate but want to recreate it on NT.
Any ideas how I would go about doing this? I was looking at the VOL indicator script to see but having trouble getting it to present both bars.
Code that shows nothing:
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "BullsvsBears";
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(new Stroke(Brushes.DodgerBlue, 2), PlotStyle.Bar, Custom.Resource.VOLVolume);
//AddLine(Brushes.DarkGray, 0, Custom.Resource.NinjaScriptIndicatorZeroLine);
AddPlot(new Stroke(Brushes.Green, 2), PlotStyle.Bar, "Bulls");
AddLine(Brushes.DarkGray, 0, "Bulls_" + Custom.Resource.NinjaScriptIndicatorZeroLine);
AddPlot(new Stroke(Brushes.Red, 2), PlotStyle.Bar, "Bears");
AddLine(Brushes.DarkGray, 0, "Bears_" + Custom.Resource.NinjaScriptIndicatorZeroLine);
}
else if (State == State.Configure)
{
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
//Value[0] = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0];
double percent_bulls = ((Close[0] - Low[0]) / (High[0] - Low[0]));
double percent_bears = (High[0] - Close[0]) / (High[0] - Low[0]);
Value[0] = percent_bulls;
Value[1] = percent_bears;
}

Comment