OPEN-SOURCE SCRIPT
TradeGuard-v0.5

TradeGuard-v0.5 | Complete Options Trading System
⚠️ This is the only active version. All previous versions (v0.1, v0.2, v0.3, TradeGuard Full, TradeFlow Full System) are retired and no longer maintained. Remove old versions from your chart and add this one.
What is TradeGuard?
Built from scratch after losing money with a 72.5% win rate. The problem wasn't entries — it was exits and holding losers too long. TradeGuard is designed around one core idea: stop the trader from destroying their own edge. It reads market structure, institutional footprints and multi-timeframe alignment automatically so you can focus on executing, not analysing.
CORE SIGNALS
Trend Detection — fully automatic
Triple EMA system 13/48/200 in yellow/purple/red. Automatically reads UPTREND, DOWNTREND or CHOPPY. No manual input required.
BUY CALL / BUY PUT
Six entry types fire automatically — 13 EMA pullback, EMA reclaim, PMH/PML retest, PDH/PDL retest, ORB retest, liquidity sweep. All require trend + volume confirmation. Labels fire once on state change only — not every bar.
CUT CALL / CUT PUT
Fires the moment the EMA breaks. 0DTE mode uses 3-bar no-bounce rule — doesn't wait for candle close because theta doesn't wait. Weekly mode waits for candle close confirmation.
CONFLUENCE SCORING 0-10
Counts how many of 10 factors align before firing. 7+ = ★★★ label on chart, size up. 5-6 = ★★, normal size. Below 5 = silent. Stops you from entering weak setups that only have 2-3 things going for them.
LIQUIDITY SWEEP DETECTION
SW diamond fires when stops have been taken and institutions have entered. Four sweep types: PDH/PDL sweeps, PWH/PWL sweeps, EMA sweeps, equal highs/lows. The reversal after a sweep is sharper because weak hands are cleared out. Combining a sweep with 7/10 confluence is the highest probability setup in the system.
ORDER FLOW APPROXIMATION
Four signals reading the institutional footprint on price and volume. No Level 2 or DOM required.
🐟 Big Fish — Large institution filled an order here. High volume, tiny range = someone absorbed all the flow without moving price. That's a large fill.
W Wall — Big money blocking the move. Price keeps hitting same level with above average volume but cannot break through. Wall below = hidden buyer = CALL bias. Wall above = hidden seller = PUT bias.
Hidden — Iceberg order sitting at this level. Same price tested multiple times with volume, each time bouncing back. The order never runs out because it keeps refreshing.
F Flip — Big money changed direction. High volume reversal candle after a trending move. Institutional size switched sides.
The full sequence: Hidden → Wall → Big Fish at same level = institution finished accumulating or distributing. Label fires: "CALL SETUP BUILDING" or "PUT SETUP BUILDING". Add a sweep and 7/10 confluence = highest probability trade in the system.
REGIME QUALITY SCORE 0-6
Structural score before any entry fires: 2m trend, 5m aligned, 15m aligned, VWAP position, no squeeze, clean session time. LOW regime blocks all entries and tells you exactly what's missing.
KEY LEVELS — all automatic
PMH/PML — premarket high/low (orange)
PDH/PDL — previous day high/low (yellow)
PWH/PWL — previous week high/low (bright yellow, thick) ← most important for weekly options
ORB — opening range with 50%, 1.5x, 2x extensions (aqua)
Intraday fibonacci 0.5 and 0.618
Today's high/low
MTF Key Levels
Previous day/week/month OHLC + equilibrium levels (pdEQ, pwEQ)
Current week/month/year high/low
Y-VWAP (red, thick) — yearly institutional bias line
GEX Proxy Levels
~Flip — gamma flip proxy. Above = pinned/mean-reverting. Below = volatile/trending
~CW / ~PW — nearest $5 round number call wall / put wall proxy
Orange background when negative gamma (trending environment)
ASIA + LONDON SESSION BIAS (SPY/QQQ/indices only)
Shaded backgrounds for each session. Bias label at 9:30am open. London sweep detection — when London sweeps Asia lows and reverses, that's the strongest call setup of the session.
CHART PATTERNS
Bull flag, bear flag breakouts detected and shown in Pattern table row.
STATUS TABLE — 26 rows
Updates live every bar. Trend, EMA, VWAP, Volume, Squeeze, PMH/PML, PDH/PDL, Session, Order Flow, ORB, Pattern, 5m trend, 15m trend, Confluence, Signal, Regime, Gamma, Flip, Asia bias, London bias, US bias, Swing bias, Y-VWAP, Expiry suggestion, Stalled.
ALERTS
40+ alerts including: BUY CALL/PUT, CUT CALL/PUT, HIGH/GOOD confluence, all sweep types, all order flow signals, Y-VWAP cross, PWH/PWL break, MTF level touches, pattern breakouts.
ONE TOGGLE ONLY — 0DTE or Weekly mode. Everything else is automatic.
Best on 2-minute chart for entries. Table provides full higher timeframe context.
~ prefix on GEX labels = structural approximations, not live options chain data.
⚠️ This is the only active version. All previous versions (v0.1, v0.2, v0.3, TradeGuard Full, TradeFlow Full System) are retired and no longer maintained. Remove old versions from your chart and add this one.
What is TradeGuard?
Built from scratch after losing money with a 72.5% win rate. The problem wasn't entries — it was exits and holding losers too long. TradeGuard is designed around one core idea: stop the trader from destroying their own edge. It reads market structure, institutional footprints and multi-timeframe alignment automatically so you can focus on executing, not analysing.
CORE SIGNALS
Trend Detection — fully automatic
Triple EMA system 13/48/200 in yellow/purple/red. Automatically reads UPTREND, DOWNTREND or CHOPPY. No manual input required.
BUY CALL / BUY PUT
Six entry types fire automatically — 13 EMA pullback, EMA reclaim, PMH/PML retest, PDH/PDL retest, ORB retest, liquidity sweep. All require trend + volume confirmation. Labels fire once on state change only — not every bar.
CUT CALL / CUT PUT
Fires the moment the EMA breaks. 0DTE mode uses 3-bar no-bounce rule — doesn't wait for candle close because theta doesn't wait. Weekly mode waits for candle close confirmation.
CONFLUENCE SCORING 0-10
Counts how many of 10 factors align before firing. 7+ = ★★★ label on chart, size up. 5-6 = ★★, normal size. Below 5 = silent. Stops you from entering weak setups that only have 2-3 things going for them.
LIQUIDITY SWEEP DETECTION
SW diamond fires when stops have been taken and institutions have entered. Four sweep types: PDH/PDL sweeps, PWH/PWL sweeps, EMA sweeps, equal highs/lows. The reversal after a sweep is sharper because weak hands are cleared out. Combining a sweep with 7/10 confluence is the highest probability setup in the system.
ORDER FLOW APPROXIMATION
Four signals reading the institutional footprint on price and volume. No Level 2 or DOM required.
🐟 Big Fish — Large institution filled an order here. High volume, tiny range = someone absorbed all the flow without moving price. That's a large fill.
W Wall — Big money blocking the move. Price keeps hitting same level with above average volume but cannot break through. Wall below = hidden buyer = CALL bias. Wall above = hidden seller = PUT bias.
Hidden — Iceberg order sitting at this level. Same price tested multiple times with volume, each time bouncing back. The order never runs out because it keeps refreshing.
F Flip — Big money changed direction. High volume reversal candle after a trending move. Institutional size switched sides.
The full sequence: Hidden → Wall → Big Fish at same level = institution finished accumulating or distributing. Label fires: "CALL SETUP BUILDING" or "PUT SETUP BUILDING". Add a sweep and 7/10 confluence = highest probability trade in the system.
REGIME QUALITY SCORE 0-6
Structural score before any entry fires: 2m trend, 5m aligned, 15m aligned, VWAP position, no squeeze, clean session time. LOW regime blocks all entries and tells you exactly what's missing.
KEY LEVELS — all automatic
PMH/PML — premarket high/low (orange)
PDH/PDL — previous day high/low (yellow)
PWH/PWL — previous week high/low (bright yellow, thick) ← most important for weekly options
ORB — opening range with 50%, 1.5x, 2x extensions (aqua)
Intraday fibonacci 0.5 and 0.618
Today's high/low
MTF Key Levels
Previous day/week/month OHLC + equilibrium levels (pdEQ, pwEQ)
Current week/month/year high/low
Y-VWAP (red, thick) — yearly institutional bias line
GEX Proxy Levels
~Flip — gamma flip proxy. Above = pinned/mean-reverting. Below = volatile/trending
~CW / ~PW — nearest $5 round number call wall / put wall proxy
Orange background when negative gamma (trending environment)
ASIA + LONDON SESSION BIAS (SPY/QQQ/indices only)
Shaded backgrounds for each session. Bias label at 9:30am open. London sweep detection — when London sweeps Asia lows and reverses, that's the strongest call setup of the session.
CHART PATTERNS
Bull flag, bear flag breakouts detected and shown in Pattern table row.
STATUS TABLE — 26 rows
Updates live every bar. Trend, EMA, VWAP, Volume, Squeeze, PMH/PML, PDH/PDL, Session, Order Flow, ORB, Pattern, 5m trend, 15m trend, Confluence, Signal, Regime, Gamma, Flip, Asia bias, London bias, US bias, Swing bias, Y-VWAP, Expiry suggestion, Stalled.
ALERTS
40+ alerts including: BUY CALL/PUT, CUT CALL/PUT, HIGH/GOOD confluence, all sweep types, all order flow signals, Y-VWAP cross, PWH/PWL break, MTF level touches, pattern breakouts.
ONE TOGGLE ONLY — 0DTE or Weekly mode. Everything else is automatic.
Best on 2-minute chart for entries. Table provides full higher timeframe context.
~ prefix on GEX labels = structural approximations, not live options chain data.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.