OPEN-SOURCE SCRIPT

HMA 200 + EMA 20 Crossover Strategy

4 663
This strategy combines a long-term trend filter using the Hull Moving Average (HMA 200) with a short-term entry trigger using the Exponential Moving Average (EMA 20).

📈 Entry Logic:
Buy Entry: When price is above the HMA 200 and crosses above the EMA 20.

Sell Entry: When price is below the HMA 200 and crosses below the EMA 20.

The strategy closes the current position and reverses on the opposite signal.

⚙️ Strategy Settings (Backtest Configuration):
Position size: 10% of equity per trade

Commission: 0.1% per trade (to simulate broker fees)

Slippage: 2 ticks (to reflect realistic fill conditions)

✅ Purpose:
This script is designed to identify high-probability trades in the direction of the overall trend, avoiding whipsaw conditions. It is useful for traders looking for a dynamic crossover-based system that filters trades based on longer-term momentum.

🔎 Make sure to test across multiple assets and timeframes. For best results, apply this strategy to liquid trending markets like major FX pairs, indices, or high-cap stocks.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。