I am trying to automate https://ninjatraderecosystem.com/use...estionboxlite/ for some backtesting etc. I am using an automation tool that can hook on to
plots. However, the congestion ranges that this indi displays is not a plot it's a rectangle and the automation tool doesn't recognize the congestion ranges. So I have tried for hours to get
it to plot up/down arrows when the supply/demand boxes are plotted but I'm currently one or 2 bars early. So the indicator has the conditions breakup=true and breakdown=true.
I have tried to add to the tag line in the up and down arrow code breakup for up arrows and breakdown for down arrows but its early. Probably using the wrong code. Hoping to use the condition
true to get it to plot. Might be a better way??
I have added lines:
Draw.ArrowUp(this, "breakup", true, 0, Low[0] + TickSize, Brushes.DodgerBlue);
and
Draw.ArrowDown(this, "breakdown", true, 0, High[0] + TickSize, Brushes.Orange);
hoping to get it to draw when those conditions are met, but it's early.
snippit of the code logic where I added it:
Code:
if(Close[0] > Upperboundary)
{
Inthebox = false;
breakupbarvalue = Close[0];
lastbar = CurrentBar;
totalbars = lastbar - firstbar;
upperBoundarySeries[0] = Upperboundary;
lowerBoundarySeries[0] = Lowerboundary;
boxBarNumSeries[0] = CurrentBar;
breakup = true;
Draw.ArrowUp(this, "breakup", true, 0, Low[0] + TickSize, Brushes.DodgerBlue);
}else
if(Close[0] < Lowerboundary)
{
Inthebox = false;
breakdownbarvalue = Close[0];
lastbar = CurrentBar;
totalbars = lastbar - firstbar;
upperBoundarySeries[0] = Upperboundary;
lowerBoundarySeries[0] = Lowerboundary;
boxBarNumSeries[0] = CurrentBar;
breakdown = true;
Draw.ArrowDown(this, "breakdown", true, 0, High[0] + TickSize, Brushes.Orange);
}
else
{
upperBoundarySeries[0] = upperBoundarySeries[1];
lowerBoundarySeries[0] = lowerBoundarySeries[1];
boxBarNumSeries[0] = boxBarNumSeries[1];
}
}
Any suggestions?
Thanks!

Comment