OPEN-SOURCE SCRIPT

AK EMA 200 Trend Filter Strategy

341
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 อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน