스크립트에서 "黄金近50年的走势"에 대해 찾기
UO_30-50-70Ultimate Oscillator with bands present at the 30, 50, and 70 pt levels.
Personally use this every time, created a script to hard code these lines so I wouldn't need to redraw them all the time.
Enjoy
The Lazy Trader - Index (ETF) Trend Following Robot50/150 moving average, index (ETF) trend following robot. Coded for people who cannot psychologically handle dollar-cost-averaging through bear markets and extreme drawdowns (although DCA can produce better results eventually), this robot helps you to avoid bear markets. Be a fair-weathered friend of Mr Market, and only take up his offer when the sun is shining! Designed for the lazy trader who really doesn't care...
Recommended Chart Settings:
Asset Class: ETF
Time Frame: Daily
Necessary ETF Macro Conditions:
a) Country must have healthy demographics, good ratio of young > old
b) Country population must be increasing
c) Country must be experiencing price-inflation
Default Robot Settings:
Slow Moving Average: 50 (integer) //adjust to suit your underlying index
Fast Moving Average: 150 (integer) //adjust to suit your underlying index
Bullish Slope Angle: 5 (degrees) //up angle of moving averages
Bearish Slope Angle: -5 (degrees) //down angle of moving averages
Average True Range: 14 (integer) //input for slope-angle formula
Risk: 100 (%) //100% risk means using all equity per trade
ETF Test Results (Default Settings):
SPY (1993 to 2020, 27 years), 332% profit, 20 trades, 6.4 profit factor, 7% drawdown
EWG (1996 to 2020, 24 years), 310% profit, 18 trades, 3.7 profit factor, 10% drawdown
EWH (1996 to 2020, 24 years), 4% loss, 26 trades, 0.9 profit factor, 36% drawdown
QQQ (1999 to 2020, 21 years), 232% profit, 17 trades, 3.6 profit factor, 2% drawdown
EEM (2003 to 2020, 17 years), 73% profit, 17 trades, 1.1 profit factor, 3% drawdown
GXC (2007 to 2020, 13 years), 18% profit, 14 trades, 1.3 profit factor, 26% drawdown
BKF (2009 to 2020, 11 years), 11% profit, 13 trades, 1.2 profit factor, 33% drawdown
A longer time in the markets is better, with the exception of EWH. 6 out of 7 tested ETFs were profitable, feel free to test on your favourite ETF (default settings) and comment below.
Risk Warning:
Not tested on commodities nor other financial products like currencies (code will not work), feel free to leave comments below.
Moving Average Slope Angle Formula:
Reproduced and modified from source:
50-Line Oscillator // (\_/)
// ( •.•)
// (")_(")
25-Line Oscillator
Description:
The 25-Line Oscillator is a sophisticated technical analysis tool designed to visualize market trends through the use of multiple Simple Moving Averages (SMAs). This indicator computes a series of 26 SMAs, incrementally increasing the base length, providing traders with a comprehensive view of price dynamics.
Features:
Customizable Base Length: Adjust the base length of the SMAs according to trading preferences, enhancing versatility for different market conditions.
Rainbow Effect: The indicator employs a visually appealing rainbow color scheme to differentiate between the various trend lines, making it easy to identify crossovers and momentum shifts.
Crossovers Detection: The script includes logic to detect crossover events between consecutive trend lines, which can serve as signals for potential entry or exit points in trading.
Clear Visualization: Suitable for both novice and seasoned traders, the plots enable quick interpretation of trends and market behavior.
How to Use:
Add the indicator to your chart and customize the base length as desired.
Observe the rainbow-colored lines for trend direction.
Look for crossover events between the SMAs as potential trading signals.
Application: This indicator is particularly useful for swing traders and trend followers who aim to capitalize on market momentum and identify reversals. By monitoring the behavior of multiple SMAs, traders can gain insights into the strength and direction of price movements over various time frames.
AK Simple Moving Average 50 days Simple Moving average suitable for Intraday on 1Hr,30Min.15Min Time frames
1. When candle crossing above SMA Line - Go for Long Entries
2. When candle crossing below SMA Line - Go for short Entries
50 SMA / 200 EMA / 128EMA Moving Average CrossFound success using 50SMA vs 200EMA.
128 EMA also charted for it's BTC relevance.
50/100/200 Moving Averages (Pine Script For Copy)by fresca
SCRIPT LANGUAGE
Copy script below and adjust based on your preferences.
-function (change function from "sma" to "ema", "wma" and more)
-length (25 Day, 150 Day or add more averages to the three in this script.)
-color, (red, yellow, etc. or use color hex codes i.e. #FEDA15, #FFAD8F, etc.)
-transparency (set to desired level 1-100)
Or add more options.
RESOURCES
Color hex codes site: www.canva.com
Trading View Pine Script Editor Reference Guide: www.tradingview.com
Taint's Multi Time Frame MA50-100-200 SMA with two 200 EMA's all with the ability choose a time frame for each.
Universal ORB Strategy v2 # Universal ORB **v2** — Pine v6 Strategy
Opening Range Breakout strategy with a compact, real-time HUD, risk-managed exits, and guardrails to avoid late entries.
---
## Table of Contents
- (#what-it-does)
- (#quick-start)
- (#recommended-timeframes--sessions)
- (#inputs-reference)
- (#how-trades-trigger-logic-flow)
- (#risk--exits-r-multiples)
- (#hud-guide)
- (#plots--labels)
- (#backtesting-tips)
- (#live-trading-tips)
- (#troubleshooting)
- (#example-presets)
- (#user-journey-example)
- (#install--run)
- (#changelog)
- (#disclaimer)
---
## What It Does
- Builds an **Opening Range (OR)** from the **first _N_ minutes** after session open.
- Goes **long** on breaks **above** OR high; **short** on breaks **below** OR low.
- Optional **filters**:
- **Minimum OR width** (skip tiny, choppy ranges).
- **Volume filter** (current volume must exceed SMA).
- **Entry guard** (only allow entries ≤ _X_ bars after the initial break).
- **Risk-managed exits**:
- Stop based on **ATR × multiplier**.
- Two profit targets (**TP1**, **TP2**) at configurable **R multiples** (50/50 split).
---
## Quick Start
1. **Add the script** to a chart in TradingView (see (#install--run)).
2. In **Settings → Inputs**:
- Set **Session** (e.g., `0930-1600` for US equities; a daily boundary for crypto).
- Set **First N Minutes** (common: **5**, **15**, **30**).
- Optionally enable **Volume Filter** and set a **Min OR Width**.
3. Pick a timeframe (1m–15m typical).
4. After the first N minutes, the OR locks. Breakouts that pass filters/guard will **auto-enter** with TP/SL attached.
5. Review results in **Strategy Tester**. Tweak inputs to fit your market.
---
## Recommended Timeframes & Sessions
| Market | Session Example | First N Minutes | Chart Timeframe | Notes |
|-------------|-------------------|----------------:|----------------:|------|
| US Equities | `0930-1600` | 5–30 | **1m–5m** | 5–15m OR is common; 1–3m chart for precision. |
| Futures | RTH or chosen day | 5–30 | 1m–5m | Use exchange RTH if you trade regular hours only. |
| Crypto | `0000-2359` (or preferred daily reset) | 15–60 | **3m–15m** | 24/7—pick a consistent daily open to define OR. |
**Heuristics**
- Shorter **N** → more trades, more noise.
- Longer **N** → fewer trades, higher average quality.
- Increase **Min OR Width** for very volatile symbols.
---
## Inputs Reference
### Opening Range
- **Session** (`0930-1600` by default): Trading window that defines each session/day.
- **First N Minutes**: Minutes after session open used to build the OR high/low.
### Filters
- **Min OR Width (points)**: Minimum acceptable range height; `0` disables.
- **Enable Volume Filter**: Requires `volume > SMA(volume, len)`.
- **Volume SMA Length**: Period for volume SMA.
### Risk / Targets
- **ATR Length**: ATR period for stop calculation.
- **ATR ×**: Stop distance multiplier (`stop = ATR × multiplier`).
- **TP1 = R Multiple**: First target measured in R (risk units).
- **TP2 = R Multiple**: Second target measured in R.
### Entry Guard
- **Max Bars After Break**: Reject entries that occur more than _X_ bars after the initial break.
### Visuals
- **Plot OR High/Low**: Draw the OR lines (forming vs locked).
- **Show Break Labels**: “LONG/SHORT” markers at entries.
---
## How Trades Trigger (Logic Flow)
1. **Build OR** during the first _N_ minutes of the session (track highest high & lowest low).
2. When _N_ minutes pass, **OR locks**.
3. **Detect breakouts**:
- **Up-break** when `close` crosses **above** OR high.
- **Down-break** when `close` crosses **below** OR low.
4. **Check filters**:
- **Min OR Width** (if set) must pass.
- **Volume Filter** (if enabled) must pass.
- **Entry Guard** must pass (bars since initial break ≤ limit).
5. **Place entry** (long/short) with attached **stop** (ATR-based) and **two targets** (TP1, TP2).
6. **Exit logic**: TP1 and TP2 each close **50%** of the position; stop exits the remainder.
---
## Risk & Exits (R Multiples)
- **R** = stop distance (entry price to stop).
- Example (long): ATR-based stop is **100** points below entry ⇒ **1R = 100**.
- **TP1 @ 1R** = entry + 100
- **TP2 @ 2R** = entry + 200
- Default split: **50%** size to TP1, **50%** to TP2.
Tune via **ATR Length**, **ATR ×**, and **TP1/TP2** R settings.
---
## HUD Guide
Compact table in the **top-right** with real-time updates on the live bar.
| Row | Meaning |
|------------|---------|
| **Universal ORB v2 / Filters + Guard** | Header |
| **OR Mode** | “First N Min” |
| **OR Hi / OR Lo** | Current OR levels (forming, then locked) |
| **Width** | OR High − OR Low |
| **Break** | Direction of the **last** break: Up / Down / None |
| **Setup** | Playbook hint: Await Break / Await Retest Long / Await Retest Short |
| **Position** | Above Range / Below Range / In Range |
| **Min OR** | PASS / FAIL |
| **VolFilt** | ON (PASS) / ON (FAIL) / OFF |
| **Stop/TP** | Current stop and TP levels (contextual) |
| **Guard** | “≤X | now:Y” bars since initial break |
---
## Plots & Labels
- **OR High/Low**
- Translucent while forming; solid after locking.
- **Entry Labels**
- “LONG” plotted above bar on up-break entries; “SHORT” below bar on down-break entries.
---
## Backtesting Tips
- Use **1m–5m** charts for intraday ORB on equities/futures; **3m–15m** for crypto.
- Keep the **Session** aligned with the instrument (RTH vs 24h).
- Experiment with:
- **First N Minutes**: 5 / 15 / 30
- **ATR ×**: 1.0–2.0
- **Min OR Width**: symbol-specific
- **Volume Filter**: often helpful in chop
- Evaluate **Net Profit**, **Max Drawdown**, **Win Rate**, and **Trade Count**—avoid over-filtering to zero trades.
---
## Live Trading Tips
- Account for **spread & slippage**; avoid targets unrealistically close to entry.
- If you find yourself chasing, **tighten Entry Guard**.
- If you’re getting chopped, **increase N** and/or **Min OR Width**, and consider enabling **Volume Filter**.
- Many traders prefer **“first valid break only”** per session—consider that as a personal rule.
---
## Troubleshooting
- **No trades:**
- OR might still be forming.
- Filters may be blocking (Min Width, Volume, Guard).
- Session may not match the instrument/time.
- **Too many trades:**
- Increase **First N Minutes** or **Min OR Width**; enable **Volume Filter**.
- **Labels/lines missing:**
- Ensure **Visuals** toggles are on in Settings.
---
## Example Presets
**Equities (active, early breakout)**
- Session: `0930-1600`
- First N Minutes: **5–15**
- Timeframe: **1m–3m**
- Min OR Width: start around **0.2–0.5%** of price (symbol-dependent)
- Volume Filter: **ON**, Length **20**
- Entry Guard: **≤ 3 bars**
**Futures (RTH breakout)**
- Session: Exchange RTH
- First N Minutes: **15–30**
- Timeframe: **1m–5m**
- Volume Filter: ON
- ATR ×: **1.5**
- TP1/TP2: **1R / 2R**
**Crypto (daily OR)**
- Session: `0000-2359` (or chosen reset)
- First N Minutes: **30–60**
- Timeframe: **3m–15m**
- Min OR Width: ON (tune per pair)
- Volume Filter: optional (exchange-dependent)
---
## User Journey Example
**Persona:** Sam, intraday trader on US equities, likes momentum out of the open.
1. **Add to Chart**
Sam opens the AAPL 1-minute chart, pastes the script into TradingView Pine Editor, and hits **Add to chart**.
2. **Configure**
- Session: `0930-1600`
- First N Minutes: `15`
- Min OR Width: `0.4` (about ~0.25–0.5% of typical AAPL price)
- Volume Filter: **ON**, Length `20`
- Entry Guard: `3` bars
- ATR ×: `1.5`, TP1 `1R`, TP2 `2R`
3. **Observe the Open**
From 9:30 to 9:45, the HUD shows **OR Hi/Lo** forming. After 9:45, the range locks and OR lines turn solid.
4. **First Breakout**
Price pops above **OR High** at ~9:47. The HUD shows **Break: Up**. Volume passes; Min Width passes; within 3 bars of the break. Strategy enters **LONG** with ATR stop and two targets.
5. **Trade Management**
The HUD line **Stop/TP** displays current SL and both TPs. Sam watches TP1 fill quickly; TP2 trails behind and eventually fills on extension. If price reverses, the ATR stop is there to cap the loss.
6. **Review & Iterate**
After the close, Sam checks **Strategy Tester** results. The day looks solid, but on a different symbol the range was too tight, so Sam increases **Min OR Width** to avoid similar chop tomorrow.
---
## Install / Run
1. Open **TradingView → Pine Editor**.
2. Paste the **Universal ORB v2 (Pine v6)** code.
3. Click **Add to chart**.
4. Open **Settings** to configure inputs per your market/timeframe.
> The strategy is written for **Pine Script v6**.
---
## Changelog
- **v2**
- Consolidated docs and naming.
- Compact, real-time HUD with clear status rows.
- ORB logic with Min Width, Volume filter, and Entry guard.
- ATR-based stop and dual TP exits (R-based).
---
## Disclaimer
This script is for educational purposes only and **not financial advice**. Markets involve risk. Test thoroughly in a simulator before using on live capital.
Custom RSI with Dual Smoothing + Bias Bands + ZonesRSI indicator with two layers of smoothing, key levels (20, 40, 50, 60, 80), and color-coded background zones for bullish, bearish, and neutral bias.
Great for spotting momentum, trend direction, and overbought/oversold conditions across any timeframe.
Multi SMA + Golden/Death + Heatmap + BB**Multi SMA (50/100/200) + Golden/Death + Candle Heatmap + BB**
A practical trend toolkit that blends classic 50/100/200 SMAs with clear crossover labels, special 🚀 Golden / 💀 Death Cross markers, and a readable candle heatmap based on a dynamic regression midline and volatility bands. Optional Bollinger Bands are included for context.
* See trend direction at a glance with SMAs.
* Get minimal, de-cluttered labels on important crosses (50↔100, 50↔200, 100↔200).
* Highlight big regime shifts with special Golden/Death tags.
* Read momentum and volatility with the candle heatmap.
* Add Bollinger Bands if you want classic mean-reversion context.
Designed to be lightweight, non-repainting on confirmed bars, and flexible across timeframes.
# What This Indicator Does (plain English)
* **Tracks trend** using **SMA 50/100/200** and lets you optionally compute each SMA on a higher or different timeframe (HTF-safe, no lookahead).
* **Prints labels** when SMAs cross each other (up or down). You can force signals only after bar close to avoid repaint.
* **Marks Golden/Death Crosses** (50 over/under 200) with special labels so major regime changes stand out.
* **Colors candles** with a **heatmap** built from a regression midline and volatility bands—greenish above, reddish below, with a smooth gradient.
* **Optionally shows Bollinger Bands** (basis SMA + stdev bands) and fills the area between them.
* **Includes alert conditions** for Golden and Death Cross so you can automate notifications.
---
# Settings — Simple Explanations
## Source
* **Source**: Price source used to calculate SMAs and Bollinger basis. Default: `close`.
## SMA 50
* **Show 50**: Turn the SMA(50) line on/off.
* **Length 50**: How many bars to average. Lower = faster but noisier.
* **Color 50** / **Width 50**: Visual style.
* **Timeframe 50**: Optional alternate timeframe for SMA(50). Leave empty to use the chart timeframe.
## SMA 100
* **Show 100**: Turn the SMA(100) line on/off.
* **Length 100**: Bars used for the mid-term trend.
* **Color 100** / **Width 100**: Visual style.
* **Timeframe 100**: Optional alternate timeframe for SMA(100).
## SMA 200
* **Show 200**: Turn the SMA(200) line on/off.
* **Length 200**: Bars used for the long-term trend.
* **Color 200** / **Width 200**: Visual style.
* **Timeframe 200**: Optional alternate timeframe for SMA(200).
## Signals (crossover labels)
* **Show crossover signals**: Prints triangle labels on SMA crosses (50↔100, 50↔200, 100↔200).
* **Wait for bar close (confirmed)**: If ON, signals only appear after the candle closes (reduces repaint).
* **Min bars between same-pair signals**: Minimum spacing to avoid duplicate labels from the same SMA pair too often.
* **Trend filter (buy: 50>100>200, sell: 50<100<200)**: Only show bullish labels when SMAs are stacked bullish (50 above 100 above 200), and only show bearish labels when stacked bearish.
### Label Offset
* **Offset mode**: Choose how to push labels away from price:
* **Percent**: Offset is a % of price.
* **ATR x**: Offset is ATR(14) × multiplier.
* **Percent of price (%)**: Used when mode = Percent.
* **ATR multiplier (for ‘ATR x’)**: Used when mode = ATR x.
### Label Colors
* **Bull color** / **Bear color**: Background of triangle labels.
* **Bull label text color** / **Bear label text color**: Text color inside the triangles.
## Golden / Death Cross
* **Show 🚀 Golden Cross (50↑200)**: Show a special “Golden” label when SMA50 crosses above SMA200.
* **Golden label color** / **Golden text color**: Styling for Golden label.
* **Show 💀 Death Cross (50↓200)**: Show a special “Death” label when SMA50 crosses below SMA200.
* **Death label color** / **Death text color**: Styling for Death label.
## Candle Heatmap
* **Enable heatmap candle colors**: Turns the heatmap on/off.
* **Length**: Lookback for the regression midline and volatility measure.
* **Deviation Multiplier**: Band width around the midline (bigger = wider).
* **Volatility basis**:
* **RMA Range** (smoothed high-low range)
* **Stdev** (standard deviation of close)
* **Upper/Middle/Lower color**: Gradient colors for the heatmap.
* **Heatmap transparency (0..100)**: 0 = solid, 100 = invisible.
* **Force override base candles**: Repaint base candles so heatmap stays visible even if your chart has custom coloring.
## Bollinger Bands (optional)
* **Show Bollinger Bands**: Toggle the overlay on/off.
* **Length**: Basis SMA length.
* **StdDev Multiplier**: Distance of bands from the basis in standard deviations.
* **Basis color** / **Band color**: Line colors for basis and bands.
* **Bands fill transparency**: Opacity of the fill between upper/lower bands.
---
# Features & How It Works
## 1) HTF-Safe SMAs
Each SMA can be calculated on the chart timeframe or a higher/different timeframe you choose. The script pulls HTF values **without lookahead** (non-repainting on confirmed bars).
## 2) Crossover Labels (Three Pairs)
* **50↔100**, **50↔200**, **100↔200**:
* **Triangle Up** label when the first SMA crosses **above** the second.
* **Triangle Down** label when it crosses **below**.
* Optional **Trend Filter** ensures only signals aligned with the overall stack (50>100>200 for bullish, 50<100<200 for bearish).
* **Debounce** spacing avoids repeated labels for the same pair too close together.
## 3) Golden / Death Cross Highlights
* **🚀 Golden Cross**: SMA50 crosses **above** SMA200 (often a longer-term bullish regime shift).
* **💀 Death Cross**: SMA50 crosses **below** SMA200 (often a longer-term bearish regime shift).
* Separate styling so they stand out from regular cross labels.
## 4) Candle Heatmap
* Builds a **regression midline** with **volatility bands**; colors candles by their position inside that channel.
* Smooth gradient: lower side → reddish, mid → yellowish, upper side → greenish.
* Helps you see momentum and “where price sits” relative to a dynamic channel.
## 5) Bollinger Bands (Optional)
* Classic **basis SMA** ± **StdDev** bands.
* Light visual context for mean-reversion and volatility expansion.
## 6) Alerts
* **Golden Cross**: `🚀 GOLDEN CROSS: SMA 50 crossed ABOVE SMA 200`
* **Death Cross**: `💀 DEATH CROSS: SMA 50 crossed BELOW SMA 200`
Add these to your alerts to get notified automatically.
---
# Tips & Notes
* For fewer false positives, keep **“Wait for bar close”** ON, especially on lower timeframes.
* Use the **Trend Filter** to align signals with the broader stack and cut noise.
* For HTF context, set **Timeframe 50/100/200** to higher frames (e.g., H1/H4/D) while you trade on a lower frame.
* Heatmap “Length” and “Deviation Multiplier” control smoothness and channel width—tune for your asset’s volatility.
Parameter Free RSI [InvestorUnknown]The Parameter Free RSI (PF-RSI) is an innovative adaptation of the traditional Relative Strength Index (RSI), a widely used momentum oscillator that measures the speed and change of price movements. Unlike the standard RSI, which relies on a fixed lookback period (typically 14), the PF-RSI dynamically adjusts its calculation length based on real-time market conditions. By incorporating volatility and the RSI's deviation from its midpoint (50), this indicator aims to provide a more responsive and adaptable tool for identifying overbought/oversold conditions, trend shifts, and momentum changes. This adaptability makes it particularly valuable for traders navigating diverse market environments, from trending to ranging conditions.
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.
// Function that returns a dynamic RSI length based on past RSI values
// The idea is to make the RSI length adaptive using volatility (stdev) and distance from the RSI midpoint (50)
// Different "variant" options control how aggressively the length changes
parameter_free_length(free_rsi, variant) =>
len = switch variant
// Variant I: Most aggressive adaptation
// Uses standard deviation scaled by a nonlinear factor of distance from 50
// Also adds another distance-based term to increase length more dramatically
"I" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) *
math.pow(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100), 2)
) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
// Variant II: Moderate adaptation
// Adds the standard deviation and a distance-based scaling term (less nonlinear)
"II" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
)
// Variant III: Least aggressive adaptation
// Simply adds standard deviation and raw distance from 50 (linear scaling)
"III" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
math.ceil(math.abs(free_rsi - 50))
)
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., " 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.