
아침 시간대 브레이크량 거래 전략은 가격대 브레이크 원칙에 기반한 일일 거래 시스템이다. 이 전략의 핵심 아이디어는 시장 개장 후 처음 5 분 (~9:15~9:19) 형성된 가격대를 포착하고, 가격이 이 범위를 돌파할 때 거래 신호를 발생시킨다. 전략 설계는 시장 아침 시간대에 일반적으로 형성되는 단기 가격 변동 지역을 최대한 활용하고, 이를 후속 가격 움직임의 기준 기준으로 삼는다. 지역 브레이크 시장을 통해, 전략은 일일 동안 발생할 수 있는 경향적인 행동을 포착하는 것을 목표로 한다.
이 전략의 작동원리는 다음과 같은 몇 가지 핵심 단계에 기반합니다.
전략은 기술적인 구현에 정확한 시간 제어 논리를 적용하여 특정 시간 동안만 데이터를 수집하고 거래 신호를 생성하도록합니다. 동시에 조건 판단과 변수 기록을 통해 전략은 가격 돌파 행동을 정확하게 식별하고 그에 따른 거래 작업을 유발할 수 있습니다.
오전 시간대에 뚫린 양적 거래 전략은 다음과 같은 중요한 장점을 가지고 있습니다.
초기 시장을 통해 양적 거래 전략을 뚫는 것은 많은 장점이 있지만, 다음과 같은 잠재적인 위험이 있습니다.
이러한 위험들에 대해 다음과 같은 해결책이 고려될 수 있습니다.
정책 코드의 분석을 바탕으로 다음과 같은 방향으로 정책을 최적화할 수 있습니다.
이러한 최적화 방향이 중요한 이유는 전략의 안정성과 적응력을 크게 향상시킬 수 있기 때문입니다. 예를 들어, 동적 스톱 로즈 및 트렌드 필터는 가짜 브레이크 위험을 줄이고 위험 수익률을 향상시킬 수 있습니다.
오전 간격 돌파량 거래 전략은 시장 개시 후 형성된 가격 간격 돌파구를 포착하는 데 초점을 맞춘 간결하고 효과적인 일일 거래 시스템입니다. 전략은 오전 간격 전에 5 분 동안의 가격 변동을 정확하게 기록하여 참조 범위를 구축하고 가격이 이 범위를 돌파 할 때 거래 신호를 생성합니다. 핵심 장점은 명확한 거래 규칙, 객관적인 의사 결정 과정 및 자동화 된 집행 장치입니다.
그러나, 전략은 또한 가짜 돌파구, 부적절한 간격 품질 및 단일 요인 의존과 같은 잠재적인 위험에 직면합니다. 전략의 안정성과 적응력을 크게 향상시킬 수 있는 최적화 수단은 손실 제도를 추가하고, 트렌드 필터를 도입하고, 간격 계산 논리를 최적화하고, 동적 변수 조정을 추가하는 것입니다.
이 전략을 사용하려는 거래자는 먼저 다양한 시장 환경에서 충분한 피드백을 통해 다양한 상황에서 전략의 성능을 이해하고 이에 따라 매개 변수 설정 및 위험 제어 장치를 조정하는 것이 좋습니다. 동시에, 이 전략을 더 포괄적인 거래 시스템의 일부로 사용하여 다른 기술 분석 도구와 위험 관리 원칙과 결합하여 효과를 충분히 발휘하십시오.
/*backtest
start: 2025-03-20 00:00:00
end: 2025-03-27 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Morning Range Breakout Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Input parameters
var useStrategy = input.bool(true, title="Enable Strategy Execution")
var debugMode = input.bool(true, title="Debug Mode")
// Variables to store specific candle data
var float high915 = na
var float low915 = na
var float high916 = na
var float low916 = na
var float high917 = na
var float low917 = na
var float high918 = na
var float low918 = na
var float high919 = na
var float low919 = na
// Final range variables
var float highestHigh = na
var float lowestLow = na
var bool rangeEstablished = false
// Get current bar time components
t = time("1", "0930-1600:1234567")
timeHour = hour(t)
timeMinute = minute(t)
// Debug variables
var string timeString = na
var int barNum = 0
barNum := barNum + 1
// Record exact timestamp for debugging
timeString := str.tostring(timeHour) + ":" + str.tostring(timeMinute)
// Capture each specific minute's high and low
if timeHour == 9 and timeMinute == 15
high915 := high
low915 := low
if debugMode
label.new(bar_index, high, "9:15 H:" + str.tostring(high, "#.##") + " L:" + str.tostring(low, "#.##"),
color=color.new(color.blue, 50), style=label.style_label_down, textcolor=color.white)
if timeHour == 9 and timeMinute == 16
high916 := high
low916 := low
if timeHour == 9 and timeMinute == 17
high917 := high
low917 := low
if timeHour == 9 and timeMinute == 18
high918 := high
low918 := low
if timeHour == 9 and timeMinute == 19
high919 := high
low919 := low
// At 9:20, calculate the highest high and lowest low from all values
if timeHour == 9 and timeMinute == 20 and not rangeEstablished
// Initialize with first non-NA value
if not na(high915)
highestHigh := high915
else if not na(high916)
highestHigh := high916
else if not na(high917)
highestHigh := high917
else if not na(high918)
highestHigh := high918
else if not na(high919)
highestHigh := high919
if not na(low915)
lowestLow := low915
else if not na(low916)
lowestLow := low916
else if not na(low917)
lowestLow := low917
else if not na(low918)
lowestLow := low918
else if not na(low919)
lowestLow := low919
// Now find the highest high and lowest low across all minutes
if not na(high915) and high915 > highestHigh
highestHigh := high915
if not na(high916) and high916 > highestHigh
highestHigh := high916
if not na(high917) and high917 > highestHigh
highestHigh := high917
if not na(high918) and high918 > highestHigh
highestHigh := high918
if not na(high919) and high919 > highestHigh
highestHigh := high919
if not na(low915) and low915 < lowestLow
lowestLow := low915
if not na(low916) and low916 < lowestLow
lowestLow := low916
if not na(low917) and low917 < lowestLow
lowestLow := low917
if not na(low918) and low918 < lowestLow
lowestLow := low918
if not na(low919) and low919 < lowestLow
lowestLow := low919
rangeEstablished := true
if debugMode
label.new(bar_index, high, "Range Set\nHigh:" + str.tostring(highestHigh, "#.##") +
"\nLow:" + str.tostring(lowestLow, "#.##") +
"\n9:15 values included: " + str.tostring(not na(high915)),
color=color.new(color.purple, 0), style=label.style_label_down, textcolor=color.white)
// Reset values for the next day
if dayofweek != dayofweek[1]
high915 := na
low915 := na
high916 := na
low916 := na
high917 := na
low917 := na
high918 := na
low918 := na
high919 := na
low919 := na
highestHigh := na
lowestLow := na
rangeEstablished := false
// Generate buy/sell signals
longCondition = rangeEstablished and ta.crossover(close, highestHigh)
shortCondition = rangeEstablished and ta.crossunder(close, lowestLow)
// Execute strategy if enabled
if useStrategy and rangeEstablished
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.entry("Short", strategy.short)
// Plotting
plot(rangeEstablished ? highestHigh : na, color=color.green, linewidth=2, title="Highest High")
plot(rangeEstablished ? lowestLow : na, color=color.red, linewidth=2, title="Lowest Low")
// Plot buy/sell signals
plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Display range information
if barstate.islast and rangeEstablished
label.new(bar_index, highestHigh, text="High: " + str.tostring(highestHigh, "#.##") + " (9:15-9:19)", color=color.green, textcolor=color.white, style=label.style_label_down)
label.new(bar_index, lowestLow, text="Low: " + str.tostring(lowestLow, "#.##") + " (9:15-9:19)", color=color.red, textcolor=color.white, style=label.style_label_up)
// Debug information
if debugMode and barstate.islast
label.new(bar_index, high + (high * 0.05),
"9:15 recorded: " + str.tostring(not na(high915)) +
"\n9:15 High: " + str.tostring(high915, "#.##") +
"\n9:15 Low: " + str.tostring(low915, "#.##") +
"\nTime seen: " + timeString,
color=color.blue, textcolor=color.white, style=label.style_label_down)