Type/to search

Dual Channel Donchian Breakout Strategy

Common strategy
Created: 2023-12-26 10:18:51
Last modified: 3 years ago
1
Follow
1802
Followers

img

This strategy is based on the Donchian Channel indicator to implement trading signals on upper and lower band breakouts.

Strategy Logic

The strategy calculates upper and lower bands with different parameters to generate buy and sell signals respectively.

Upper Band Formula: Upper = Highest(length1)
Lower Band Formula: Lower = Lowest(length2)
Mid Line Formula: Mid Line = (Upper + Lower) / 2

When close price breaks above upper band, a buy signal is generated. When close price breaks below lower band, a sell signal is generated.

The advantage of this strategy is the flexibility to customize upper and lower band parameters for more flexible trading rules.

Advantages

  1. Customizable upper and lower band parameters for independent long and short control.

  2. Mid line indicator shows average position of bands for clearer breakout judgment.

  3. Donchian Channel has trend following characteristic to catch trend opportunities.

  4. Simple logic and easy to implement.

Risks

  1. Vulnerable to false breakouts, needs filter from other indicators.

  2. Unable to detect trend divergence, requires manual or other indicator combination.

  3. Improper parameter tuning leads to over-aggressiveness or over-conservativeness.

Enhancement Directions

  1. Incorporate moving averages etc. to filter false breakouts.

  2. Add volatility measures to quantify true breakout probability.

  3. Dynamically adjust upper and lower band parameters for adaptive trading rules.

Conclusion

This strategy implements flexible breakout trading via dual-band Donchian Channel. Simple logic but contains certain false breakout probabilities. Can be improved by parameter tuning, filters and supplementary indicators.

Source
Pine
/*backtest
start: 2022-12-19 00:00:00
end: 2023-12-25 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//Modified Donchian Channel with separate adjustments for upper and lower levels, with offset
// Strategy to buy on break upper Donchian and sell on lower Donchian
strategy("Donchian Backtest", overlay=true)
Strategy parameters
Strategy parameters
Upper Channel
Lower Channel
Offset Bars
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)