Game Theory EMA with an alternate strategy Game Theory EMA Strategy – Trend-Following with Utility & Nash Filters
This open-source strategy combines classic EMA crossover trend-following with simplified game-theory-inspired decision filters to improve entry quality and reduce whipsaws.
Core Concept
Traditional EMA strategies often suffer from false signals in ranging or low-conviction markets. This version adds lightweight game-theory proxies:
- **Expected Utility** (EU): estimates relative strength of buyers vs sellers using RSI momentum, volume weighting, and trend bias
- **Nash Equilibrium Proxy**: flags when buyer/seller forces are roughly balanced (low utility gap) → avoid trading in equilibrium (indecision/chop)
- **Momentum Strength Ratio**: measures recent bullish vs bearish candle dominance
These act as confirmation layers on top of EMA crossovers + trend filter + standard technical filters (ADX, volume, RSI), creating higher-confluence entries.
Key Components & Logic
1. EMA Signals
- Fast EMA (default 9) crosses above Slow EMA (21) → potential long
- Fast crosses below Slow → potential short
- Price must be above/below Trend EMA (50) for directional bias
2. Game Theory Filters (optional)
- Buyer/Seller Expected Utility: combines RSI position, volume weight, trend direction
- Utility Gap: absolute difference between buyer & seller EU → requires minimum gap (default 0.15)
- Nash Equilibrium: low gap (<0.1) → market in balance → skip trade if filter enabled
- Momentum Strength: ratio of bullish candles in lookback period
3. Additional Filters (toggleable)
- ADX trend strength (medium or higher)
- Volume surge (> SMA × multiplier)
- RSI not in extreme zones (20–80)
4. Risk & Trade Management
- ATR-based stop (default 1.2× ATR)
- Fixed R:R target (default 1.5:1)
- Max trades per day, max daily loss %, optional time filter
- Multiple exit reasons: target hit, trend break (EMA slow), equilibrium, time-based
Visuals & Dashboard
- Fast (blue), Slow (red), Trend (orange) EMAs
- Green/red background for up/down trend
- Yellow background during Nash equilibrium (indecision zone)
- Entry triangles + stop/target lines
- Top-right info table showing:
- Position, Trend, ADX strength
- Buyer/Seller EU, Utility Gap, Nash status
- Total trades & win rate
- Trades today / daily limit
Alerts
- "GT Strategy: Long Signal"
- "GT Strategy: Short Signal"
- "GT Strategy: Nash Equilibrium" (warning)
Realistic Backtesting & Usage Guidelines
To publish non-misleading results:
- Initial Capital: $10,000 – $50,000 (realistic retail/futures account)
- Position sizing: 1–3% equity per trade (change default_qty_value from 95%!)
- Commission: 0.03–0.1% per side or $4–$10 RT per contract (futures)
- Slippage: 1–5 ticks (futures/indices) or 0.5–2 pips (forex)
- Dataset: ≥12–36 months on chosen timeframe (aim for 300–800+ trades)
- Risk per trade: 0.5–2% max — never exceed sustainable levels
Expectations:
- Best on trending instruments (NQ, ES, GC, XAUUSD, BTC, major forex) during active sessions
- Fewer signals in choppy/low-volatility periods (Nash filter helps)
- Drawdowns common during ranging markets — this is a trend-biased system, not reversal
- News events can cause false entries — use time filter or manual discretion
How to Use
1. Apply to high-liquidity symbols (NQ1!, ES1!, GC1!, XAUUSD, BTCUSD, EURUSD)
2. Timeframes: 5m–1h for day trading, 4h–daily for swing
3. Start with defaults: 9/21/50 EMAs, Nash & utility filters on, 1.5:1 R:R
4. Trade only when multiple filters align (EMA cross + utility edge + volume + trend)
5. Avoid major news or use wider stops
6. Forward-test on demo for 2–3 months minimum
Publish Recommendation
- Use a clean chart: only this strategy, no extra indicators/drawings
- Show realistic Strategy Tester results with commission/slippage applied
- Screenshot during trending period with visible EMA cross, entry, stop/target lines, and info table
Educational tool — open-source for learning trend + decision-theory concepts. Not financial advice. Trading carries very high risk of loss — test thoroughly and trade responsibly.
Feedback welcome — especially on utility calculation or filter combinations!
אסטרטגיית Pine Script®






















