
이 전략의 핵심 아이디어는 높은 거래량 상태에서 브레이크를 추적하고, 리스크 예산 비율과 250배의 시뮬레이션 레버리지를 설정하여 수익 포지션을 달성하는 것입니다.
다음의 조건이 충족되면 추가로 입학할 수 있습니다.
포지션 크기를 계산하는 방법은 다음과 같습니다.
탈퇴 원칙:
다수점 포지션의 손실 비율 posProfitPct는 스톱로스 라인 ((-0.14%) 또는 스톱로스 라인 ((4.55%) 를 만질 때 청산한다.
이 전략의 장점은 다음과 같습니다.
이 전략에는 몇 가지 위험도 있습니다.
위험은 다음과 같은 방법으로 줄일 수 있습니다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
이 전략은 전반적으로 간단하고 직접적이며, 역전 기회를 포착하여 초과 수익을 얻습니다. 그러나 또한 약간의 위험이 있으며, 신중한 실전 검증이 필요합니다. 매개 변수 및 전략 구조를 최적화하면 더 안정적이고 실전성이 강해질 수 있습니다.
/*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")