피트 웨이브 거래 시스템 전략

저자:차오장, 날짜: 2024-01-25 15:36:16
태그:

img

피트 웨이브 거래 시스템 전략 개요

피트 웨이브 거래 시스템 전략 원칙

신호가 생성된 후, 브레이크오웃 확인 필터가 활성화되면, 현재 종료 가격이 브레이크오웃을 확인하기 위해 이전 N 촛불의 가장 높거나 낮은 가격을 뚫고 갈 것인지 또한 결정합니다. 마지막으로, 전략은 평균 보유 가격의 특정 비율에 따라 스톱 로스 포지션을 이동하는 후속 스톱 로스 메커니즘을 통해 수익을 잠금합니다.

피트 웨이브 거래 시스템 전략 장점 분석

이 전략은 이동 평균 거래와 트렌드 추적의 장점을 통합하고 중장기 가격 동향의 방향을 효과적으로 식별 할 수 있습니다. 단일 이동 평균 크로스오버 시스템과 비교하면 추가 필터를 결합하면 잘못된 신호의 확률을 크게 줄일 수 있습니다. 구체적인 장점은 다음과 같습니다.

  1. 이동 평균 크로스오버와 트렌드 추적의 조합은 변동적인 시장에 갇히지 않도록 합니다.

  2. 철회 필터와 탈출 확인 메커니즘은 가짜 탈출을 방지합니다.

  3. ATR 값과 촛불 몸집 필터는 실제 변동을 식별하는 데 도움이 됩니다.

  4. 트래일링 스톱 로스 메커니즘은 단일 거래 손실을 효과적으로 제어 할 수 있습니다.

피트 웨이브 거래 시스템 전략 위험 분석

이 전략에 직면한 주요 위험은 다음과 같습니다.

  1. 갑작스러운 시장 사건은 스톱 로스 출구를 유발할 수 있습니다. 스톱 로스 거리는 적절하게 느려질 수 있습니다.

  2. 적시에 이익을 취하지 않고 너무 오래 포지션을 보유하면 이동 평균 주기를 단축합니다.

  3. 조용한 시장 조건은 거래 신호를 감소시킵니다. 필터 표준은 적절히 낮출 수 있습니다.

  4. 부적절한 매개 변수 최적화는 너무 빈번하거나 너무 적은 거래로 이어집니다. 매개 변수는 반복 테스트가 필요합니다.

이 전략은 다음과 같은 방향으로 최적화 될 수 있습니다.

  1. 다른 거래 품종에 대해 매개 변수를 개별적으로 테스트하고 이동 평균 기간 및 기타 매개 변수를 최적화합니다.

  2. 추세 방향을 결정하기 위해 볼링거 밴드, RSI와 같은 더 많은 지표를 추가해보세요.

  3. 최적의 스톱 손실 비율을 찾기 위해 스톱 손실 메커니즘 매개 변수를 테스트합니다.

  4. 자동으로 구매 및 판매 신호를 생성하는 기계 학습 방법을 시도하십시오.

  5. 신호 필터링 논리를 최적화하여 잘못된 신호의 확률을 줄이십시오.

  6. 다른 시간 프레임 판단을 결합하여 더 많은 거래 기회를 식별합니다.

피트 웨이브 거래 시스템 전략 요약


/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("9:22 5 MIN 15 MIN BANKNIFTY", overlay=true)

fastLength = input(9, title="Fast MA Length")
slowLength = input(22, title="Slow MA Length")
atrLength = input(14, title="ATR Length")
atrFilter = input(0.5, title="ATR Filter")
trailingStop = input(1.5, title="Trailing Stop Percentage")
pullbackThreshold = input(0.5, title="Pullback Threshold")
minCandleBody = input(0.5, title="Minimum Candle Body Percentage")
breakoutConfirmation = input(true, title="Use Breakout Confirmation")

price = close
mafast = ta.sma(price, fastLength)
maslow = ta.sma(price, slowLength)

atrValue = ta.atr(atrLength)

long_entry = ta.crossover(mafast, maslow) and atrValue > atrFilter
short_entry = ta.crossunder(mafast, maslow) and atrValue > atrFilter

// Pullback Filter
pullbackLong = ta.crossover(price, mafast) and ta.change(price) <= -pullbackThreshold
pullbackShort = ta.crossunder(price, mafast) and ta.change(price) >= pullbackThreshold

// Include pullback condition only if a valid entry signal is present
long_entry := long_entry and (pullbackLong or not ta.crossover(price, mafast))
short_entry := short_entry and (pullbackShort or not ta.crossunder(price, mafast))

// Filter based on candle body size
validLongEntry = long_entry and ta.change(price) > 0 and ta.change(price) >= minCandleBody
validShortEntry = short_entry and ta.change(price) < 0 and ta.change(price) <= -minCandleBody

// Breakout confirmation filter
breakoutLong = breakoutConfirmation ? (close > ta.highest(high, fastLength)[1]) : true
breakoutShort = breakoutConfirmation ? (close < ta.lowest(low, fastLength)[1]) : true

long_entry := validLongEntry and breakoutLong
short_entry := validShortEntry and breakoutShort

if (long_entry)
    strategy.entry("Long", strategy.long)
    strategy.close("Short")
    alert("Long trade iniated")
    
if (short_entry)
    strategy.entry("Short", strategy.short)
    strategy.close("Long")
    alert("Short trade initated")

// Trailing Stop-Loss
long_stop = strategy.position_avg_price * (1 - trailingStop / 100)
short_stop = strategy.position_avg_price * (1 + trailingStop / 100)
strategy.exit("Exit Long", "Long", stop = long_stop)
strategy.exit("Exit Short", "Short", stop = short_stop)

plot(mafast, color=color.green, linewidth=2, title="Fast MA")
plot(maslow, color=color.red, linewidth=2, title="Slow MA")


더 많은