Type/to search

Long Only Triple EMA Golden Cross Trading Strategy

Cryptocurrency
Created: 2023-09-26 16:23:53
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy generates trading signals based on the golden cross and death cross of three EMA lines with different periods to take advantage of each EMA's strengths and achieve better trading performance.

Strategy Logic

The strategy calculates three EMA lines with periods of 8, 50 and 200, and generates signals when the faster EMA crosses above or below the slower EMA. The logic is:

  1. Calculate the 8-period, 50-period and 200-period EMA lines.

  2. Go long when the 8-period EMA crosses above the 50-period EMA (golden cross), close position when the 50-period EMA crosses below the 8-period EMA (death cross).

  3. Optionally only go long when the price is above the 200-period EMA to avoid whipsaws.

  4. An optional profit-taking EMA line can be set to close positions when the price crosses below it.

The fast EMA identifies bottoms, the medium EMA determines trend, and the slow EMA filters out noise. Together they identify trend changes while maintaining decent trading frequency.

Advantages

  1. The triple EMAs effectively determine trends and capitalize on individual strengths. The 8-period EMA catches short bottoms, 50-period EMA determines mid-term trend, and 200-period EMA filters out noise.

  2. Only going long above 200-period EMA avoids whipsaws.

  3. Customizable profit-taking EMA sets reasonable profit targets.

  4. Visual customizations like bar colors and EMA plotting improve flexibility.

  5. Simple golden/death cross logic is easy to understand.

Risks and Mitigations

  1. EMA lags may cause missed entry timing. Shorten EMA periods or combine with indicators like MACD.

  2. Whipsaws may generate bad signals. Use longer EMAs to filter, or add conditions.

  3. Fixed profit target is not adaptive. Use dynamic exits based on ATR etc.

  4. No stops means unlimited risk. Add trailing or fixed-value stops.

Enhancement Opportunities

  1. Optimize EMA periods for best parameters.

  2. Add indicators like MACD for timing.

  3. Implement dynamic profit-taking based on volatility.

  4. Add stop-loss logic, trailing or fixed value.

  5. Improve entry conditions, e.g. volume filters.

Conclusion

This strategy capitalizes on EMA's trend filtering to identify high-probability moves. Optimizing exits, adding indicators and filters can improve performance. Overall it is simple and practical for EMA-based trend following.

Source
Pine
/*backtest
start: 2023-09-18 00:00:00
end: 2023-09-20 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
strategy("Long only EMA CROSS 8/50/200 Backtest", shorttitle="Golden Cross Tri EMA", overlay=true)

// EMA 8/50/200 Cross TEST
Strategy parameters
Strategy parameters
Enable Bar Color?
Show 8 EMA
Show 50 EMA
Show 200 EMA
Show profit level EMA
Long only above EMA200
v_input_7
v_input_8
v_input_9
v_input_10
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)