Custom Formula Collection
Relative Strength Index, Custom (RSI)
This custom RSI will allow you to select which price data to use when you plot it. The standard RSI uses the close value as Welles Wilder did when he created the indicator. This custom indicator will allow you to use the other price fields including volume.
Q:=Input("Time Periods",1,1000,14);
B:=Input("Field: 1=Close, 2=Open, 3=High, 4=Low, 5=Volume",1,5,1);
Z:=If(B=1,Wilders(If(ROC(C,1,$)>0,ROC(C,1,$),0),LastValue(Q)),If(B=2,Wilders(If(ROC(O,1,$)>0,ROC(O,1,$),0),LastValue(Q)),If(B=3,Wilders(If(ROC(H,1,$)>0,ROC(H,1,$),0),LastValue(Q)),If(B=4,Wilders(If(ROC(L,1,$)>0,ROC(L,1,$),0),LastValue(Q)),Wilders(If(ROC(V,1,$)>0,ROC(V,1,$),0),LastValue(Q))))));
Y:=If(B=1,Wilders(If(ROC(C,1,$)<0,Abs(ROC(C,1,$)),0),LastValue(Q)),If(B=2,Wilders(If(ROC(O,1,$)<0,Abs(ROC(O,1,$)),0),LastValue(Q)),If(B=3,Wilders(If(ROC(H,1,$)<0,Abs(ROC(H,1,$)),0),LastValue(Q)),If(B=4,Wilders(If(ROC(L,1,$)<0,Abs(ROC(L,1,$)),0),LastValue(Q)),Wilders(If(ROC(V,1,$)<0,Abs(ROC(V,1,$)),0),LastValue(Q))))));
RS:=Z/Y;
100-(100/(1+RS))
For additional help with formulas, please see the Formula Primer.
Can't find the custom formula you need? MetaStock can create formulas for you.
- Creating Custom Formulas
- Absolute Breadth Index
- Advance / Decline Line with Negative Volume
- ADX/ADXR Custom (without rounding)
- Alpha and Beta
- Arms Index (TRIN)
- Average-Modified Method
- Breadth Thrust
- CCI Moving Average Crossover System Test
- Chande's Momentum Oscillator
- Combining Trend and Oscillator Signals System Test
- Commodity Channel Index Buy and Sell Signals
- Comparative Relative Strength
- Comparative Relative Strength Exploration
- Coppock Curve
- Derivative Moving Average
- Detrended Price Oscillator
- Disparity Index
- Displaying the Price of a Security in 32nds and 64ths
- Divergence between the Close and an Indicator
- Dynamic Momentum Oscillator
- Elder Ray and The Force Index
- End Point Moving Average
- Genesis of a Simple Futures Trading System
- Historical Volatility Daily
- Historical Volatility System, Connors and Raschke's
- Historical Volatility Weekly
- InSync Index
- Investor Preference Index
- Keltner Channels
- Ken Roberts' Formulas
- Kurtosis Indicator
- MACD Histogram
- Market Facilitation Index
- Market Facilitation Index Expert Advisor
- Market Thrust Oscillator
- Martin Pring's KST Formulas
- Mass Index
- McClellan Oscillator
- McClellan Summation Index
- Modified VIX Indicator
- Money Flow Index
- Moving Average of Only One Day of a the Week
- Natenberg's Volatility
- New Advance Decline Line
- Pathfinder Trading System
- Polarized Fractal Efficiency
- Price Action Indicator (PAIN)
- Price Volume Rank
- Random Walk Index
- Rate of Change Since a Specific Date
- Regression Oscillator and the Slope/Close Indicator
- Relative Strength Index, Custom (RSI)
- Relative Volatility Index (RVI)
- Slope of a Line
- Slope of a Linear Regression Line
- Standard Error Bands
- STIX Oscillator
- Stochastic %D
- Stochastic Relative Strength Index
- Tick Line Momentum Oscillator
- Trading Channel Index
- Wilder's Volatility
- WillSpread by Larry Williams