
첫 번째 경로 돌파 - 동적 추적 스톱 손실 및 종결 청산 전략은 시장 개시 후 첫 번째 경로 선의 가격 범위를 중요한 지원 및 저항 지점으로 사용하는 일일 거래 전략이다. 이 전략은 첫 번째 경로 형성 후 가격이 최고점 또는 최저점을 돌파 한 후에 다시 입문하는 것을 기다립니다. 동시에 첫 번째 경로 가격 범위에 기반한 동적 추적 스톱 손실 메커니즘을 사용하며 매일 특정 시간에 청산을 강제하여 야간 위험을 피합니다.
이 전략은 시장 개시 후 첫 번째 선이 형성되는 가격 범위를 기반으로합니다. 전략의 핵심 논리는 다음과 같습니다.
이 전략은 확인 후 입문 메커니즘을 채택합니다. 즉, 가격이 첫 번째 벽의 고위 또는 낮은 지점을 실제로 돌파 한 후에 거래에 입문합니다. 가격이 이러한 수준을 만졌을 때 즉시 입문하는 것이 아니라, 가짜 돌파가 초래하는 위험을 줄이는 데 도움이됩니다.
##, 전략적 위험
이 전략은 장점이 있지만 몇 가지 잠재적인 위험도 있습니다.
위와 같은 위험들에 대해, 이 전략은 다음과 같은 방향으로 최적화될 수 있습니다:
첫 번째 ?? 브레이크 - 동적 추적 스톱 & 클로즈 시트 전략은 시장 개장 후 첫 번째 ?? 라인 가격 간격을 기반으로 한 일간 거래 전략이다. 그것은 확인된 가격 브레이크 신호를 이용한 후 시장 변동에 기반한 동적 추적 스톱 손실 장치를 사용하여 위험을 관리하고 매일 고정 시간 동안 평점을 강제하여 야간 위험을 회피한다.
이 전략의 장점은 진입 신호를 명확하게 하고, 위험 관리를 동적으로 하고, 가짜 돌파구 및 하룻밤 사이에 위험을 피하고, 시장의 변동에 적응하고, 과도한 거래를 제한하고, 완전히 자동화 할 수 있다는 것입니다. 그러나, 그것은 또한 가짜 돌파구 위험, 불합리한 중단 거리, 큰 상황을 놓치고, 시간 의존성, 수익 목표의 부재 및 변수 감수성 등과 같은 도전에 직면합니다.
필터링 조건을 추가하고, 스톱로스 메커니즘을 최적화하고, 일부 수익 메커니즘을 도입하고, 오프나이트 포지션 조건을 추가하고, 시간 필터를 추가하고, 변수 적응 메커니즘을 최적화하고, 시장 환경 식별을 추가하고, 다중 시간 프레임 분석을 고려하고, 자금 관리 모듈을 추가함으로써 전략의 안정성과 수익성을 더욱 향상시킬 수 있습니다.
전체적으로, 이것은 명확하고, 논리적으로 합리적인 일일 거래 전략이며, 자동화된 시스템을 통해 일일 거래를 하고, 위험을 엄격하게 통제하려는 거래자에게 적합하다. 이 전략은 타겟팅된 최적화와 적절한 매개 변수의 조정으로, 다양한 시장 환경에서 안정적인 성능을 기대한다.
/*backtest
start: 2025-03-24 00:00:00
end: 2025-03-31 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"TRX_USDT"}]
*/
//@version=5
strategy("First Candle Breakout - Trailing Stop & EOD Close", overlay=true)
// User Inputs
startHour = input(9, "Start Hour (Exchange Time)")
startMinute = input(15, "Start Minute (Exchange Time)")
endHour = input(15, "End Hour (Exchange Time)") // Market closing hour
endMinute = input(30, "End Minute (Exchange Time)")
trailStopMultiplier = input(1.5, "Trailing Stop Multiplier") // 1.5x first candle range
// Variables to store the first candle's high & low
var float firstCandleHigh = na
var float firstCandleLow = na
var bool tradeTaken = false // Ensures only one trade per day
var int tradeDirection = 0 // 1 for long, -1 for short
var float trailStopLevel = na // Trailing stop level
// Identify first candle's high & low
if (hour == startHour and minute == startMinute and bar_index > 1)
firstCandleHigh := high
firstCandleLow := low
tradeTaken := false // Reset trade flag at start of day
tradeDirection := 0 // Reset trade direction
trailStopLevel := na // Reset trailing stop
// Calculate first candle range
firstCandleRange = firstCandleHigh - firstCandleLow
trailStopDistance = firstCandleRange * trailStopMultiplier
// Buy condition: Close above first candle high AFTER the first candle closes
longCondition = not na(firstCandleHigh) and close > firstCandleHigh and not tradeTaken and hour > startHour
if (longCondition)
strategy.entry("Buy", strategy.long, comment="Buy")
trailStopLevel := close - trailStopDistance // Set initial trailing stop
tradeTaken := true
tradeDirection := 1
// Sell condition: Close below first candle low AFTER the first candle closes
shortCondition = not na(firstCandleLow) and close < firstCandleLow and not tradeTaken and hour > startHour
if (shortCondition)
strategy.entry("Sell", strategy.short, comment="Sell")
trailStopLevel := close + trailStopDistance // Set initial trailing stop
tradeTaken := true
tradeDirection := -1
// Update trailing stop for long trades
if (tradeDirection == 1 and not na(trailStopLevel))
trailStopLevel := nz(trailStopLevel, close - trailStopDistance) // Initialize if na
trailStopLevel := math.max(trailStopLevel, close - trailStopDistance) // Adjust trailing stop up
if (close <= trailStopLevel) // Stop loss hit
strategy.close("Buy", comment="Trailing SL Hit")
// Update trailing stop for short trades
if (tradeDirection == -1 and not na(trailStopLevel))
trailStopLevel := nz(trailStopLevel, close + trailStopDistance) // Initialize if na
trailStopLevel := math.min(trailStopLevel, close + trailStopDistance) // Adjust trailing stop down
if (close >= trailStopLevel) // Stop loss hit
strategy.close("Sell", comment="Trailing SL Hit")
// Close trade at end of day if still open
if (tradeTaken and hour == endHour and minute == endMinute)
strategy.close_all(comment="EOD Close")