OPEN-SOURCE SCRIPT

Vortex strategy

275
🧠 Overview
The Vortex Strategy is a sophisticated trend-following and volatility-based trading algorithm designed for precision entries during directional market phases. It leverages Jurik smoothing, velocity filtering, and Vortex Indicator derivatives, enhanced with advanced risk management and hourly optimization. This strategy is best suited for futures and high-volume intraday markets like the CME E-Mini S&P 500 (ES1!).

🔧 Core Features
🔄 Vortex Indicator with Velocity Filter
Uses a velocity-enhanced form of the classic Vortex Indicator (VIP and VIM) to capture directional momentum.

Smooth VMP/VMM via SS & BW and pass that through a custom velocity function using RMS-scaled filtering.

📉 Super Smoother Trend Filter
Implements Ehlers' Super Smoother Filter to define trend bias dynamically.

Acts as a directional filter for long/short entry conditions, avoiding whipsaws.

🔊 Volume Velocity Confirmation
Entry signals require increasing volume velocity, calculated using RMS scaling and normalized via bandpass filtering.

🧠 Signal Conditions
Long Entry: VIP crosses above VIM, price above smoothed trend filter, and volume velocity increasing.

Short Entry: VIM crosses above VIP, price below trend filter, and volume velocity increasing.

🛡️ Risk & Trade Management
🎯 Dynamic Stop Loss & Take Profit
SL and TP are calculated using ATR smoothed with Jurik MA.

TP multiplier is customizable by hour, optimizing profit capture per trading session.

🕐 Hourly Optimization
Define up to 3 specific trade hours, each with:

Unique risk % allocation

Unique TP multipliers

Falls back to user-defined default settings if outside optimized hours, (Asia, New York).

🪙 Position Sizing
Risk-based sizing per trade.

Contracts are calculated dynamically using user/hourly risk and stop distance.

Rounded down to whole units to comply with futures contract rules.

⚙️ Advanced Tools
Jurik Moving Average (JMA): Smoothing with minimal lag

T3 Moving Average: Tilson’s smoother with configurable alpha

Laguerre Ultimate Smoother: Custom low-pass filter for signal confirmation

Hann Window FIR Filter: Optional for fine-tuned smoothing

Butterworth High-Pass & Bandpass Filters: For noise reduction and signal isolation

Z-Score Normalization: Detect extreme moves

Modular MA Framework: Plug-and-play MA type selector for quick experiments

⚙️ User Inputs (Grouped)
📌 Strategy Settings
Trade Direction: Long, Short, or Both

User-defined base risk (%)

📌 Entry Filters
Source type (hl2 default)

Vortex Length and Velocity Length

Super Smoother length

Volume Velocity length

📌 Risk & TP Settings
ATR Length, SL Multiplier, TP Multiplier

Per-hour TP/SL & risk percentages

📌 Time Filter
Toggle & configure 3 active trade hours

✅ Execution Logic
Strategy orders are submitted using strategy entry with calculated qty and a stop trigger.

Exits are handled by strategy exit with both SL and TP conditions.

Ensures each entry aligns with direction, trend filter, and volume momentum.

📈 Ideal For
Intraday futures traders (e.g., CME ES1!)

Traders needing hour-by-hour performance tuning

Strategies requiring advanced smoothing and signal validation

Quantitative backtesters analyzing risk-adjusted performance

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。