Type/to search

Dual EMA Crossover Trend Following Strategy with ATR and ADX Filters

Cryptocurrency
Created: 2023-11-15 15:53:57
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy uses the classic dual EMA crossover system for trend following, with additional filters from the ATR and ADX indicators, to track strong trends and control risk during consolidations.

Strategy Logic

The strategy is mainly based on the following:

  1. Use a faster 8-period EMA and a slower 20-period EMA to generate crossover signals. EMAs themselves have trend-following properties.

  2. The ATR indicator reflects recent volatility. Normalizing ATR allows dynamic adjustment of EMA crossover filter conditions, lowering requirements during strong trends and raising during consolidations to control risk.

  3. The ADX indicator determines trend strength. An ADX reading above 30 suggests a strong trend, prompting timely stop loss.

  4. Combine with bull/bear trends to determine long/short entry timing. Go long on golden crosses in a bull market, and short on death crosses in a bear market.

  5. Volume filter to enter when volume expands.

  6. Use a simple USD index to determine USD strength, expanding stop and take profit range during strong USD.

  7. Use the SuperTrend indicator to determine overall market direction for additional long/short timing aid.

The strategy combines trend and oscillation indicators to dynamically adjust parameters, tracking trends while controlling risk.

Advantages of the Strategy

  1. The dual EMA system provides trend determination, with EMA smoothness filtering false breaks.

  2. ATR-normalized filters allow flexibility for different market environments.

  3. ADX and volume provide additional checks to avoid whipsaws during consolidations.

  4. Considering USD and SuperTrend improves decision accuracy on the macro trend.

  5. Risk management automatically adapts based on USD strength.

  6. Simple golden/dead cross signals and stop/take profit logic make it easy to implement and backtest.

Risks of the Strategy

  1. Dual EMAs lag in detecting trend turning points.

  2. Poor ATR parameter selection may be too aggressive or conservative.

  3. ADX parameters need optimization, improperly set high points could miss trends.

  4. USD and SuperTrend trend determination could be inaccurate.

  5. Stop loss too tight increases losses, too wide risks whipsaws.

Improvement Ideas

  1. Consider adding indicators like MACD for better turnover point detection.

  2. Optimize ATR parameters over more historical data.

  3. Test different ADX parameters and optimize high point thresholds.

  4. Add more variables for USD and market trend analysis.

  5. Calculate optimal stop loss percentage from backtest stats.

  6. Experiment with trailing or chandelier stops.

  7. Continue optimizing entry size and holding period.

Conclusion

This strategy integrates the classic dual EMA system with multiple auxiliary indicators, using parameterized optimization for a fairly robust trend following approach. It adapts flexibly to changing market environments, tracking trends while controlling risk. Further testing and optimization of stops and indicator parameters would improve results. The concepts are worth learning from and improving upon.

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

//@version=5
strategy("Refactored Advanced EMA Cross with Normalized ATR Filter, Controlling ADX", shorttitle="ALP V5", overlay=true)

// Initialize variables to track if a buy order has been placed and number of periods since the last buy
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)