TEMA/DEMA/HMA Trend Following Strategy
Overview
This strategy combines TEMA, DEMA and HMA moving averages to enter on TEMA/DEMA golden cross/dead cross signals, using HMA to determine trend direction to filter counter-trend trades.
Strategy Logic
- Calculate TEMA, DEMA and HMA moving averages
- Go long when TEMA crosses above DEMA
- Go short when TEMA crosses below DEMA
- Calculate HMA trend direction, only enter if aligning with HMA trend
Specifically, it uses DEMA to gauge medium-term trend, TEMA for short-term trend, and HMA for long-term trend. Trades are taken only when short/medium-term moves in alignment (TEMA/DEMA coordinated breakout), and long-term trend agrees (HMA direction matches breakout).
Advantage Analysis
- Combining multiple moving averages improves accuracy
- HMA trend filter avoids counter-trend trades
- TEMA/DEMA forms clear trading signals
- Custom periods for three lines fit different cycles
- Trading with trend reduces drawdown risks
Risk Analysis
- Complex multi-line combination requires parameter tuning
- HMA trend may lag price movement
- Risks of lagging entry exist
- Bad parameters may increase unnecessary reverse trades
Risks can be managed by parameter optimization, stop loss, relaxing entry rules etc.
Optimization Directions
- Test different period combinations to find optimal parameters
- Evaluate adding MACD etc. as auxiliary confirmation
- Add trailing stop loss to lock in profits, reduce drawdown
- Study parameter preferences across different products
- Relax entry rules to trade with long term trend
Summary
This strategy generates signals by combining multiple moving average indicators to determine trend. Pros are clear signals and high configurability; Cons are lagging risks and parameter dependency. Risks can be controlled via parameter optimization, stop loss etc. to utilize the power of a combined moving average system. It helps traders comprehensively master trend trading techniques.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tuned-com
//@version=4
strategy("TEMA/DEMA/HMA", overlay=true, pyramiding=0, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=1000000, commission_type=strategy.commission.percent, commission_value=0.1)
Tlength = input(8, title="TEMA Length", minval=1)
Dlength = input(43, title="DEMA Length", minval=1)
Hlength = input(52, title="Hull Length", minval=1)
Rlength = input(2, title="Hull Trend Test Length", minval=1)
- 1
