Below is the code instantiating vwap and adding to chart as indicator.
private OrderFlowVWAP vwap;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
// skipped....
}
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Tick, 1);
}
else if (State == State.DataLoaded) {
vwap = OrderFlowVWAP(VWAPResolution.Tick, Bars.TradingHours, VWAPStandardDeviations.Three, 1, 2, 3);
AddChartIndicator(vwap);
}
}
Here is one with on bar close:
Note that even the one calculating on bar close, it looks like some of the vwap calculation is missing or somehow not plotted on chart?
Any advice is greatly appreciated.
Thanks.

Comment