I'm trying to create an indicator that draws a horizontal line (on all the charts with the same name) starting from the POC / highest volume of the current bar and doesn't stop showing until disabled or 2 days later.
The plot is considerably simple; 2 combined bids / asks at the same price, from 2 different bars (See attached picture) that are greater than a certain volume figure (8000).
I've added the code for your review. I tried changing from MaxSeenDelta to GetMaximumPositiveDelta (and negative delta) but it doesn't seem to work.
Thank you
}
else if (State == State.Configure)
{
AddVolumetric("",BarsPeriodType.Volume, 10000, VolumetricDeltaType.BidAsk, 1);
}
}
protected override void OnBarUpdate()
{
if(BarsInProgress == 0)
{
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = BarsArray[1].BarsType as
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
if(barsType.Volumes[CurrentBar].GetMaximumPositiveDelta() + barsType.Volumes[CurrentBar -1].GetMaximumPositiveDelta() > 8000) { // Big Ask
Draw.HorizontalLine(this, "BigAsk", Open[0], Brushes.Magenta);
// Draw.HorizontalLine(this, "BigAsk", Open[0], Brushes.Magenta);
{
}
}
if(barsType.Volumes[CurrentBar].GetMaximumNegativeDelta() - barsType.Volumes[CurrentBar -1].GetMaximumNegativeDelta() < -8000){ // Big Bid
Draw.HorizontalLine(this, "BigBid", Close[0], Brushes.OrangeRed);
// Draw.HorizontalLine(this, "BigBid", Close[0], Brushes.OrangeRed);
Comment