I am developing an indicator Cumulative Delta Volume for NT8.
When loading Market Data through Playback Connection it worked perfectly.
The problem is when I run Playback "live", or even at Simulated Data Feed. I did not test at on-line account (SIM101 or Real Account) at NT Continuum, but I suspect the result will be the same.
I based this indicator on HeikenAshi for NT8, version April 2018, available on Ecosystem, wich I found a reference at this Forum.
My indicator considers the mounting of Open, High, Low and Close as Heiken Ashi formulation, but the difference is that the Open and Close of each bar is a cumulative formula for plotting the next bar. It uses basicaly State.SetDefaults, OnBarUpdate and OnRender() (copied from HeikenAshi indicator).
In each bar a delta is calculated and summed for next bar.
This file attached "NT8 - plot OK after loaded data (or Reload Ninja Script).JPG" is the correct appearence, when I load a market data.
But when running Playback, this is the result...
File attached "NT8 - Problem on Running playback.JPG"
If I Reload Ninja Script at panel, chart stays ok.
I´ve tried Calculate method ".OnBarClose", but it does not matter if I use it or ".OnEachTick" at State.SetDefaults. And I don´t know why!
It seems that for each iteration at OnBarUpdate() it keeps calculating the cumulative delta, instead of doing this only at Bar Close. As Volume is a factor multiplying the delta at formula, the values of bars are updated at each tick or price change and plotting is updated very distorted.
Please, I need some light here. A help on how to make it work on running "live", as it is by simply loading data.
Thanks and best regards,
Marcos

Comment