
이 전략은 RSI 지표와 가격 돌파구를 결합하여, 특정 추세 아래 형성된 회전 범위에서 회전 기회를 찾고, 그 다음으로 단선 거래를 하고, 고효율의 단선 이윤을 추구한다.
따라서 이 전략은 여러 차원의 판단 논리를 통합하여 특정 추세와 돌파 기회에서 RSI 지표에서 생성 된 구매 신호를 사용하여 단선에서 이익을 얻는 순환 작업을 수행합니다. 시장의 단기간의 오버패스 반발과 오버 바이 회귀 기회를 효과적으로 잡을 수 있습니다.
이 전략은 RSI 지표를 사용하여 과매매 과매매의 단기 반전 기회를 판단하고, 가격 돌파구와 결합하여 단기 수익을 창출하는 순환 작업을 수행합니다. 단기 효율성을 추구하는 것이 특징이며, 작업은 간단하며, 위험이 제한되어 있으며, 단기 거래자가 특정 상황에서 사용하는 데 적합합니다. 전체적인 큰 추세를 판단하고, 파라미터를 최적화하는 데 주의를 기울여야합니다.
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 1h
basePeriod: 15m
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/
// © relevantLeader16058
//@version=4
strategy(shorttitle='RSI Classic Strategy',title='RSI Classic Strategy (by Coinrule)', overlay=true, initial_capital = 1000, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 30, commission_type=strategy.commission.percent, commission_value=0.1)
//Backtest dates
fromMonth = input(defval = 1, title = "From Month", type = input.integer, minval = 1, maxval = 12)
fromDay = input(defval = 1, title = "From Day", type = input.integer, minval = 1, maxval = 31)
fromYear = input(defval = 2020, title = "From Year", type = input.integer, minval = 1970)
thruMonth = input(defval = 1, title = "Thru Month", type = input.integer, minval = 1, maxval = 12)
thruDay = input(defval = 1, title = "Thru Day", type = input.integer, minval = 1, maxval = 31)
thruYear = input(defval = 2112, title = "Thru Year", type = input.integer, minval = 1970)
showDate = input(defval = true, title = "Show Date Range", type = input.bool)
start = timestamp(fromYear, fromMonth, fromDay, 00, 00) // backtest start window
finish = timestamp(thruYear, thruMonth, thruDay, 23, 59) // backtest finish window
window() => true
// RSI inputs and calculations
lengthRSI = 14
RSI = rsi(close, lengthRSI)
oversold= input(30)
overbought= input(60)
//Entry
strategy.entry(id="long", long = true, when = RSI< oversold and window())
//Exit
//RSI
strategy.close("long", when = RSI > overbought and window())