I'v coded an MTF indicator that monitors intrabar pullbacks in the base bars series (30 min bars) on a lower time frame ( 1 min bars) when COBC = True. This indicator is referenced by another indicator. The indicator works fine except for the situation when I look at a historical chart and "add" new bars to the chart by scrolling to the right (after I have updated Ninja Script). The calling indicator then returns incorrect values. (But the referenced indicator is correctly uppdated when added directly to the chart in this situation.) I can see from my print statments that the lower time frame bars series is not called at all when new bars are added to the chart this way. The indicator is correctly uppdated when called in RT with COBC = true and also when I do "Reload Ninja Script" on a historical chart.
How can I make the calling indicator update correctly in the situation when i scroll the chart bar by bar?
Best Regards
poseidon_Sthlm
Comment