I am trying to create a momentum indicator starting from the Order Flow Cumulative Delta indicator. The indicator code would be:
CDMomentum = OrderFlowCumulativeDelta(BarsArray[0], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Session, 0).DeltaClose[0] - OrderFlowCumulativeDelta(BarsArray[0], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Session, 0).DeltaClose[Period];
to be applied on e.g. a 5 min bar chart. The issue is that as no tick data are loaded, it does not work and as far as I know I cannot use AddDataSeries in an Indicator script.
Could you please suggest me how to fix this?
Thank you
Martin

Comment