OPEN-SOURCE SCRIPT

Vortex Range Engine

365
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.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.