OPEN-SOURCE SCRIPT
Vortex Range Engine

Inspired by Ankit_1618
🚀 Vortex Range Engine [V6]
The Vortex Range Engine is a high-precision trend-following system that solves the primary weakness of the standard Vortex Indicator: Whipsaws in choppy markets.
By merging the directional power of the Vortex Indicator (VI) with a volatility-adjusted price filter, this tool ensures you only enter trends when there is both momentum (Vortex) and price structural confirmation (Range Engine).
🧠 The Logic
Standard Vortex crossovers are often "noisy." This engine applies a dual-layer confirmation:
The Vortex Core: It calculates Positive (VI+) and Negative (VI-) movements based on the distance between current highs/lows and previous price action. We apply an RMA (Running Moving Average) smoothing to filter out erratic spikes.
The Range Engine: This is a dynamic volatility corridor based on a modified ATR calculation. It creates a "noise floor." For a signal to trigger, the price must not only have a Vortex crossover but must also break and hold above/below this dynamic range.
Trend Persistence: The script uses a state-machine logic to maintain the background trend color, keeping you on the right side of the market until a definitive reversal is confirmed.
🛠️ Key Features
Volatility Filtering: Automatically adjusts to market conditions using ATR-based range detection.
Smoothed Crosses: Reduces "saw-tooth" signals by applying a signal smoothing parameter.
Visual Trend Ribbon: The background and range line shift colors (Bullish Aqua / Bearish Red) to provide an instant visual of the current market regime.
Signal Shapes: Clean "BUY" and "SELL" labels on the chart for entry points.
Optimized for V6: Written in the latest Pine Script® Version 6 for maximum performance and stability.
📈 How to Trade
Long Entry: Triggered when the Smoothed VI+ crosses above VI- AND price closes above the Range Filter.
Short Entry: Triggered when the Smoothed VI- crosses above VI+ AND price closes below the Range Filter.
Exit Strategy: Traders typically exit when the background color changes or when a trailing stop hits the Range Filter line (the plot on the chart).
⚙️ Settings
Vortex Length: The lookback period for trend detection (Default: 14). Increase for a more "macro" view.
Range Period & Multiplier: Controls the sensitivity of the volatility filter. A higher multiplier makes the engine more "strict" (fewer, but higher quality signals).
Signal Smoothing: Adjusts how reactive the Vortex lines are to price spikes.
Disclaimer: Trading involves significant risk. This indicator is a tool for technical analysis and does not guarantee profits. Use proper risk management and stop losses.
🚀 Vortex Range Engine [V6]
The Vortex Range Engine is a high-precision trend-following system that solves the primary weakness of the standard Vortex Indicator: Whipsaws in choppy markets.
By merging the directional power of the Vortex Indicator (VI) with a volatility-adjusted price filter, this tool ensures you only enter trends when there is both momentum (Vortex) and price structural confirmation (Range Engine).
🧠 The Logic
Standard Vortex crossovers are often "noisy." This engine applies a dual-layer confirmation:
The Vortex Core: It calculates Positive (VI+) and Negative (VI-) movements based on the distance between current highs/lows and previous price action. We apply an RMA (Running Moving Average) smoothing to filter out erratic spikes.
The Range Engine: This is a dynamic volatility corridor based on a modified ATR calculation. It creates a "noise floor." For a signal to trigger, the price must not only have a Vortex crossover but must also break and hold above/below this dynamic range.
Trend Persistence: The script uses a state-machine logic to maintain the background trend color, keeping you on the right side of the market until a definitive reversal is confirmed.
🛠️ Key Features
Volatility Filtering: Automatically adjusts to market conditions using ATR-based range detection.
Smoothed Crosses: Reduces "saw-tooth" signals by applying a signal smoothing parameter.
Visual Trend Ribbon: The background and range line shift colors (Bullish Aqua / Bearish Red) to provide an instant visual of the current market regime.
Signal Shapes: Clean "BUY" and "SELL" labels on the chart for entry points.
Optimized for V6: Written in the latest Pine Script® Version 6 for maximum performance and stability.
📈 How to Trade
Long Entry: Triggered when the Smoothed VI+ crosses above VI- AND price closes above the Range Filter.
Short Entry: Triggered when the Smoothed VI- crosses above VI+ AND price closes below the Range Filter.
Exit Strategy: Traders typically exit when the background color changes or when a trailing stop hits the Range Filter line (the plot on the chart).
⚙️ Settings
Vortex Length: The lookback period for trend detection (Default: 14). Increase for a more "macro" view.
Range Period & Multiplier: Controls the sensitivity of the volatility filter. A higher multiplier makes the engine more "strict" (fewer, but higher quality signals).
Signal Smoothing: Adjusts how reactive the Vortex lines are to price spikes.
Disclaimer: Trading involves significant risk. This indicator is a tool for technical analysis and does not guarantee profits. Use proper risk management and stop losses.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.