Type/to search

MACD Dissipation and Multi Time Frame Moving Average Strategy

Cryptocurrency
Created: 2023-11-01 16:37:17
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy integrates the MACD indicator and multi time frame moving averages to form a dual directional trading strategy that utilizes both trend and trend reversal signals. The strategy can generate additional profits in trending markets while being able to capitalize on reversal opportunities.

Strategy Logic

  1. Use two groups of EMAs with different periods as multi time frame filters to determine long/short direction: 15min fast EMA above 1hr slow EMA as bull filter, 15min fast EMA below 1hr slow EMA as bear filter.

  2. Identify possible reversals when MACD forms divergences (histogram diverges from price).

  3. When bull filter is on, if bullish divergence spotted (price new high but MACD didn't), wait for MACD to cross above signal line and go long. When bear filter is on, if bearish divergence spotted, wait for MACD to cross below signal line and go short.

  4. Stop loss set dynamically based on highest high/lowest low price range. Take profit is a multiplier of stop loss.

  5. Close position when MACD histogram crosses 0 line in opposite direction.

Advantage Analysis

  1. Multi time frame EMA combo filters the major trend direction, avoiding counter trend trades.

  2. MACD divergences capture price reversal opportunities, suitable for reversal strategies.

  3. Dynamic trailing stop loss locks in profits and prevents runaway losses.

  4. Take profit based on stop loss distance gives expected payoff.

Risk Analysis

  1. EMA filters can give wrong direction during consolidation.

  2. Insufficient reverse magnitude after MACD divergence may cause losses.

  3. Improper stop loss distance setting may be too loose or too tight.

  4. Limited reverse room caps profits.

  5. Need to properly time reversal entry, too early or late can both cause losses.

Optimization Directions

  1. Test different EMA combinations for better trend judgement.

  2. Try more sensitive MACD parameter settings.

  3. Test different stop loss/take profit ratios.

  4. Add additional filters to avoid false reversals, e.g. higher time frame EMAs for global trend.

  5. Optimize reversal entry confirmation for more mature reversals.

Conclusion

This strategy utilizes trend filtering, reversal signals, dynamic stop/take profit management to trade with the trend and capitalize on reversals. Proper parameter tuning and optimizing filters adapts it to diverse market conditions, delivering steady profits while controlling risks. It has versatility and practical value as a typical example of integrating multi time frame analysis with indicators.

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

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © maxits
//@version=4
Strategy parameters
Strategy parameters
Start Time
Finish Time
Show Long Positions
Show Short Positions
Source
============ EMAS Properties ============
Fast EMA
Fast EMA Period
Slow EMA
Slow EMA Period
Enable a Third Ema filter?
Fast EMA Period
Slowest EMA
MACD TimeFrame (Optional)
============ MACD Properties ============ (Optional)
Fast Length
Sign Length
Sign Length
============ System Properties ============ (Optional)
Lookback period
Profit Multiplier based on Stop Loss
Short Stop Loss Percentage
Long Stop Loss Percentage
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)