Type/to search

Multiple Moving Average Trading Strategy

Common strategy
Created: 2024-02-29 14:32:29
Last modified: 2 years ago
1
Follow
1802
Followers

img

Overview

The strategy is named "Multiple Moving Average Trading Strategy". It utilizes the crossover of the MACD indicator and multiple moving averages as trading signals, with the assistance of the ZLSMA indicator to determine the trend, and sets the profit-taking and stop-loss exiting logic to realize automated trading.

Strategy Principle

  1. Calculate the fast line, slow line and MACD histogram of the MACD indicator. Set long when seeing golden cross and short when seeing death cross.

  2. Calculate the 5-day, 25-day, 45-day and 100-day moving averages. The longer the moving average, the stronger the trend sustainability it represents.

  3. Calculate the distance between the two groups of moving averages. If the distance exceeds a certain threshold, it means the divergence of the moving averages, which can be set as trading signals.

  4. Calculate the ZLSMA indicator, representing the mid-to-long term trend direction of the price. Trend reversals can be determined when ZLSMA forms turning points.

  5. Combine the MACD crossover, moving average divergence signals and ZLSMA trend judgment to set long and short trading strategies.

  6. Set take profit and stop loss points to realize automated exiting logic.

Advantage Analysis

  1. Multi-filter signals improve strategy efficiency. MACD and moving average divergence signals can verify each other to avoid false breakouts.

  2. ZLSMA assists in determining the medium and long term trend direction to avoid trading against the trend.

  3. Automated exiting by setting profit-taking and stop-loss points reduces human intervention frequency.

Risk Analysis

  1. Improper parameter settings may lead to over-trading or missing orders. Parameters need to be optimized for best results.

  2. Fixed profit-taking and stop-loss points limit profit potential or increase losses. Dynamic stops based on ATR can be considered.

  3. Moving average strategies work poorly in range-bound markets. Other indicators or manual intervention may be needed.

Optimization Directions

  1. Optimize combinations of moving average parameters by testing different length moving averages.

  2. Test adding other indicators such as KDJ and BOLL to determine entry and exit points.

  3. Try dynamic stop loss strategies based on volatility measures.

  4. Add machine learning models to find optimal parameters automatically.

Conclusion

This strategy integrates MACD, multiple moving averages and ZLSMA trend determination to achieve automated trading. By filtering with multiple signals, strategy stability is improved; by setting exiting logic, risks are reduced. There is certain practical value for real trading. Subsequent parameter optimization, indicator expansion, dynamic stops etc. can further improve strategy performance.

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

//@version=5
strategy("MACD ZLSMA_izumi⑤(4つの条件、MCDがクロスしてたら)", overlay=true)

fast_length = input(title = "Fast Length", defval = 12)
Strategy parameters
Strategy parameters
Fast Length
Slow Length
Source
Signal Smoothing
Oscillator MA Type
Signal Line MA Type
ma期間5
ma期間25
ma期間45
ma期間100
ema同士の乖離値
Length
offset
Source
ロング利確pips
ショート利確pips
ロング損切pips
ショート損切pips
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)