Configurable Dual-direction Supertrend Strategy
This strategy is named “Configurable Dual-direction Supertrend Strategy”. It uses the Supertrend trailing stop mechanism to identify price trends, and allows separate parameter configuration for long and short trades, enabling precise trend following.
The Supertrend calculation is: using ATR multiplied by a coefficient to build price channels. The upper band is the long stop loss and the lower band is the short stop loss. Price breaking the channel generates trade signals.
The innovation is the independent parameter configuration for long and short:
-
Supertrend parameters like ATR period and coefficient can be set separately.
-
Maximum holding period can also be configured independently to adjust profit targets.
-
Stop loss methods (fixed percentage or ATR trailing) can also be set differently.
This allows only-long, only-short or dual-direction trading to better fit specific market conditions.
The advantages are the intuitive Supertrend mechanism and abundant configurable combinations. But Supertrend alone is prone to breaches and needs confirmation. Parameter optimization is also crucial.
In summary, the configurable dual Supertrend strategy improves trend trading precision, while keeping the core idea simple for practical application.
/*backtest
start: 2023-01-01 00:00:00
end: 2023-09-12 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
args: [["v_input_8",true],["v_input_11",true]]
*/
//@version=4
strategy("Super Trend Daily 2.0 BF 🚀", overlay=true, precision=2, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.075)
- 1
