OPEN-SOURCE SCRIPT
EMA Cross Strategy (ema_cross)

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.
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一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。