for some reason, the first bar of this custom series has no value yet, so it is NaN
When the SMA method receives the NaN as it's input, it tries to calc a sum, which then makes the class internal variable priorsum be NaN, and the issue continues for each additional bar input ...
Please consider a validation check inside the SMA indicator, if the input is Nan, set it's value = 0;
Comment