Type/to search

Bitcoin and Gold Double Gap Strategy

Common strategy
Created: 2024-01-23 15:28:56
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

The Double Gap strategy is a quantitative strategy used for short-term trading of Bitcoin and gold. It combines moving averages, Bollinger Bands and ATR stops to identify breakout signals and manage risk.

Strategy Logic

The Double Gap strategy uses fast EMA and slow EMA crossovers to determine trend direction. A buy signal is generated when the fast EMA crosses above the slow EMA, and a sell signal is generated when the fast EMA crosses below the slow EMA. To avoid false breakouts, the strategy requires the crossover to happen near the upper or middle Bollinger Bands. This is where the name "Double Gap" comes from.

Specifically, to determine a buy signal, both of the following conditions need to be met: 1) The fast EMA crosses above the slow EMA; 2) The close price is near or below the upper or middle Bollinger Bands. Judging the sell signal is similar. It requires the fast EMA to cross below the slow EMA and be near the lower or middle Bollinger Bands.

In addition, the Double Gap strategy uses the ATR indicator to calculate a dynamic stop loss to control the risk of each trade. The specific stop level is the lowest low of the most recent two bars minus N times the ATR.

Advantages

  • Identifies high probability breakouts using dual filters
  • Fast EMA crossover judges main trend, Bollinger Bands filter false breakouts
  • Dynamic ATR stop effectively controls single trade risks
  • Suitable for short-term trading of high volatility products like BTC

Risks

  • Improper fast and slow EMA parameters may produce excessive false signals
  • Inappropriate Bollinger Bands parameters will also greatly reduce filtering effectiveness
  • Stop loss set too tight increases probability of it being triggered
  • High trading frequency required, not suitable for small accounts

Optimization

The Double Gap strategy can be optimized from the following aspects:

  1. Optimize moving average parameters to find best fast and slow EMA combinations
  2. Optimize Bollinger Bands parameters to reduce false breakout rates
  3. Adjust ATR stop multiplier according to different products and market regimes
  4. Add re-entry signal after stop out
  5. Combine with other indicators like RSI, KD etc as confirmation

Conclusion

The Double Gap strategy effectively identifies short-term opportunities using both trend following and breakout filtering. With dynamic stop loss management, it is well suited for short-term trading of high volatility digital currencies and precious metals. Further improvements in stability and profitability can be achieved through parameter and logic optimization.

Source
Pine
/*backtest
start: 2023-01-16 00:00:00
end: 2024-01-22 00:00:00
period: 1d
basePeriod: 1h
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/
// © singhak8757

//@version=5
Strategy parameters
Strategy parameters
Fast EMA Length
Slow EMA Length
Bollinger Band Length
Bollinger Band Multiplier
Stop Loss Multiplier
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)