
이것은 내부 강도 지표 (Internal Bar Strength, IBS) 를 기반으로 한 하위 거래 전략으로, 거래 기회를 식별하기 위해 주로 종결 가격의 일일 가격 범위 내의 위치를 모니터링합니다. IBS 지표가 과매매 상태를 표시 할 때, 전략은 특정 조건이 충족되면 하위 포지션을 열고, IBS가 과매 수준에 도달했을 때 포지션을 청산합니다. 이 전략은 주식 및 ETF 시장의 일일 라인 레벨 거래를 위해 특별히 설계되었습니다.
이 전략의 핵심은 IBS 지표를 통해 종결 가격의 하루의 높고 낮은 범위의 위치를 측정하는 것입니다. IBS의 계산 공식은 다음과 같습니다: ((종결 가격-최저 가격) / ((최고 가격-최저 가격) ◎ IBS 값이 0.9보다 크면 종결 가격이 당일 최고점에 가까워지는 것을 나타내는 오버 바이 상태라고 간주되며, IBS 값이 0.3보다 작으면 종결 가격이 당일 최저점에 가까워지는 것을 나타내는 오버 세 상태라고 간주됩니다.
이것은 평균 회귀 사상에 기반한 하위 거래 전략이며, IBS 지표를 통해 가격 과매매 후의 회귀 기회를 포착한다. 전략 설계는 간결하고, 동작은 명확하지만, 특정 거래 품종과 시장 환경에 따라 여전히 최적화가 필요하다. 실물 거래 전에 다양한 변수 조합을 충분히 테스트하고, 다른 기술 지표와 결합하여 전략의 안정성을 높이는 것이 좋습니다. 동시에, 위험 통제에 주의를 기울여야하며, 특히 강인한 시장에서 적용된다.
/*backtest
start: 2024-06-01 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Botnet101
//@version=6
strategy('[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy', overlay = false, default_qty_value = 100, default_qty_type = strategy.percent_of_equity, margin_long = 5, margin_short = 5, process_orders_on_close = true, precision = 4)
//#region INPUTS SECTION
// ============================================
//#region IBS Thresholds
upperThresholdInput = input.float(defval = 0.9, title = 'Upper Threshold', step = 0.1, maxval=1, group = 'IBS Settings')
lowerThresholdInput = input.float(defval = 0.3, title = 'Lower Threshold', step = 0.1, minval=0, group = 'IBS Settings')
//#endregion
//#endregion
//#region IBS CALCULATION
// ============================================
// IBS Value Calculation
// ============================================
internalBarStrength = (close - low) / (high - low)
//#endregion
//#region TRADING CONDITIONS
// ============================================
// Entry/Exit Logic
// ============================================
shortCondition = internalBarStrength >= upperThresholdInput and close>high[1]
exitCondition = internalBarStrength <= lowerThresholdInput
//#endregion
//#region STRATEGY EXECUTION
// ============================================
// Order Management
// ============================================
if shortCondition
strategy.entry('short', strategy.short)
if exitCondition
strategy.close_all()
//#endregion
//#region PLOTTING
// ============================================
// Visual Components
// ============================================
plot(internalBarStrength, color = color.white, title = "IBS Value")
plot(upperThresholdInput, color = color.yellow, title = "Upper Threshold")
plot(lowerThresholdInput, color = color.yellow, title = "Lower Threshold")
//#endregion