It would be
RSI = 100 - (100 / (1+RS))
RS = n period average of up closes / n period average of down closes
with no smoothing... is this available somewhere? Can it be easily coded somehow from this if not?
avgDown.Set((avgDown[1] * (Period - 1) + down[0]) / Period);
avgUp.Set((avgUp[1] * (Period - 1) + up[0]) / Period);
}
double rs = avgUp[0] / (avgDown[0] == 0 ? 1 : avgDown[0]);
double rsi = 100 - (100 / (1 + rs));
Thanks for any help!
R.T.
Comment