Relative Strength Index (RSI)
<< Click to Display Table of Contents >> Relative Strength Index (RSI) |
Developed by J. Welles Wilder and introduced in his 1978 book, New Concepts in Technical Trading Systems, the Relative Strength Index (RSI) is an extremely useful and popular momentum oscillator. The RSI compares the magnitude of a stock's recent gains to the magnitude of its recent losses and turns that information into a number that ranges from 0 to 100.
... Courtesy of StockCharts
The original Wilder formula for an exponential moving average with a smoothing constant (k = 1/ Period) is used to calculate the RSI.
RSI(int period, int smooth)
RSI(ISeries<double> input, int period, int smooth)
Returns default value
RSI(int period, int smooth)[int barsAgo]
RSI(ISeries<double> input, int period, int smooth)[int barsAgo]
Returns avg value
RSI(int period, int smooth).Avg[int barsAgo]
RSI(ISeries<double> input, int period, int smooth).Avg[int barsAgo]
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
input |
Indicator source data (?) |
period |
Number of bars used in the calculation |
smooth |
Smoothing period |
// Prints the current value of a 20 period RSI using default price type |
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.