Type/to search

Dual EMA Golden Cross Trend Tracking Strategy

Cryptocurrency
Created: 2023-11-21 15:10:54
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy calculates fast EMA line and slow EMA line and compares the size relationship between the two EMAs to determine the trend direction of the market. It belongs to a simple trend tracking strategy. When the fast EMA crosses above the slow EMA, go long. When the fast EMA crosses below the slow EMA, go short. It is a typical dual EMA golden cross strategy.

Strategy Logic

The core indicators of this strategy are fast EMA and slow EMA. The fast EMA length is set to 21 periods and the slow EMA length is set to 55 periods. The fast EMA can respond to price changes faster, reflecting the recent short-term trend; the slow EMA responds more slowly to price changes, filtering out some noise and reflecting the medium-to-long term trend.

When the fast EMA crosses above the slow EMA, it indicates that the short-term trend has turned upward and the medium-to-long term trend may have reversed, which is a signal to go long. When the fast EMA crosses below the slow EMA, it indicates that the short-term trend has turned downward and the medium-to-long term trend may have reversed, which is a signal to go short.

By comparing fast and slow EMAs, it captures trend reversal points on two timescales, short-term and medium-to-long term, which is a typical trend tracking strategy.

Advantages

  1. Simple and clear logic, easy to understand and implement
  2. Flexible parameter tuning, fast and slow EMA periods can be customized
  3. Configurable ATR stop loss and take profit for controllable risks

Risks

  1. Inappropriate timing of EMA crossovers, risk of missing best entry point
  2. Frequent invalid signals during market consolidation, causing losses
  3. Improper ATR parameter setting, leading to too loose or too aggressive stops

Risk Management:

  1. Optimize EMA fast and slow line parameters to find optimal combinations
  2. Add filtering mechanisms to avoid invalid signals from market consolidation
  3. Test and optimize ATR parameters to ensure reasonable stop loss and take profit

Enhancement Areas

  1. Test stability of different EMA period parameters based on statistical methods
  2. Add filtering conditions combined with other indicators to avoid invalid signals
  3. Optimize ATR parameters to get best stop loss/take profit ratio

Summary

This strategy judges trend based on EMA crossovers, which is simple and clear to implement. With ATR-based stops, risks are controllable. Further improvements on stability and profitability can be made through parameter optimization and filtering conditions.

Source
Pine
/*backtest
start: 2023-10-21 00:00:00
end: 2023-11-20 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title = "VP Backtester", overlay=false)

Strategy parameters
Strategy parameters
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest End Year
Backtest End Month
Backtest End Day
Fixed Perc stop
Percentage for fixed stop
ATR Based stop
ATR Length for stop
ATR Multiplier for stoploss
ATR Multiplier for profit
Trade the Asian Session
Trade the European Session
Trade the US session
End of Session Close Out?
fastInput
slowInput
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)