Type/to search

EMAC Exponential Moving Average Cross Optimized Strategy

Common strategy
Created: 2023-11-07 15:16:03
Last modified: 3 years ago
1
Follow
1797
Followers

img

Overview

The EMAC Exponential Moving Average Cross Optimized Strategy is an optimized version based on the basic EMAC strategy. It incorporates trend judgment, multiple moving average filtering, and stop loss/take profit exits, aiming to follow mid-to-long term trends.

Strategy Logic

  1. Judge recent trend direction: calculate the increase/decrease percentage of close price over past 26 weeks to determine uptrend, downtrend or sideways.

  2. Multiple moving average filter: calculate 10-period, 20-period, 34-period EMA and wait for them to cross above 50-period SMA to trigger buy signals.

  3. ATR stop loss: when entry signal appears, set stop loss at entry bar's low or high minus 2.5ATR.

  4. Trailing stop loss: gradually move up stop loss line as price rises.

  5. Take profit: when entry signal appears, set target at close price plus 3ATR.

  6. MA pullback exit: actively exit when price breaks back below 10-day EMA.

Advantages

  1. Multiple MA filter increases signal reliability, avoiding false breakouts.

  2. ATR stop loss allows reasonable stop distance based on market volatility.

  3. Trailing stop locks in some profits as it moves up.

  4. Reasonable profit target avoids giving back too much profit.

  5. MA pullback exit allows timely exit when trend reverses.

Risks and Solutions

  1. EMA crosses may whipsaw in sideways markets, causing consecutive losses. Can increase EMA periods or add MA crossover filter.

  2. Large ATR values can cause stops too far away, increasing loss risk. Can optimize with ATR moving averages or reduction coefficients.

  3. Overnight gap risk not considered. Can add logic to avoid signals during non-trading periods.

  4. Market regime not considered. Can add market trend filter as a strategy switch.

Optimization Directions

  1. Test EMA combinations to find optimal lengths for different products.

  2. Test ATR moving averages or reduction coefficients to optimize stop distance.

  3. Add logic to avoid signals during non-trading periods.

  4. Add market trend filter as a strategy switch when market is unfavorable.

  5. Backtest parameter combinations over many years to find optimal stability.

Summary

The EMAC Exponential Moving Average Cross Optimized Strategy combines trend judgment, multiple MA filtering and dynamic stops to follow mid-to-long term trends. Compared to the original version it has undergone parameter optimization to improve real-trading performance. But further optimizations and enhancements are needed by adding more logic to handle different market situations, reducing risks and improving stability and profitability.

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

//@version=4
//Author = Dustin Drummond https://www.tradingview.com/u/Dustin_D_RLT/
//Strategy based in part on original 10ema Basic Swing Trade Strategy by Matt Delong: https://www.tradingview.com/u/MattDeLong/
//Link to original 10ema Basic Swing Trade Strategy: https://www.tradingview.com/script/8yhGnGCM-10ema-Basic-Swing-Trade-Strategy/
Strategy parameters
Strategy parameters
Start Year
R Static or Percent
R Size Static
R Size Percent
Trend Timeframe
# of Bars for Trend
Trend Growth %
Trend Required
MA1 Period
MA1 Type
MA2 Period
MA2 Type
MA3 Period
MA3 Type
MA4 Period
MA4 Type
MA5 Period
MA5 Type
Enable Short MA Cross Filter
Enable Long MA Cross Filter
Stop ATR Multiple
Target Multiple
Enable ATR Stops
Enable Stops
Enable Targets
Enable Early Exit
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)