“단계 상장 고 유통 통화 쌍 전략”은 고 유통 통화 쌍의 단기 하락 추세를 이용하여 가격이 예상 하락 시 상장 거래를 하여 이익을 취하는 것을 목적으로 한다. 이 전략은 특정 조건에 따라 상장 입장에 들어가고, 동적 입장 규모와 위험 관리 조치를 사용하여 위험을 제어하고 이익을 잠금한다.
이 전략의 주요 내용은 다음과 같습니다.
이 전략은 높은 유통 화폐 쌍이 단기간에 하락하는 경향을 이용한다. 가격이 특정 조건을 충족하면 전략은 공시 입장에 들어간다. 구체적인 원칙은 다음과 같다:
“단계 하위 거래 고 유통 통화 쌍 전략”은 고 유통 통화 쌍의 단기 하락 트렌드를 포착하여 특정 조건에서 하위 거래를하고 동적 위치 규모와 위험 관리 조치를 사용하여 이익을 취하고 위험을 통제합니다. 이 전략의 장점은 단기 거래, 동적 위치 규모 및 간단한 사용 편리성이지만 시장 위험, 슬라이드 포인트 위험 및 파라미터 최적화 위험에 직면합니다. 전략을 추가적으로 최적화하기 위해, 더 많은 기술 지표, 최적화 파라미터 선택, 시장 감정 분석 및 여러 통화 쌍에 적용하는 것을 고려 할 수 있습니다. 지속적인 최적화 및 개선으로, 이 전략은 통화 시장에서 안정적인 이익을 얻을 것으로 예상됩니다.
/*backtest
start: 2024-04-01 00:00:00
end: 2024-04-30 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Short High-Grossing Forex Pair", overlay=true)
// Parameters
shortDuration = input.int(7, title="Short Duration (days)")
priceDropPercentage = input.float(30, title="Price Drop Percentage", minval=0, maxval=100)
riskPerTrade = input.float(1, title="Risk per Trade (%)", minval=0.1, maxval=100) / 100 // Risk per trade as a percentage of equity
stopLossPercent = input.float(5, title="Stop Loss Percentage", minval=0) // Stop Loss Percentage
takeProfitPercent = input.float(30, title="Take Profit Percentage", minval=0) // Take Profit Percentage
// Initialize variables
var int shortEnd = na
var float entryPrice = na
// Calculate dynamic position size
equity = strategy.equity
riskAmount = equity * riskPerTrade
pipValue = syminfo.pointvalue
stopLossPips = close * (stopLossPercent / 100)
positionSize = riskAmount / (stopLossPips * pipValue)
// Entry condition: Enter short position at the first bar with calculated position size
if (strategy.opentrades == 0)
strategy.entry("Short", strategy.short, qty=positionSize)
shortEnd := bar_index + shortDuration
entryPrice := close
alert("Entering short position", alert.freq_once_per_bar_close)
// Exit conditions
exitCondition = (bar_index >= shortEnd) or (close <= entryPrice * (1 - priceDropPercentage / 100))
// Stop-loss and take-profit conditions
stopLossCondition = (close >= entryPrice * (1 + stopLossPercent / 100))
takeProfitCondition = (close <= entryPrice * (1 - takeProfitPercent / 100))
// Exit the short position based on the conditions
if (strategy.opentrades > 0 and (exitCondition or stopLossCondition or takeProfitCondition))
strategy.close("Short")
alert("Exiting short position", alert.freq_once_per_bar_close)
// Plot entry and exit points for visualization
plotshape(series=strategy.opentrades > 0, location=location.belowbar, color=color.red, style=shape.labeldown, text="Short")
plotshape(series=strategy.opentrades == 0, location=location.abovebar, color=color.green, style=shape.labelup, text="Exit")
// Add alert conditions
alertcondition(strategy.opentrades > 0, title="Short Entry Alert", message="Entering short position")
alertcondition(strategy.opentrades == 0, title="Short Exit Alert", message="Exiting short position")