I want to simply draw a line between the highs of bar 0 (current bar) and the bar n bars ago (e.g., 30 bars ago), as shown on the attached snippet. Have had no success

Below you can find the C# code. What am I doing wrong? Eventually, I'd like to draw a line between the corresponding highs of the Cumulative Delta bars on the second panel. Any guidance on how to do that would be greatly appreciated as well. Thanks in advance!
namespace NinjaTrader.NinjaScript.Indicators
{
public class JIPDrawingLine : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "JIPDrawingLine";
Calculate = Calculate.OnBarClose;
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;
}
else if (State == State.Configure)
{
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
Draw.Line(this, "tag1", true, 30, High[30], 0, High[0], Brushes.LimeGreen, DashStyleHelper.Dot, 2);
}
}
}

Comment