
이 전략은 하루 내의 변동성 지표 IBS와 주위선 고점을 기반으로 한 간단한 SP500 선물 거래 전략이다. 그것은 월요일 상장할 때만 거래 신호를 발산하고, IBS가 0.5보다 낮고 지난 금요일 상장 가격보다 낮은 가격의 조건을 사용하여 진입 시기를 판단한다. 그 후 5 거래일 후에 평정상황으로 퇴출한다.
이 전략은 두 가지 지표에 기초하여 판단됩니다.
IBS - 하루 내의 변동성 지표, 당일 변동성이 충분히 낮은지 판단하기 위해 사용한다. 계산 방법은: ((폐쇄 가격 - 최저 가격) / (최고 가격 - 최저 가격) 이다. IBS가 0.5보다 낮으면 변동성이 낮아 입시에 적합하다고 본다.
회선 고위점 - 지난 금요일의 종결 가격을 기준 고위점으로 사용한다. 현재 월요일 종결 가격이 지난 금요일 종결 가격보다 낮다면, 전환이 형성되어 거래 기회가 발생할 수 있다.
입시 조건은: 월요일 + IBS < 0.5 + 폐가 < 지난 금요일 폐가
출구 조건은: 5 거래일 후 폐장 또는 다음 날 개장 즉시 최고점을 반납한다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
더 많은 기술 지표의 확인이 추가되고, 신호의 정확도가 향상된다. 예를 들어, 단기 트렌드, 지지 압력 레벨, 거래량과 같은 지표의 판단 논리 강화.
동적 출구 조건을 설정하고, 실시간 변동에 따라 스톱로스 또는 스톱 스폰 가격을 설정한다. 고정 시간으로 인한 추가 손실을 피한다.
전략 거래 기간을 확장하여 월요일에만 국한되지 않습니다. 다른 거래 날의 진입 조건을 합리적으로 설정하여 신호 커버리지를 향상시킵니다.
리스크 관리 모듈을 도입하여, 스톱 전략 제어 철회 사용. 부동 스톱, 추적 스톱 등의 방법을 설정할 수 있다.
이 전략은 전반적으로 일일 지표 IBS 및 회선 구조 판단에 기반한 간단한 단선 거래 전략이다. 전략 아이디어는 명확하고, 구현이 간단하며, 위험을 쉽게 제어한다. 그러나 또한 신호 오해의 일정한 확률과 잠재적인 철회 과대 문제가 있다. 미래 최적화 공간은 더 많은 기술 지표 판단을 추가하고, 동적 상쇄 메커니즘을 설정하는 것이다. 지속적인 테스트 및 최적화를 통해 전략의 승률과 수익성을 점진적으로 향상시킨다.
/*backtest
start: 2023-12-15 00:00:00
end: 2024-01-14 00:00:00
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/
// © hobbiecode
// Today is Monday.
// The close must be lower than the close on Friday.
// The IBS must be below 0.5.
// If 1-3 are true, then enter at the close.
// Sell 5 trading days later (at the close).
//@version=5
strategy("Hobbiecode - SP500 IBS + Higher", overlay=true)
// Check if it's Monday
isMonday = dayofweek(time) == dayofweek.monday
// Calculate the IBS (Intraday Breadth Strength) indicator
ibs = (close - low) / (high - low)
// Calculate the close on the previous Friday
prevFridayClose = request.security(syminfo.tickerid, "W", close[1])
// Entry conditions
enterCondition = isMonday and close < prevFridayClose and ibs < 0.5 and strategy.position_size < 1
// Exit conditions
exitCondition = (close > high[1] or ta.barssince(enterCondition) == 4) and strategy.position_size > 0
// Entry signal
if enterCondition
strategy.entry("Buy", strategy.long)
// Exit signal
if exitCondition
strategy.close("Buy")
// Plotting the close, previous Friday's close, and entry/exit points on the chart
plot(close, title="Close", color=color.blue)
plot(prevFridayClose, title="Previous Friday Close", color=color.orange)
plotshape(enterCondition, title="Enter", location=location.belowbar, color=color.green, style=shape.labelup, text="Enter")
plotshape(exitCondition, title="Exit", location=location.abovebar, color=color.red, style=shape.labeldown, text="Exit")