OPEN-SOURCE SCRIPT

EMA Cross Strategy (ema_cross)

435
A trend-following strategy built around a 50/200 EMA cross, filtered by RSI momentum, volume confirmation, and trend strength — designed to avoid low-conviction chop and only fire on trades with volume and momentum behind them.


How it works:

-Trend detection: Fast/slow EMA (default 50/200) establishes directional bias
-Momentum filter: RSI must confirm overbought/oversold conditions in the direction of the trade
-Volume confirmation: Entries require volume to exceed a multiple of its moving average, filtering out low-participation moves
-Trend strength filter: A minimum EMA spread threshold avoids entries during flat/ranging conditions
-Volatility-adaptive TP/SL: Take-profit and stop-loss percentages scale with a short/long ATR ratio, widening in high-volatility regimes and tightening in calm ones
-Volatility-adaptive position sizing: Position size scales inversely with ATR%, so size shrinks automatically in choppy/volatile conditions
-Risk controls: Daily trade cap, daily loss cap (% of equity), and an automatic pause after a configurable streak of consecutive take-profit wins (to avoid over-trading a hot streak into reversal)
-Session filter: Optional block on entries during a low-liquidity UTC window


Inputs are fully configurable — EMA/RSI/ATR lengths, volume and trend thresholds, TP/SL bounds, position sizing caps, leverage, and daily risk limits can all be adjusted to fit different symbols and timeframes.
Notes:

-Backtested with a 0.04% commission and 1-tick slippage assumption to reflect realistic futures execution costs
-Designed for use with webhook-based automation (alerts fire structured JSON on entry/exit) but works standalone as a manual signal tool
-This is a systematic strategy, not financial advice — past performance in the strategy tester does not guarantee future results. Test on paper/small size before live deployment.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.