고용량 저출력 복합 포지션 사이징 전략

저자:차오장, 날짜: 2024-02-18 15:43:02
태그:

img

전반적인 설명

이 전략의 핵심 아이디어는 정의된 위험 비율과 250 배의 시뮬레이션 레버리지를 기반으로 한 복합 포지션 사이징 접근 방식을 사용하여 높은 거래량 중 브레이크를 추적하는 것입니다. 이는 강한 판매 압력 후 잠재적 인 반전 기회를 포착하는 것을 목표로합니다.

전략 논리

긴 입력 신호는 다음 경우에 작동합니다.

  1. 부피가 사용자 정의 임계값을 초과합니다 (volThreshold)
  2. 현재 바의 하위값은 이전 바의 하위값보다 낮습니다 (lowLowerThanPrevBar)
  3. 현재 바가 닫는 것은 음수이지만 이전 바가 닫는 것보다 높습니다 (negativeCloseWithHighVolume)
  4. 현재 오픈 된 긴 포지션이 없습니다 (strategy.position_size == 0)

위치 크기는 다음과 같이 계산됩니다.

  1. 자본에 기초한 위험 금액 * 위험 비율
  2. 리스크 금액 * 레버리지 (250x)

출입 규칙:

포스트프로프트 (ProfitPct) 이익률이 스톱 로스 (-0.14%) 또는 영업이익 (4,55%) 를 달성하면 긴 포지션을 닫습니다.

이점 분석

이 전략의 장점:

  1. 높은 거래량에서 트렌드 역전 기회를 포착합니다.
  2. 복합 포지션 크기는 더 빠른 수익 성장을 가능하게 합니다.
  3. 합리적인 스톱 로스 및 수익 취득은 위험을 통제하는 데 도움이 됩니다.

위험 분석

고려해야 할 위험:

  1. 250배의 레버리지는 손실을 증폭시킵니다.
  2. 매출액 (이하 매출액)
  3. 강력한 백테스팅과 매개 변수 최적화를 필요로 합니다.

위험은 다음과 같이 감소 할 수 있습니다.

  1. 레버리지 금액을 낮추는 것
  2. 스톱 로스 비율 증가
  3. 실제 거래 비용의 회계

최적화 기회

개선 할 수 있는 영역:

  1. 레버리지 레벨을 동적으로 조정합니다.
  2. 스톱 로스 및 수익을 취하는 규칙을 최적화하십시오
  3. 트렌드 필터 추가
  4. 기기 기준으로 매개 변수를 사용자 정의

결론

요약하자면, 이것은 반전과 과대적인 이득을 포착하기 위한 상당히 간단하고 직설적인 전략입니다. 하지만 위험은 존재하고 신중한 실제 세계 테스트는 필수적입니다. 최적화로, 그것은 더 견고하고 실용적으로 만들 수 있습니다.


/*backtest
start: 2023-02-11 00:00:00
end: 2024-02-17 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("High Volume Low Breakout (Compounded Position Size)", overlay=true, initial_capital=1000)

// Define input for volume threshold
volThreshold = input.int(250, "Volume Threshold")

// Define input for risk per trade as a percentage of total equity
riskPercentage = input.float(10, "Risk Percentage")

// Calculate volume
vol = volume

// Check for high volume and low lower than the previous bar
highVolume = vol > volThreshold
lowLowerThanPrevBar = low < low[1]

// Calculate position profit percentage
posProfitPct = 100 * (close - strategy.position_avg_price) / strategy.position_avg_price

// Calculate the position size based on risk percentage and total account equity
equity = strategy.equity
riskAmount = (equity * riskPercentage / 100) / (close - strategy.position_avg_price)

// Calculate leverage (250x in this case)
leverage = 250

// Calculate the position size in contracts/lots to trade
positionSize = riskAmount * leverage

// Check if the current bar's close is negative when it has high volume
negativeCloseWithHighVolume = highVolume and close < close[1]

// Enter long position as soon as volume exceeds the threshold, low is lower than the previous bar, and the current bar's close is negative
if highVolume and lowLowerThanPrevBar and negativeCloseWithHighVolume and strategy.position_size == 0
    strategy.entry("Long", strategy.long, qty=positionSize, comment="Long Entry")

// Exit long position intrabar if profit goes below -0.14% or above 1%
if strategy.position_size > 0
    if posProfitPct < -0.14 or posProfitPct > 4.55
        strategy.close("Long")


더 많은