I am trying to add both the Pivots and the "Order Flow VWAP" indicators to my NinjaScript custom strategy. The strategy is set to run on Calculate = Calculate.OnEachTick;
In order to get the Pivots to work, I had to add 2 data series (1 min and 1 day);
For the VWAP, I was able to get the "standard" resolution to work, but not the VWAPResolution.Tick. When I try to add the data series for the Tick I get an error:
Let me know how I can get the VWAP to calculate on VWAPResolution.Tick, and how I should ad the Data Series for Tick without the runtime errors, I would appreciate it!
(....I am on a 1-min NQ chart, with a "Calculate on Tick" strategy.....)
else if (State == State.Configure)
{
// adding the Data Series for Tick throws an error
//AddDataSeries(Data.BarsPeriodType.Tick, 1); // ERROR
AddDataSeries(BarsPeriodType.Minute, 1); // this is for Pivots
AddDataSeries(BarsPeriodType.Day, 1); // this is for pivots
}
else if (State == State.DataLoaded)
{
// PIVOTS initialize
mPivots_DailyBars = Pivots(BarsArray[1], PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20);
mPivots_IntraDayData = Pivots(BarsArray[1], PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20);
// VWAP initialize
mOrderFlowVWAP = OrderFlowVWAP(VWAPResolution.Standard, Bars.TradingHours, VWAPStandardDeviations.None, 1, 2, 3);
// When WVAPResolution is Tick it throws an run time error
// mOrderFlowVWAP = OrderFlowVWAP(VWAPResolution.Tick, Bars.TradingHours, VWAPStandardDeviations.None, 1, 2, 3); // ERROR
}
Thanks

Comment