Sha256: f9aae3eeb6624de5be37774385d3856afd45762de4b089d13c224f1904e98a63
Contents?: true
Size: 519 Bytes
Versions: 22
Compression:
Stored size: 519 Bytes
Contents
# Relative Strength Index (RSI) This method takes in an array of historical prices for a stock and a period (the number of days to calculate the RSI over). It uses the `each_cons` method to iterate over a sliding window of closing prices and calculate the gains and losses for each window. Then, it calculates the average gain and average loss for the time period and uses these values to calculate the RSI. The method returns the RSI value for the given period. * over_bought if rsi >= 70 * over_sold if rsi <= 30
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
sqa-0.0.2 | docs/relative_strength_index.md |
sqa-0.0.1 | lib/sqa/indicator/relative_strength_index.md |