Trady is a handy library for computing technical indicators, and it targets to be an automated trading system that provides stock data feeding, indicator computing, strategy building and automatic trading. It is built based on .NET Standard 2.0.
RSI should be 100 when the Average Loss equals zero. Using the RelativeStrengthIndexByTuple we should get 100 when there is no Average Loss, but instead RSI is null.
How to reproduce:
List<decimal?> allTradyCandlesList = new List<decimal?>();
for (int i = 1; i < 21; i++)
{
allTradyCandlesList.Add(i);
}
var rsi = new RelativeStrengthIndexByTuple(allTradyCandlesList, 10)[allTradyCandlesList.Count - 1];
RSI should be 100 when the Average Loss equals zero. Using the RelativeStrengthIndexByTuple we should get 100 when there is no Average Loss, but instead RSI is null.
How to reproduce: