V1 Long Trade EMA Elasticity Signal + Backtest

This strategy exploits the elastic behavior between two EMAs (fast & slow). When price stretches too far below the slow EMA (like a rubber band), it tends to snap back — creating a high-probability long entry. When price stretches too far above, positions are closed for profit.
🔧 How It Works
Entry Logic (Long Only)
A buy signal triggers when the fast EMA (default: 3) drops below the slow EMA (default: 90) by a percentage threshold. This "elasticity gap" indicates an oversold stretch likely to revert.
Exit Logic — Profit-Guaranteed Close
Positions are only closed when:
The fast EMA crosses back above the slow EMA by the sell threshold
AND the candle's LOW is above entry price + a safety margin — ensuring real profit even with slippage
Adaptive ATR Filter
The entry/exit thresholds dynamically adjust to market volatility using ATR, preventing false signals in choppy markets and catching bigger moves in trending ones.
📊 Features
EMA Fan (Ribbon): Visual spread of intermediate EMAs between fast & slow — yellow = bullish, red = bearish
Multi-position pyramiding: Up to 50 simultaneous long entries, each independently tracked with unique IDs
Real-time info panel: Displays EMA values, elasticity gap %, open positions, ready/locked status, PnL, and win rate
Built-in filters (optional): EMA 200 trend filter, RSI oversold confirmation, volume filter, time-of-day filter
Color-coded zones: Green background = buy zone, red background = exit zone
⚙️ Key Parameters
ParameterDefaultDescriptionFast EMA3Reactive EMA for signal detectionSlow EMA90Anchor EMA for mean reversionBuy Threshold0.5%Min gap to trigger entrySell Threshold0.5%Min gap to trigger exitATR AdaptiveONAuto-adjusts thresholds to volatilityProfit Margin0.5%Safety buffer above entry price for exitsPosition Size5% equityPer-signal allocationMax Positions20Simultaneous open longs
💡 Best Use Cases
Crypto (BTC, ETH, altcoins) — high volatility = strong elastic snaps
Indices & Stocks — works on trending assets with regular pullbacks
Multiple timeframes — tested on 15m to Daily
⚠️ Notes
Long only — no short signals
Commission set at 0.04% (exchange-realistic for crypto)
Slippage: 1 tick
The profit margin check uses the candle LOW (worst case) to avoid paper profits that vanish on execution
All filters are OFF by default for maximum signal generation — enable them to increase selectivity
Script sob convite
Somente usuários aprovados pelo autor podem acessar este script. Você precisará solicitar e obter permissão para usá-lo. Normalmente, essa permissão é concedida após o pagamento. Para obter mais detalhes, siga as instruções do autor abaixo ou entre em contato diretamente com MustangAlgo.
A TradingView NÃO recomenda pagar ou usar um script, a menos que você confie totalmente em seu autor e entenda como ele funciona. Você também pode encontrar alternativas gratuitas e de código aberto em nossos scripts da comunidade.
Instruções do autor
Aviso legal
Script sob convite
Somente usuários aprovados pelo autor podem acessar este script. Você precisará solicitar e obter permissão para usá-lo. Normalmente, essa permissão é concedida após o pagamento. Para obter mais detalhes, siga as instruções do autor abaixo ou entre em contato diretamente com MustangAlgo.
A TradingView NÃO recomenda pagar ou usar um script, a menos que você confie totalmente em seu autor e entenda como ele funciona. Você também pode encontrar alternativas gratuitas e de código aberto em nossos scripts da comunidade.