Type/to search

Triple Moving Average Combined with MACD Quantitative Strategy

Common strategy
Created: 2024-01-17 16:54:15
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy develops a relatively stable and reliable quantitative trading strategy by combining the use of triple moving average indicator and MACD indicator. It aims to capture possible future trends and is particularly suitable for medium and long term holdings.

Strategy Principle

The strategy is mainly based on the combination of triple moving average and MACD indicator.

Firstly, the strategy uses triple exponential moving averages with lengths of 3, 7 and 2 respectively. These three moving averages construct a fast to slow moving average system to determine the direction of future trends. When the short-term moving average crosses over the longer-term moving average, it is a long signal; when the short-term moving average crosses below the longer-term moving average, it is a short signal.

Secondly, the strategy also uses MACD indicator with parameters of 3 and 7 simultaneously. When MACD main line crosses over signal line, it is long signal, and when it crosses below, it is short signal.

By combining the use of dual indicators, it can avoid multiple false signals caused by a single indicator, thereby improving the stability of the strategy.

Advantages of the Strategy

  1. Improved signal quality by using dual indicator filtering
  2. Parameters have been tested and optimized many times, stable and reliable
  3. The triple moving average system can effectively filter market noise and determine future trends
  4. MACD indicator parameters are set faster to quickly capture short term opportunities

Risks of the Strategy

  1. There are certain risks of drawdown and consecutive losses
  2. When the market has no obvious trend, there will be more false trades in this strategy
  3. MACD indicator is prone to generating false signals and needs to be combined with moving average indicators

Solutions:

  1. Adopt appropriate stop loss strategy to control maximum drawdown
  2. Reduce trading frequency when market state is clearly trendless
  3. Optimize MACD parameters and use in combination with other indicators

Directions for Strategy Optimization

  1. Test and optimize parameters of moving averages and MACD to find the best combination
  2. Increase auxiliary indicators like KDJ and VRSI to avoid false signals
  3. Introduce machine learning models to judge market state and achieve dynamic adjustment
  4. Combine with stop loss strategies and set optimal stop loss points

Summary

This strategy achieves stable trend capturing through the combination of moving averages and MACD. Its advantage lies in the combination use of indicators, which can effectively reduce false signals and obtain better strategy performance. Next steps to further improve the strategy include introducing parameters optimization, stop loss strategies, dynamic adjustment etc, making it an effective tool to find medium and long term opportunities.

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

//@version=3
strategy("Matt's MACD Algo v1", shorttitle="Matt's MACD Algo v1", overlay=true, pyramiding = 0, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, initial_capital=7000, calc_on_order_fills = true, commission_type=strategy.commission.percent, commission_value=0, currency = currency.USD)
//study("MFI Fresh", shorttitle="MFI Fresh", overlay=true)
Strategy parameters
Strategy parameters
Trailing Stop in cents
From Month
From Day
From Year
To Month
To Day
To Year
Enable Bar Color?
Enable Moving Averages?
Enable Background Color?
Enable Bolinger Bands?
Enable Keltner Channel?
R_length
%R Overbought
%R Oversold
RSI Length
RSI Overbought
RSI Oversold
cci_length
Source
MFI Length
MFI Overbought
MFI Oversold
Very slow SMA
MACD source
MACD Fast Length
MACD Fast Length #2
MACD Slow Length
MACD Slow Length #2
Signal Smoothing
Signal Smoothing
Signal Smoothing #2
Signal Smoothing #2
MACD % Threshold
bb_length
bb_mult
KC_useTrueRange
KC_length
KC_mult
Source
Resolution
Resolution
Resolution
Resolution
start
increment
maximum
v_input_48
v_input_49
v_input_50
v_input_51
v_input_52
Conversion Line Periods
Base Line Periods
Lagging Span 2 Periods
Displacement
Length
Source
v_input_59
v_input_60
v_input_61
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)