I have a vWAP indicator, "The ones from userAppShare".
When added to a chart and run OnBarUpdate they work as intended and shows whats needed.
I have a strategy i want to run OnEachTick for live trade management.
on BarsInProgress == 0 && IsFirstTickOfBar
I have a strategy that uses alot of stuff and vWAP and this works fine.
I am adding the indicator like this.
private OT_vWAP SetupvWAPInd;
SetupvWAPResetPeriod = NinjaTrader.NinjaScript.Indicators.OTIndicators.OT _vWAP.Periods.Daily;
else if (State == State.DataLoaded)
{
SetupvWAPInd = OT_vWAP(Close, SetupvWAPResetPeriod);
SetupvWAPInd.Plots[0].Brush = Brushes.Black;
AddChartIndicator(SetupvWAPInd);
}
when i add the indicator to my chat it draws vWAP at one place and when i add the strategy it draws the vwap excatley above, 100% identical place.
but when it then runs live it does not draw the same place and it seems to be caused but the strategy running OnEachTick.
How do i some how acomodate for this ?
you see the yellow line is the indicator added to the chart and the black is the strategy plotting the same line.
Icould easily re-program the indicator but i was wondering if there were some easier and more generic way to acomodate for this.
Comment