시장 구조 스윙 트레이딩 전략

CHoCH BOS IDM ATR RSI SL TP
생성 날짜: 2025-03-28 17:38:30 마지막으로 수정됨: 2025-03-28 17:38:45
복사: 7 클릭수: 387
avatar of ianzeng123 ianzeng123
2
집중하다
319
수행원

시장 구조 스윙 트레이딩 전략 시장 구조 스윙 트레이딩 전략

개요

시장 구조 스윙 트레이딩 전략은 시장 구조의 변화, 유동성 캡처 및 트렌드 동력을 기반으로 한 고급 거래 방법이다. 이 전략은 가격 변화의 주요 특징을 분석하여 잠재적인 트렌드 반전 및 지속 기회를 식별하여 거래자에게 체계화된 거래 의사 결정 프레임 워크를 제공합니다.

전략 원칙

이 전략의 핵심은 다음과 같은 네 가지 핵심 지표에 기반합니다.

  1. 변화 특성 (Change of Character, CHoCH): 가격 트렌드의 전환점을 식별하여 시장의 잠재적인 방향 변화를 판단한다.
  2. 구조의 깨짐 (Break of Structure, BOS): 트렌드 동력과 방향의 깨짐을 확인한다.
  3. 인덕먼트 (Inducements, IDM): 시장의 유동성 함정과 자금의 이동을 포착하기
  4. 스 (Sweeps): 가짜 침입을 식별하고 유동성을 잡기 위한 기회

전략은 평균 실제 변동 범위 (ATR), 상대 강도 (RSI) 및 거래량을 포함한 기술 분석 지표를 종합적으로 사용하여 다차원 거래 의사 결정 시스템을 구축합니다.

전략적 이점

  1. 체계적인 위험 관리: ATR을 계산하여 단 하나 거래의 위험을 효과적으로 제어합니다.
  2. 다중 필터 조건: CHoCH, BOS, RSI와 교류량을 결합하여 신호 정확도를 높인다.
  3. 동적 포지션 관리: 권리 이익 비율을 사용하여 거래 포지션을 설정하고, 자금 사용 효율성을 최적화한다.
  4. 유연한 입출장 메커니즘: 시장 구조에 따라 거래 전략을 조정할 수 있다.

전략적 위험

  1. 가짜 돌파 위험: 시장 구조 지표가 잘못된 신호를 줄 수 있다.
  2. 매개 변수 민감성: 정책 매개 변수 설정은 성능에 중요한 영향을 미칩니다.
  3. 거래량 및 유동성 위험: 유동성이 낮은 시장에서 좋지 않은 성과를 낼 수 있습니다.
  4. 회수 통제: 지속적인 추세 시장에서 더 큰 회수를 직면할 수 있다.

전략 최적화 방향

  1. 기계 학습 알고리즘을 도입: 최적화된 파라미터 선택과 신호 인식.
  2. 더 많은 시간 프레임 분석: 신호의 신뢰도를 높여줍니다.
  3. 동적 리스크 관리 모듈 개발: 시장의 변동성에 따라 포지션을 조정한다.
  4. MACD, 브린 띠 등과 같은 더 많은 기술 지표를 통합하고, 신호 필터링을 강화한다.

요약하다

시장 구조 스윙 거래 전략은 체계화된 시장 구조 분석을 통해 거래자에게 강력한 거래 의사 결정 프레임 워크를 제공하는 첨단 양적 거래 방법입니다. 지속적인 최적화 및 위험 관리를 통해 이 전략은 다양한 시장 환경에서 안정적인 거래 성능을 얻을 수 있습니다.

전략 소스 코드
/*backtest
start: 2024-03-28 00:00:00
end: 2025-03-27 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=5
strategy("Market Structure Swing Trading", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=5)

// === Input Parameters ===
len = input(50, "CHoCH Detection Period")
shortLen = input(3, "IDM Detection Period")
atrMultiplierSL = input(2.0, "ATR Multiplier for Stop Loss")
atrMultiplierTP = input(3.0, "ATR Multiplier for Take Profit")
rsiPeriod = input(14, "RSI Period")
rsiOverbought = input(70, "RSI Overbought Level")
rsiOversold = input(30, "RSI Oversold Level")
volThreshold = input(1.2, "Volume Multiplier Threshold") 

// === ATR Calculation for SL & TP ===
atr = ta.atr(14)
stopLossLong = close - (atr * atrMultiplierSL)
takeProfitLong = close + (atr * atrMultiplierTP)
stopLossShort = close + (atr * atrMultiplierSL)
takeProfitShort = close - (atr * atrMultiplierTP)

// === RSI Filter ===
rsi = ta.rsi(close, rsiPeriod)
longConditionRSI = rsi < rsiOversold
shortConditionRSI = rsi > rsiOverbought

// === Volume Filter ===
volThresholdValue = ta.sma(volume, 20) * volThreshold
highVolume = volume > volThresholdValue

// === Market Structure Functions ===
swings(len) =>
    var int topx = na
    var int btmx = na
    upper = ta.highest(len)
    lower = ta.lowest(len)
    top = high[len] > upper ? high[len] : na
    btm = low[len] < lower ? low[len] : na
    topx := top ? bar_index[len] : topx
    btmx := btm ? bar_index[len] : btmx
    [top, topx, btm, btmx]

[top, topx, btm, btmx] = swings(len)

// === CHoCH Detection ===
var float topy = na
var float btmy = na
var os = 0
var top_crossed = false
var btm_crossed = false

if top
    topy := top
    top_crossed := false
if btm
    btmy := btm
    btm_crossed := false

if close > topy and not top_crossed
    os := 1
    top_crossed := true
if close < btmy and not btm_crossed
    os := 0
    btm_crossed := true

// === Break of Structure (BOS) ===
var float max = na
var float min = na
var int max_x1 = na
var int min_x1 = na

if os != os[1]
    max := high
    min := low
    max_x1 := bar_index
    min_x1 := bar_index

bullishBOS = close > max and os == 1
bearishBOS = close < min and os == 0

// === Trade Conditions with Filters ===
longEntry = bullishBOS and longConditionRSI and highVolume
shortEntry = bearishBOS and shortConditionRSI and highVolume

// === Execute Trades ===
if longEntry
    strategy.entry("Long", strategy.long)
    strategy.exit("Long TP/SL", from_entry="Long", stop=stopLossLong, limit=takeProfitLong)

if shortEntry
    strategy.entry("Short", strategy.short)
    strategy.exit("Short TP/SL", from_entry="Short", stop=stopLossShort, limit=takeProfitShort)

// === Plotting Market Structure ===
plotshape(series=longEntry, location=location.belowbar, color=color.green, style=shape.labelup, title="BUY")
plotshape(series=shortEntry, location=location.abovebar, color=color.red, style=shape.labeldown, title="SELL")
plot(topy, color=color.blue, title="CHoCH High")
plot(btmy, color=color.orange, title="CHoCH Low")