The STARC Channel Backtest Strategy is a quantitative trading strategy based on the STARC indicator. The strategy constructs the upper and lower STARC channels to generate breakout buy and sell trading signals. It also incorporates long and short position switching mechanisms to adapt to different market environments.
The core of the STARC Channel Backtest Strategy is the STARC indicator, which includes:
It generates a buy signal when the closing price breaks through the upper band, and a sell signal when the closing price breaks through the lower band.
The strategy calculates the upper and lower rails of the STARC channel daily and judges if the closing price breaks through them to generate trading signals. It also sets a reverse parameter to switch between long and short positions to adapt to different market conditions.
The STARC Channel Backtest Strategy has the following advantages:
The STARC Channel Backtest Strategy also has some risks:
The following measures should be taken to mitigate risks:
The main optimization directions for the STARC Channel Backtest Strategy include:
These optimization directions can improve the strategy’s return and stability while controlling risks.
The overall effect of the STARC Channel Backtest Strategy is good. It implements medium-long term breakout trading based on the STARC indicator. The advantage of the strategy is using the STARC channel to generate stable trading signals, while setting reverse mechanisms to adapt to market changes. We also need to mitigate risks by setting stop losses and optimizing parameters to make the strategy more stable and efficient. In general, this strategy is an effective tool for medium-long term breakout trading.
/*backtest start: 2023-11-04 00:00:00 end: 2023-12-04 00:00:00 period: 2h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 //////////////////////////////////////////////////////////// // Copyright by HPotter v1.0 23/04/2018 // A type of technical indicator that is created by plotting two bands around // a short-term simple moving average (SMA) of an underlying asset's price. // The upper band is created by adding a value of the average true range // (ATR) - a popular indicator used by technical traders - to the moving average. // The lower band is created by subtracting a value of the ATR from the SMA. // STARC is an acronym for Stoller Average Range Channels. The indicator is // named after its creator, Manning Stoller. // // You can change long to short in the Input Settings // WARNING: // - For purpose educate only // - This script to change bars colors. //////////////////////////////////////////////////////////// strategy(title="STARC Bands Backtest", overlay = true) LengthMA = input(5, minval=1) LengthATR = input(15, minval=1) K = input(1.33, minval=0.01, step = 0.01) reverse = input(false, title="Trade reverse") xMA = sma(close, LengthMA) xATR = atr(LengthATR) xSTARCBandUp = xMA + xATR * K xSTARCBandDn = xMA - xATR * K pos = iff(close > xSTARCBandUp, 1, iff(close < xSTARCBandDn, -1, nz(pos[1], 0))) possig = iff(reverse and pos == 1, -1, iff(reverse and pos == -1, 1, pos)) if (possig == 1) strategy.entry("Long", strategy.long) if (possig == -1) strategy.entry("Short", strategy.short) barcolor(possig == -1 ? red: possig == 1 ? green : blue ) plot(xMA, color=blue, title="MA") plot(xSTARCBandUp, color = green, title="UpBand") plot(xSTARCBandDn, color=red, title="DnBand")