
이 전략은 RSI 지표와 평평한 RSI 지표의 결합을 통해 가격 낮은 시점에 구매 기회를 찾습니다. RSI 지표가 혁신이 낮고 가격이 혁신이 낮지 않을 때, 다중 헤드 분류 신호로 간주됩니다. 평평한 RSI 지표의 추세 판단과 결합하면 전략의 효과를 높일 수 있습니다.
이 전략은 주로 RSI 지표의 반전 성질에 의존하며, 평평한 RSI 판단 경향과 결합하여, 가격이 압박을 받으면서 RSI가 초과할 때 구매한다. 정지 또는 정지 후 평정 위치.
RSI 변수를 조정하여 구매 시기를 최적화 할 수 있습니다. 중지 간격을 적절히 줄이고 중단 속도를 가속화 할 수 있습니다. 다른 지표와 결합하여 트렌드 위험을 판단하여 거짓 반전의 가능성을 줄일 수 있습니다.
더 많은 지표들을 조합하고 변수를 조정함으로써 전략적 거래의 효과를 더욱 높일 수 있습니다.
이 전략 전체는 RSI 역전 특성을 활용하는 전략 아이디어입니다. 쌍 RSI 지표 조합은 RSI 역전 효과를 충분히 발휘하면서도 지표 차이로 인한 불확실성을 증가시킵니다. 전체는 전형적인 지표 전략 아이디어입니다. 지속적인 테스트를 통해 지표 매개 변수의 적합성을 향상시킬 수 있으며, 더 많은 지표 판단을 조합하여 잘못된 판단의 가능성을 줄이고 전략의 튼튼함을 향상시킬 수 있습니다.
/*backtest
start: 2024-01-30 00:00:00
end: 2024-02-29 00:00:00
period: 1m
basePeriod: 1m
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/
// © BigBitsIO
//@version=4
strategy(title="RSI and Smoothed RSI Bull Div Strategy [BigBitsIO]", shorttitle="RSI and Smoothed RSI Bull Div Strategy [BigBitsIO]", overlay=true, pyramiding=1, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=.1, slippage=0)
TakeProfitPercent = input(3, title="Take Profit %", type=input.float, step=.25)
StopLossPercent = input(1.75, title="Stop Loss %", type=input.float, step=.25)
RSICurve = input(14, title="RSI Lookback Period", type=input.integer, step=1)
BuyBelowTargetPercent = input(0, title="Buy Below Lowest Low In RSI Divergence Lookback Target %", type=input.float, step=.05)
BuyBelowTargetSource = input(close, title="Source of Buy Below Target Price", type=input.source)
SRSICurve = input(10, title="Smoothed RSI Lookback Period", type=input.integer, step=1)
RSICurrentlyBelow = input(30, title="RSI Currently Below", type=input.integer, step=1)
RSIDivergenceLookback = input(25, title="RSI Divergence Lookback Period", type=input.integer, step=1)
RSILowestInDivergenceLookbackCurrentlyBelow = input(25, title="RSI Lowest In Divergence Lookback Currently Below", type=input.integer, step=1)
RSISellAbove = input(65, title="RSI Sell Above", type=input.integer, step=1)
MinimumSRSIDownTrend = input(3, title="Minimum SRSI Downtrend Length", type=input.integer, step=1)
SRSICurrentlyBelow = input(35, title="Smoothed RSI Currently Below", type=input.integer, step=1)
PlotTarget = input(false, title="Plot Target")
RSI = rsi(close, RSICurve)
SRSI = wma(2*wma(RSI, SRSICurve/2)-wma(RSI, SRSICurve), round(sqrt(SRSICurve))) // Hull moving average
SRSITrendDownLength = 0
if (SRSI < SRSI[1])
SRSITrendDownLength := SRSITrendDownLength[1] + 1
// Strategy Specific
ProfitTarget = (close * (TakeProfitPercent / 100)) / syminfo.mintick
LossTarget = (close * (StopLossPercent / 100)) / syminfo.mintick
BuyBelowTarget = BuyBelowTargetSource[(lowestbars(RSI, RSIDivergenceLookback)*-1)] - (BuyBelowTargetSource[(lowestbars(RSI, RSIDivergenceLookback)*-1)] * (BuyBelowTargetPercent / 100))
plot(PlotTarget ? BuyBelowTarget : na)
bool IsABuy = RSI < RSICurrentlyBelow and SRSI < SRSICurrentlyBelow and lowest(SRSI, RSIDivergenceLookback) < RSILowestInDivergenceLookbackCurrentlyBelow and BuyBelowTargetSource < BuyBelowTarget and SRSITrendDownLength >= MinimumSRSIDownTrend and RSI > lowest(RSI, RSIDivergenceLookback)
bool IsASell = RSI > RSISellAbove
if IsABuy
strategy.entry("Positive Trend", true) // buy by market
strategy.exit("Take Profit or Stop Loss", "Positive Trend", profit = ProfitTarget, loss = LossTarget)
if IsASell
strategy.close("Positive Trend")