Contrarian Donchian Channel Touch Entry Strategy with Post-Stop Loss Pause and Trailing Stop Loss
Overview
The Contrarian Donchian Channel Touch Entry Strategy is a quantitative trading strategy based on the Donchian Channel indicator. It incorporates stop loss pause and trailing stop loss for risk management.
The strategy enters long/short positions when price touches the upper/lower band of Donchian Channel. Stop loss and take profit levels are set for each trade. After a stop loss hit, there would be a pause for a number of bars before taking a new trade in the same direction. During a trade, trailing stop loss is used to lock in profits.
Strategy Logic
The strategy uses 20-period Donchian Channel, consisting of Upper Band, Lower Band and Middle Line.
Entry Logic
Go long when price touches the lower band; go short when price touches the upper band.
A pause (e.g. 3 bars) is required after previous stop loss in the same direction to avoid chasing trends.
Stop Loss and Take Profit
For each trade, set a fixed percentage stop loss (e.g. 22%) and a dynamic take profit calculated based on risk-reward ratio (e.g. 2)
Trailing Stop Loss
Use a trailing stop loss during trades:
For long trades, if price crosses above middle line, adjust stop loss to the mid-point of entry price and middle line.
Vice versa for short positions crossing below middle line.
Advantages
-
Catch trending moves using Donchian Channel breakouts.
-
Contrarian touch entry aligns with trading against the trend idea.
-
Effective risk management with stop loss pause and trailing stop.
-
Clear and easy-to-implement rules.
Risks
-
Whipsaws on sideways markets for a trend-following system.
-
Fixed stop loss could be prone to getting stopped out prematurely.
-
Overly aggressive trailing stop adjustment could knock out profitable trades too early.
-
Parameter optimization is crucial.
Enhancement Opportunities
-
Optimize Donchian Channel lookback period for best parameters.
-
Incorporate position sizing rules e.g. reset pause count periodically.
-
Add filters using other indicators to avoid false breakouts.
-
Experiment with dynamic stop loss.
Summary
The Contrarian Donchian Channel Touch Entry Strategy integrates trend identification, risk management and more. With further parameter tuning and combinations with other models, it can achieve better robustness and profitability for experienced traders.
/*backtest
start: 2023-01-17 00:00:00
end: 2024-01-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Contrarian Donchian Channel Strategy - Touch Entry with Post-SL Pause and Trailing Stop", overlay=true, default_qty_value=0.01, default_qty_type=strategy.percent_of_equity)
// Inputs- 1

