I am hosting an instance of OrderFlowCumulativeDelta inside a self-developed indicator to get the bar delta values for my own computations. Now when (State == State.Historical) everything works as expected. But when (State == State.Realtime), OrderFlowCumulativeDelta seems to publish wrong (i.e. outdated) values in the DeltaHigh / DeltaLow / DeltaClose series.
I have attached an indicator to demonstrate the behavior. It hosts an instance of OrderFlowCumulativeDelta and also adds a volumetric bar series. It compares the OrderFlowCumulativeDelta values to the BarDelta values from the volumetric series, i.e. when (IsFirstTickOfBar && BarsInProgress == 0), it compares the values of the PREVIOUS (just closed) bars.
Just add the indicator (Schwarzer/Experimental/HsCumulativeDeltaTest) to a chart with a small time interval (such as a 10s chart), and you will see. Historical: Values match. Realtime: Values don't match.
I am aware of the fact that OrderFlowCumulativeDelta uses a 1-Tick data series internally, and I guess the problems are related to the behavior described in "Multi-Time Frame & Instruments". However, my understanding is that the ticks for the previous bar should have been processed by OrderFlowCumulativeDelta once I get the first tick of the new bar in the main series.
Currently not a big problem, since the workaround is obvious: Just use volumetric bars to get the bar delta, it works as expected.
Still, you might want to look into this since the behaviour of OrderFlowCumulativeDelta might not be as you intended.
Regards,
Heiko
Comment