OPEN-SOURCE SCRIPT
EMA Trend Pro [Hedging & Fixed Risk]

[English]
This strategy is a comprehensive trend-following system designed to capture significant market movements while strictly managing risk. It combines multiple Exponential Moving Averages (EMAs) for trend identification, ADX for trend strength filtering, and Volume confirmation to reduce false signals.
Key Features:
Hedging Mode Compatible: The script is designed to handle Long and Short positions independently. This is ideal for markets where trends can reverse quickly or for traders who prefer hedging logic (requires hedging=true in strategy settings).
Professional Risk Management: Unlike standard strategies that use fixed contract sizes, this script calculates Position Size based on Risk. You can define a fixed risk per trade (e.g., 1% of equity or $100 fixed risk). The script automatically adjusts the lot size based on the Stop Loss distance (ATR).
Multi-Stage Take Profit: The strategy scales out positions at 3 different levels (TP1, TP2, TP3) to lock in profits while letting the remaining position ride the trend.
Strategy Logic:
Trend Identification:
Long Entry: EMA 7 > EMA 14 > EMA 21 > EMA 144 (Bullish Alignment).
Short Entry: EMA 7 < EMA 14 < EMA 21 < EMA 144 (Bearish Alignment).
Filters:
ADX Filter: Entries are only taken if ADX (14) > Threshold (default 20) to ensure the market is trending, avoiding chopping ranging markets.
Volume Filter: Current volume must exceed the 20-period SMA volume by 10% to confirm momentum.
Exits & Trade Management:
Stop Loss: Dynamic SL based on ATR (e.g., 1.8x ATR).
Breakeven: Once TP1 is hit, the Stop Loss is automatically moved to Breakeven to protect capital.
Take Profits:
TP1: 1x Risk Distance (30% pos)
TP2: 2x Risk Distance (50% pos)
TP3: 3x Risk Distance (Remaining pos)
Settings Guide:
Risk Type: Choose between "Percent" (of equity) or "Fixed Amount" (USD).
Risk Value: Input your desired risk (e.g., 1.0 for 1% risk).
Fee %: Set your exchange's Taker fee (e.g., 0.05 or 0.06) for accurate backtesting.
ADX Threshold: Adjust to filter out noise (Higher = Stricter trend requirement).
Disclaimer: This script is for educational and backtesting purposes only. Past performance does not guarantee future results. Please use proper risk management.
This strategy is a comprehensive trend-following system designed to capture significant market movements while strictly managing risk. It combines multiple Exponential Moving Averages (EMAs) for trend identification, ADX for trend strength filtering, and Volume confirmation to reduce false signals.
Key Features:
Hedging Mode Compatible: The script is designed to handle Long and Short positions independently. This is ideal for markets where trends can reverse quickly or for traders who prefer hedging logic (requires hedging=true in strategy settings).
Professional Risk Management: Unlike standard strategies that use fixed contract sizes, this script calculates Position Size based on Risk. You can define a fixed risk per trade (e.g., 1% of equity or $100 fixed risk). The script automatically adjusts the lot size based on the Stop Loss distance (ATR).
Multi-Stage Take Profit: The strategy scales out positions at 3 different levels (TP1, TP2, TP3) to lock in profits while letting the remaining position ride the trend.
Strategy Logic:
Trend Identification:
Long Entry: EMA 7 > EMA 14 > EMA 21 > EMA 144 (Bullish Alignment).
Short Entry: EMA 7 < EMA 14 < EMA 21 < EMA 144 (Bearish Alignment).
Filters:
ADX Filter: Entries are only taken if ADX (14) > Threshold (default 20) to ensure the market is trending, avoiding chopping ranging markets.
Volume Filter: Current volume must exceed the 20-period SMA volume by 10% to confirm momentum.
Exits & Trade Management:
Stop Loss: Dynamic SL based on ATR (e.g., 1.8x ATR).
Breakeven: Once TP1 is hit, the Stop Loss is automatically moved to Breakeven to protect capital.
Take Profits:
TP1: 1x Risk Distance (30% pos)
TP2: 2x Risk Distance (50% pos)
TP3: 3x Risk Distance (Remaining pos)
Settings Guide:
Risk Type: Choose between "Percent" (of equity) or "Fixed Amount" (USD).
Risk Value: Input your desired risk (e.g., 1.0 for 1% risk).
Fee %: Set your exchange's Taker fee (e.g., 0.05 or 0.06) for accurate backtesting.
ADX Threshold: Adjust to filter out noise (Higher = Stricter trend requirement).
Disclaimer: This script is for educational and backtesting purposes only. Past performance does not guarantee future results. Please use proper risk management.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.