I have trouble transforming a working NQ cum delta strategy, to MNQ strategy still using NQ cum delta
Any suggestion ? Thanks
My NQ strategy:
else if (State == State.Configure)
{AddDataSeries(Data.BarsPeriodType.Tick, 1);}
else if (State == State.DataLoaded)
{cumulativeDelta = OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0);}
protected override void OnBarUpdate()
{if ( cumulativeDelta.DeltaClose[0] > CumDeltaMin)…
If you’re running your strategy on MNQ but want the delta calculated on NQ, you’ll need to add the NQ data and configure the delta to use that data instead. I’m not sure if “NQ” is the right string here, you may need to use the contract qualified name like “NQ 12-25”
else if (State == State.Configure)
{
AddDataSeries("NQ", Data.BarsPeriodType.Tick, 1);
}
else if (State == State.DataLoaded)
{
cumulativeDelta = OrderFlowCumulativeDelta(BarsArray[1], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0);
}
And don’t forget to check the BarsInProgess in you OnBarUpdate code:
protected override void OnBarUpdate()
{
if(BarsInProgress == 1) cumulativeDelta.Update();
else
{
if ( cumulativeDelta.DeltaClose[0] > CumDeltaMin)…
Thank you very much…