I'm developing an Indicator within call other indicators. When I use some kind of indicator as the Vitalij's Volume Indicator I receive the error message:
Error on calling 'OnBarUpdate' method for indicator on bar n: index out of matrix's bounds
In the attachment there is my custom indicator (simplified for debugging) and the Vitalij's Volume Indicator.
To solve the problem I tried to put some ifs in the OnBarUpdate() method like
if(CurrentBar > vitVolume.BarsRequired){...}
if(CurrentBar < 0){...}
Please, can you help me to resolve the problem?
Best
Stefano
P.s. I'm using the indicator with MarketReplay.
Comment