OPEN-SOURCE SCRIPT
Options Strategy V2.0

📈 Options Strategy V2.0 – Intraday Reversal-Resilient Momentum System
Overview:
This strategy is designed specifically for intraday SPY, TSLA, MSFT, etc. options trading (0DTE or 1DTE), using high-probability signals derived from a confluence of technical indicators: EMA crossovers, RSI thresholds, ATR-based risk control, and volume spikes. The strategy aims to capture strong directional moves while avoiding overtrading, thanks to a built-in cooldown logic and optional time/session filters.
⚙️ Core Concept
The strategy executes trades only in the direction of the prevailing trend, determined by short- and long-term Exponential Moving Averages (EMA). Entry signals are generated when the Relative Strength Index (RSI) confirms momentum in the direction of the trend, and volume spikes suggest institutional activity.
To increase adaptability and user control, it includes a highly customizable parameter set for both long and short entries independently.
📌 Key Features
✅ Trend-Following Logic
Long entries are only allowed when EMA(short) > EMA(long)
Short entries are only allowed when EMA(short) < EMA(long)
✅ RSI Confirmation
Long: Requires RSI crossover above a configurable threshold
Short: Requires RSI crossunder below a configurable threshold
Optional rejection filters: Entry blocked above/below specific RSI extremes
✅ Volume Spike Filter
Confirms institutional participation by comparing current volume to an average multiplied by a user-defined factor.
✅ ATR-Based Risk Management
Both Stop Loss (SL) and Take Profit (TP) are dynamically calculated using ATR × a multiplier.
TP/SL ratio is fully configurable.
✅ Cooldown Control
After every trade, the system waits for a set number of bars before allowing new entries.
This prevents overtrading and increases signal quality.
Optionally, cooldown is ignored for reversal trades, ensuring the system can react immediately to a confirmed trend change.
✅ Candle Body Filter (Noise Control)
Avoids trades on candles with too small bodies relative to wicks (often noise or indecision candles).
✅ VWAP Confirmation (Optional)
Ensures price is trading above VWAP for long entries, or below for short entries.
✅ Time & Session Filters
Trades only during regular market hours (09:30–16:00 EST).
No-trade zone (e.g., 14:15–15:45 EST) to avoid low-liquidity traps or late-day whipsaws.
✅ End-of-Day Auto Close
All open positions are force-closed at 15:55 EST, protecting against overnight risk (especially relevant for 0DTE options).
📊 Visual Aids
EMA plots show trend direction
VWAP line provides real-time mean-reversion context
Stop Loss and Take Profit lines appear dynamically with each trade
Alerts notify of entry signals and exit triggers
🔧 Customization Panel
Nearly every element of the strategy can be tailored:
EMA lengths (short and long, for both sides)
RSI thresholds and length
ATR length, SL multiplier, and TP/SL ratio
Volume spike sensitivity
Minimum EMA distance filter
Candle body ratio filter
Session restrictions
Cooldown logic (duration + reversal exception)
This makes the strategy extremely versatile, allowing both conservative and aggressive configurations depending on the trader’s profile and the market context.
📌 Example Use Case: SPY Options (0DTE or 1DTE)
This system was designed and tested specifically for SPY and other intraday options trading, where:
Delta is around 0.50 or higher
Trades are short-lived (often 1–5 candles)
You aim to trade 1–3 signals per day, filtering out weak entries
🚫 Important Notes
It is not a scalping strategy; it relies on confirmed breakouts with trend support
No pyramiding or re-entries without cooldown to preserve risk integrity
Should be used with real-time alerts and manual broker execution
📈 Alerts Included
📈 Long Entry Signal
📉 Short Entry Signal
⚠️ Auto-closed all positions at 15:55 EST
✅ Proven Settings – Real Trades + Backtest Results
The current version of the strategy includes the optimal settings I’ve arrived at through extensive backtesting, as well as 3 months of real trading with consistent profitability. These results reflect real-world execution under live market conditions using 0DTE SPY options, with disciplined trade management and risk control.
🧠 Final Thoughts
Options Strategy V2.0 is a robust, highly tunable intraday strategy that blends momentum, trend-following, and volume confirmation. It is ideal for disciplined traders focused on SPY or other 0DTE/1DTE options, and it includes guardrails to reduce false signals and improve execution timing.
Perfect for those who seek precision, flexibility, and risk-defined setups—not blind automation.
Overview:
This strategy is designed specifically for intraday SPY, TSLA, MSFT, etc. options trading (0DTE or 1DTE), using high-probability signals derived from a confluence of technical indicators: EMA crossovers, RSI thresholds, ATR-based risk control, and volume spikes. The strategy aims to capture strong directional moves while avoiding overtrading, thanks to a built-in cooldown logic and optional time/session filters.
⚙️ Core Concept
The strategy executes trades only in the direction of the prevailing trend, determined by short- and long-term Exponential Moving Averages (EMA). Entry signals are generated when the Relative Strength Index (RSI) confirms momentum in the direction of the trend, and volume spikes suggest institutional activity.
To increase adaptability and user control, it includes a highly customizable parameter set for both long and short entries independently.
📌 Key Features
✅ Trend-Following Logic
Long entries are only allowed when EMA(short) > EMA(long)
Short entries are only allowed when EMA(short) < EMA(long)
✅ RSI Confirmation
Long: Requires RSI crossover above a configurable threshold
Short: Requires RSI crossunder below a configurable threshold
Optional rejection filters: Entry blocked above/below specific RSI extremes
✅ Volume Spike Filter
Confirms institutional participation by comparing current volume to an average multiplied by a user-defined factor.
✅ ATR-Based Risk Management
Both Stop Loss (SL) and Take Profit (TP) are dynamically calculated using ATR × a multiplier.
TP/SL ratio is fully configurable.
✅ Cooldown Control
After every trade, the system waits for a set number of bars before allowing new entries.
This prevents overtrading and increases signal quality.
Optionally, cooldown is ignored for reversal trades, ensuring the system can react immediately to a confirmed trend change.
✅ Candle Body Filter (Noise Control)
Avoids trades on candles with too small bodies relative to wicks (often noise or indecision candles).
✅ VWAP Confirmation (Optional)
Ensures price is trading above VWAP for long entries, or below for short entries.
✅ Time & Session Filters
Trades only during regular market hours (09:30–16:00 EST).
No-trade zone (e.g., 14:15–15:45 EST) to avoid low-liquidity traps or late-day whipsaws.
✅ End-of-Day Auto Close
All open positions are force-closed at 15:55 EST, protecting against overnight risk (especially relevant for 0DTE options).
📊 Visual Aids
EMA plots show trend direction
VWAP line provides real-time mean-reversion context
Stop Loss and Take Profit lines appear dynamically with each trade
Alerts notify of entry signals and exit triggers
🔧 Customization Panel
Nearly every element of the strategy can be tailored:
EMA lengths (short and long, for both sides)
RSI thresholds and length
ATR length, SL multiplier, and TP/SL ratio
Volume spike sensitivity
Minimum EMA distance filter
Candle body ratio filter
Session restrictions
Cooldown logic (duration + reversal exception)
This makes the strategy extremely versatile, allowing both conservative and aggressive configurations depending on the trader’s profile and the market context.
📌 Example Use Case: SPY Options (0DTE or 1DTE)
This system was designed and tested specifically for SPY and other intraday options trading, where:
Delta is around 0.50 or higher
Trades are short-lived (often 1–5 candles)
You aim to trade 1–3 signals per day, filtering out weak entries
🚫 Important Notes
It is not a scalping strategy; it relies on confirmed breakouts with trend support
No pyramiding or re-entries without cooldown to preserve risk integrity
Should be used with real-time alerts and manual broker execution
📈 Alerts Included
📈 Long Entry Signal
📉 Short Entry Signal
⚠️ Auto-closed all positions at 15:55 EST
✅ Proven Settings – Real Trades + Backtest Results
The current version of the strategy includes the optimal settings I’ve arrived at through extensive backtesting, as well as 3 months of real trading with consistent profitability. These results reflect real-world execution under live market conditions using 0DTE SPY options, with disciplined trade management and risk control.
🧠 Final Thoughts
Options Strategy V2.0 is a robust, highly tunable intraday strategy that blends momentum, trend-following, and volume confirmation. It is ideal for disciplined traders focused on SPY or other 0DTE/1DTE options, and it includes guardrails to reduce false signals and improve execution timing.
Perfect for those who seek precision, flexibility, and risk-defined setups—not blind automation.
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.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
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.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.