You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because prevNvi is initialized as 0 and therefore nvi also assigned 0 and on next iteration prevNvi again assigned 0 and so on.
solution: prevNvi should never be assigned 0.
The text was updated successfully, but these errors were encountered:
@siesta-trading I just did a commit that fixes this issue in both calculations so can you please get the latest version and test it to make sure it is working now?
I was looking at the fix you have implemented.
I think there is still a possibility that nvi can be set to 0 and therefore the problem persists.
For example:
OoplesFinance.StockIndicators/src/Calculations/Volume.cs
Line 267 in ddc4c11
The problem is here:
double prevNvi = nviList.LastOrDefault();
double nvi = currentVolume >= prevVolume ? prevNvi : prevNvi + (prevNvi * pctChg);
nviList.AddRounded(nvi);
because prevNvi is initialized as 0 and therefore nvi also assigned 0 and on next iteration prevNvi again assigned 0 and so on.
solution: prevNvi should never be assigned 0.
The text was updated successfully, but these errors were encountered: