OPEN-SOURCE SCRIPT

AK EMA 200 Trend Filter Strategy

369
Strategy Description – EMA 200 Trend Filter

This strategy uses the 200-period Exponential Moving Average (EMA) as a trend filter:

Entry Rule (Long only):

A long position is opened when the price crosses above the EMA 200 and closes above it.

Exit Rule:

The long position is closed if price closes back below the EMA 200.

Optional Short Trades (disabled by default, can be enabled):

A short position is opened when the price crosses below EMA 200 and closes below it.

The short is exited when price closes back above EMA 200.

Risk Management:

Configurable Stop Loss (%) and Take Profit (%) from entry price.

If enabled, trades are automatically protected with SL/TP levels.

Visualization:

EMA 200 is plotted in orange on the chart.

Green arrows mark long entries, red arrows mark exits.

✅ Use cases:

Works best on higher timeframes (1H, 4H, Daily) as a trend-following filter.

You can combine with additional indicators (RSI, MACD) to reduce false signals.

Always test in TradingView Strategy Tester before using in live trading.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。