Parameter Free RSI [InvestorUnknown]

PF-RSI offers a suite of customizable features, including dynamic length variants, smoothing options, visualization tools, and alert conditions.
Key Features
1. Dynamic RSI Length Calculation
The cornerstone of the PF-RSI is its ability to adjust the RSI calculation period dynamically, eliminating the need for a static parameter. The length is computed using two primary factors:
- Volatility: Measured via the standard deviation of past RSI values.
- Distance from Midpoint: The absolute deviation of the RSI from 50, reflecting the strength of bullish or bearish momentum.
The indicator offers three variants for calculating this dynamic length, allowing users to tailor its responsiveness:
- Variant I (Aggressive): Increases the length dramatically based on volatility and a nonlinear scaling of the distance from 50. Ideal for traders seeking highly sensitive signals in fast-moving markets.
- Variant II (Moderate): Combines volatility with a scaled distance from 50, using a less aggressive adjustment. Strikes a balance between responsiveness and stability, suitable for most trading scenarios.
- Variant III (Conservative): Applies a linear combination of volatility and raw distance from 50. Offers a stable, less reactive length adjustment for traders prioritizing consistency.
2. Smoothing Options
To refine the dynamic RSI and reduce noise, the PF-RSI provides smoothing capabilities:
- Smoothing Toggle: Enable or disable smoothing of the dynamic length used for RSI.
- Smoothing MA Type for RSI MA: Choose between SMA and EMA
- Smoothing Length Options for RSI MA:
- Full: Uses the entire calculated dynamic length.
- Half: Applies half of the dynamic length for smoother output.
- SQRT: Uses the square root of the dynamic length, offering a compromise between responsiveness and smoothness.
The smoothed RSI is complemented by a separate moving average (MA) of the RSI itself, further enhancing signal clarity.
3. Visualization Tools
The PF-RSI includes visualization options to help traders interpret market conditions at a glance.
Plots:
- Dynamic RSI: Displayed as a white line, showing the adaptive RSI value.
- RSI Moving Average: Plotted in yellow, providing a smoothed reference for trend and momentum analysis.
- Dynamic Length: A secondary plot (in faint white) showing how the calculation period evolves over time.
- Histogram: Represents the RSI’s position relative to 50, with color gradients.
- Fill Area: The space between the RSI and its MA is filled with a gradient (green for RSI > MA, red for RSI < MA), highlighting momentum shifts.
Customizable bar colors on the price chart reflect trend and momentum:
- Trend (Raw RSI): Green (RSI > 50), Red (RSI < 50).
- Trend (RSI MA): Green (MA > 50), Red (MA < 50).
- Trend (Raw RSI) + Momentum: Adds momentum shading (lighter green/red when RSI and MA diverge).
- Trend (RSI MA) + Momentum: Similar, but based on the MA’s trend.
- Momentum: Green (RSI > MA), Red (RSI < MA).
- Off: Disables bar coloring.
Intrabar Updating: Optional real-time updates within each bar for enhanced responsiveness.
4. Alerts
The PF-RSI supports customizable alerts to keep traders informed of key events.
Trend Alerts:
- Raw RSI: Triggers when the RSI crosses above (uptrend) or below (downtrend) 50.
- RSI MA: Triggers when the moving average crosses 50.
- Off: Disables trend alerts.
Momentum Alerts:
- Triggers when the RSI crosses its moving average, indicating rising (RSI > MA) or declining (RSI < MA) momentum.
Alerts are fired once per bar close, with descriptive messages including the ticker symbol (e.g., "[PF-RSI] Uptrend on: AAPL").
How It Works
The PF-RSI operates in a multi-step process:
Initialization
- On the first run, it calculates a standard RSI with a 14-period length to seed the dynamic calculation.
Dynamic Length Computation
- Once seeded, the indicator switches to a dynamic length based on the selected variant, factoring in volatility and distance from 50.
- If smoothing is enabled, the length is further refined using an SMA.
RSI Calculation
- The adaptive RSI is computed using the dynamic length, ensuring it reflects current market conditions.
Moving Average
- A separate MA (SMA or EMA) is applied to the RSI, with a length derived from the dynamic length (Full, Half, or SQRT).
Visualization and Alerts
- The results are plotted, and alerts are triggered based on user settings.
This adaptive approach minimizes lag in fast markets and reduces false signals in choppy conditions, offering a significant edge over fixed-period RSI implementations.
Why Use PF-RSI?
The Parameter Free RSI stands out by eliminating the guesswork of selecting an RSI period. Its dynamic length adjusts to market volatility and momentum, providing timely signals without manual tweaking.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.