Type/to search

Dual Moving Average Strategy Combined with Stochastic Indicator

Common strategy
Created: 2024-01-12 11:16:52
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This article introduces a quantitative trading strategy that combines the dual moving average strategy and stochastic indicator. The strategy utilizes the trend following capability of moving averages and the overbought-oversold characteristic of stochastic to generate trading signals.

Strategy Principle

The strategy consists of two parts:

  1. Dual Moving Average Strategy

    Using fast and slow moving averages to generate golden cross buy signals and dead cross sell signals. The fast moving average can capture price trend changes faster, while the slow one filters out fake signals.

  2. Stochastic Indicator

    Utilizing the oscillation feature of stochastic to identify overbought and oversold situations. A stochastic higher than the slow line indicates an overbought signal, while a stochastic lower than the slow line indicates an oversold signal.

The signals from both parts are combined to form the final trading signals. The dual moving average strategy tracks the main trend, while stochastic assists in avoiding unfavorable market conditions.

Advantage Analysis

  • Combines the advantages of dual moving averages and stochastic, more stable.
  • Moving averages for trend following, stochastic for confirmation, good effect.
  • Customizable parameters adapt to different market conditions.

Risk Analysis

  • Dual moving averages can easily generate false signals.
  • Improper stochastic parameter settings may miss trends.
  • Need to adjust parameters to adapt to market changes.

Risks can be reduced by optimizing parameter combinations and adding stop loss to control losses.

Optimization Directions

The strategy can be optimized in the following aspects:

  1. Test the effects of different moving average parameters on the strategy.
  2. Test the effects of different stochastic parameters on the stability of the strategy.
  3. Add trend filtering indicators to improve win rate.
  4. Build a dynamic trailing stop loss mechanism to control losses.

Summary

This strategy combines the advantages of dual moving averages and stochastic. While tracking the main market trend, it avoids unfavorable reversals. Better strategy results can be obtained through parameter optimization. Adding stops and trend filters can make the strategy more robust.

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

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 24/11/2020
// This is combo strategies for get a cumulative signal. 
Strategy parameters
Strategy parameters
Length
KSmoothing
DLength
Level
Length_HLB
PercentShift
Trade reverse
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)