RSI를 포함하는 다중 시간 프레임 볼링거 밴드 브레이크업 전략

저자:차오장, 2024-02-21 13:59:31
태그:

img

전반적인 설명

이 전략은 볼링거 밴드, RSI 지표 및 멀티 타임프레임 분석을 통합하여 중장기 트렌드의 방향을 파악합니다. 낮은 위험 진입을 위해 RSI 과잉 구매 / 과잉 판매 신호와 결합한 볼링거 밴드 브레이크오웃을 통해 트렌드 역전 지점을 식별합니다. 한편, 더 높은 시간 프레임이 적용되어 시장의 범위를 필터링하고 함락되는 것을 피합니다.

전략 논리

  1. 가격 브레이크오프를 결정하기 위해 볼링거 밴드를 적용한다. 중간 밴드는 N 일 동안의 종료 가격의 이동 평균이다. 상부와 하부 밴드는 중간 밴드의 양쪽에 하나의 표준 편차의 거리에 배치된다. 상부 밴드 위에 깨는 것은 상승세를 나타내고, 하부 밴드 아래에 깨는 것은 하락세를 나타낸다.

  2. 과반 구매/ 과반 판매 수준을 식별하기 위해 RSI 지표를 포함합니다. RSI 70 이상은 과반 구매 조건을 제안하고 30 이하는 과반 판매 조건을 제안합니다. RSI 70 이상 상승 파업은 상승 동력의 약화를 확인합니다. RSI 30 이하 하락 파업은 하락 동력의 약화를 확인합니다.

  3. 가짜 브레이크아웃을 필터링하기 위해 더 높은 시간 프레임을 사용하십시오. 매일 시간 프레임에 브레이크아웃 신호가 나타나면 함락되지 않도록 4 시간 또는 더 높은 시간 프레임에서 추가 확인이 필요합니다.

장점

  1. 다중 지표 통합은 전략의 안정성과 수익성을 향상시킵니다.

  2. RSI를 포함하면 가짜 브레이크로 인한 손실을 줄일 수 있습니다.

  3. 다중 타임프레임 분석은 다양한 시장을 효과적으로 필터링하고 함락되는 것을 방지합니다.

  4. 최적화된 브레이크오프 신호 결정 (연속 3 바 이상의 브레이크오프) 은 엔트리 전에 충분한 트렌드 성숙도를 보장합니다.

  5. 소용돌이 지표는 초기에 신생 트렌드 방향성을 결정합니다.

위험성

  1. 부적절한 볼링거 밴드 매개 변수는 잘못된 과잉 구매/ 과잉 판매 신호로 이어집니다.

  2. 합리적인 RSI 매개 변수 값은 각기 다른 제품들에 대해 별도로 결정되어야 합니다.

  3. 브레이크오프 신호가 가짜 브레이크오프로 판명될 수도 있습니다. 따라서 스톱 로스를 확대하는 것을 고려하세요.

  4. 충분한 스톱 로스 마진을 유지합니다. 예를 들어 ATR의 3배입니다.

더 나은 기회

  1. 기계 학습 알고리즘을 적용하여 볼링거 밴드 및 RSI의 매개 변수를 자동 조정합니다.

  2. 변동성 측정 기준에 기초한 스톱 로스 수준을 최적화합니다.

  3. 포지션 사이징 모듈을 통합하여 변화하는 시장 조건에 따라 적재자를 캘리브레이트합니다.

  4. 자금 관리 원칙에 따라 거래당 최대 손실을 제한합니다.

  5. 다른 거래 세션에서 신호 안정성을 평가합니다.

결론

이 전략은 트렌드 결정, 과잉 구매 / 과잉 판매 조건 및 여러 시간 프레임을 종합적으로 검토하여 위험을 통제하고 매력적인 위험 보상 프로파일을위한 고품질 중장기 트렌드를 포착하기 위해 최적의 입시 시기를 추구합니다. 더 나은 투자 성과를 달성하기 위해 매개 변수 최적화, 중지 손실 메커니즘 등을 통해 추가 개선이 탐구 될 수 있습니다.


/*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 Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Noway0utstorm
//@version=5
strategy(title='Vortex0.71.3 + bb 3bar breakout + rsi - close hit upper or lower', shorttitle='truongphuthinh', format=format.price, precision=4,overlay = true)

length = input(20, title="Length")
mult = input(2.0, title="Multiplier")
source = close

basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)

upperBand = basis + dev
lowerBand = basis - dev

isClosedBar = ta.change(time("15"))

var bool closeAboveUpperBand = false
var bool closeBelowLowerBand = false


// Vortex Indicator Settings
period_ = input.int(14, title='Period', minval=2)

VMP = math.sum(math.abs(high - low[1]), period_)
VMM = math.sum(math.abs(low - high[1]), period_)
STR = math.sum(ta.atr(1), period_)
VIP = VMP / STR
VIM = VMM / STR

//
lengthrsi = input(14, title="RSI Length")
overboughtLevel = input(70, title="Overbought Level")
oversoldLevel = input(30, title="Oversold Level")

sourcersi = close
rsiValue = ta.rsi(sourcersi, lengthrsi)

shouldShort = rsiValue > overboughtLevel
shouldLong = rsiValue < oversoldLevel




if bool(isClosedBar[1]) and bool(isClosedBar[2]) and bool(isClosedBar[3])

    if close[1] > upperBand[1] and close[2] > upperBand[2] and close[3] > upperBand[3] and VIP > 1.25 and VIM < 0.7 and rsiValue > overboughtLevel
        strategy.entry("Short", strategy.short)
        closeAboveUpperBand := false  // Reset the condition when entering a new Short position
    if close[1] < lowerBand[1] and close[2] < lowerBand[2] and close[3] < lowerBand[3] and VIP < 0.7 and VIM > 1.25 and rsiValue < oversoldLevel
        strategy.entry("Long", strategy.long)
        closeBelowLowerBand := false  // Reset the condition when entering a new Long position



if strategy.position_size > 0  // Check if there is an open Long position
    closeAboveUpperBand := close > upperBand  // Update the condition based on close price
    if closeAboveUpperBand
        strategy.close("Long",disable_alert=true)  // Close the Long position if close price is above upper band

if strategy.position_size < 0  // Check if there is an open Short position
    closeBelowLowerBand := close < lowerBand  // Update the condition based on close price
    if closeBelowLowerBand
        strategy.close("Short",disable_alert=true)  // Close the Short position if close price is below lower band

// Plots
plot(basis, color=color.orange, title="Basis")
p1 = plot(upperBand, color=color.blue, title="Upper Band")
p2 = plot(lowerBand, color=color.blue, title="Lower Band")
fill(p1, p2, title = "Background", color=color.rgb(33, 150, 243, 95))

더 많은