Type/to search

Dual Moving Average Stochastic Strategy

Common strategy
Created: 2024-01-29 11:54:10
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

The Dual Moving Average Stochastic strategy attempts to identify trading opportunities using a combination of moving average indicators and the stochastic oscillator. It generates trade signals when the fast EMA crosses above or below the slow SMA, while also using the stochastic %K value to filter out signals when the market is overextended.

Strategy Logic

The strategy is primarily based on two technical indicators:

  1. Moving Averages: It computes a fast EMA, slow SMA and slow VWMA using different parameters, and generates trade signals when the fast EMA crosses the slow SMA.

  2. Stochastic Oscillator: It calculates the %K value and considers the market overbought or oversold when %K crosses preset upper or lower threshold levels, using this to filter some of the moving average signals.

Specifically, the logic for signal generation is:

  1. When the fast EMA crosses above the slow SMA, and %K is below the oversold level, go long. When the fast EMA crosses below the slow SMA, and %K is above the overbought level, go short.

  2. For existing long positions, close when %K re-enters the overbought zone or price breaches the stop loss. For short positions, close when %K re-enters the oversold zone or price breaches the stop loss.

By combining moving averages and the stochastic oscillator, the strategy attempts to identify high probability moving average signal points to enter trades, while using the stochastic to filter out some of the false signals.

Advantage Analysis

The main advantages of this strategy are:

  1. Combining multiple technical indicators provides more comprehensive judgment versus using a single indicator.
  2. Filtering with the stochastic oscillator avoids some false signals.
  3. Using multiple moving averages with mixed parameters allows for more robust signals.
  4. Incorporates a stop loss mechanism to control single trade loss.

Risk Analysis

There are also some risks:

  1. Moving averages can generate many uncertain signals resulting in more false entries; limited stop loss capability.
  2. Stochastic oscillator may also produce incorrect signals on its own.
  3. Parameter settings require optimization (e.g. overbought/oversold levels, moving average periods) otherwise performance impact.
  4. Lack of fundamental analysis.

Mitigations:

  1. Optimize parameters to find best combination of indicator settings.
  2. Use smaller position sizing, scale in.
  3. Incorporate fundamental analysis to avoid events.

Enhancement Opportunities

The main optimization opportunities are:

  1. Test and optimize moving average parameters to find optimum.
  2. Test stochastic parameters like overbought/oversold zones for optimum settings.
  3. Incorporate additional indicators like volume or volatility for richer entry logic.
  4. Enhance stop loss methodology e.g. trailing stops to lower risk.
  5. Improve money management such as dynamic position sizing based on ATR.
  6. Avoid risk-off events using VIX etc.

Conclusion

The Dual Moving Average Stochastic Strategy utilizes a blend of moving averages and the stochastic oscillator to design a robust trend following system, but has some enhancement opportunities around parameters, stops etc. Further refinements like additional indicators and optimizations can potentially deliver more consistent alpha.

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

//@version=4
strategy("TVIX MEAN REV V2 TREND", overlay=true)
length = input(16, minval=1)
OverBought = input(80)
Strategy parameters
Strategy parameters
length
OverBought
OverSold
TradeLong
TradeShort
OverBoughtClose
OverSoldClose
trail_points
Fast EMA Source
Fast EMA Period
Slow SMA Source
Slow SMA Period
Slower SMA Source
Slower SMA Period
ATR Days Lookback
ATR Modifier
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)