오픈 드라이브 전략

저자:차오장, 날짜: 2023-10-23 15:13:49
태그:

img

전반적인 설명

오픈 드라이브 전략은 시장 개장 후 첫 30 분 동안 가격 행동을 관찰하고, 강력한 방향 브레이크오프를 식별하고, 그 방향으로 트렌드 트레이드에 진입합니다. 그것은 주로 더 큰 가격 변동과 방향 세력을 생성 할 수있는 오픈 후 유동성 및 거래 부피를 증가시킵니다.

전략 논리

  1. 30분 바를 사용하세요. 오픈 후 극단적인 가격 움직임을 측정할 충분한 시간이 필요하기 때문이죠.

  2. 이 시간대에 열리는 바를 확인하세요: 0700-0715, 0800-0815, 1300-1315, 1430-1445.

  3. 열린 바가 만족하는지 확인합니다:

    • 열기 근처 바 낮은, 닫기 근처 바 높은 (올림 바)

    • 또는 바 높이에 가까운 오픈, 바 낮은 근처에 가까운 닫아 (아래 바)

    • 그리고 높은 이전 5바트 높은 1 x 5바트 범위, 또는 낮은 이전 5바트 낮은 1 x 5바트 범위 (브레이크아웃) 를 넘어

  4. 위의 조건이 충족되면 신호 바 다음 3 바를 그 방향으로 트렌드 트레이드를 입력합니다.

  5. 엔트리 바의 높음/낮음에서 스톱 손실을 설정합니다.

  6. 3 바 (90분) 동안 위치를 유지하다가 출구

이점 분석

  • 오픈 후 높은 유동성으로 인한 강력한 방향 움직임을 포착합니다.
  • 브레이크아웃 필터는 흔들리는 조건에서 잘못된 신호를 피합니다
  • 더 긴 시간 프레임은 과잉 거래를 줄입니다.
  • 스톱 로스는 과도한 손실을 피합니다.

위험 분석

  • 고정된 오픈 시간 기간은 트렌드 브레이크를 놓치는 위험이 있습니다.
  • 부적절한 브레이크아웃 문턱은 유효한 신호를 필터링할 수 있습니다.
  • 고정된 유지 시간은 특정 조건에 적응할 수 없습니다.
  • 트렌드를 따라가지 못하는 단 한 곳도 없습니다.

다음 과 같은 점 들 을 고려 해 보십시오.

  • 더 많은 매개 변수와 함께 동적으로 오픈 기간을 결정
  • 브레이크아웃 문턱을 최적화
  • 변동성에 따라 보유 시간을 조정합니다.
  • 후속 중지 절차를 추가

개선 방향

  • 신호 품질을 향상시키기 위해 더 많은 지표를 포함
  • 더 빈번한 거래를 위해 더 낮은 시간 프레임에 거래를 입력합니다.
  • 백테스트를 기반으로 오픈 기간, 브레이크아웃 임계, 중지 등과 같은 매개 변수를 최적화
  • 수익을 높이기 위해 후속 정지, 재입구 등을 고려하십시오
  • 가장 적합한 제품을 찾기 위해 다양한 제품에 대한 백테스트

요약

오픈 드라이브 전략은 오픈 후 강력한 방향 브레이크오프를 포착하여 트렌드를 따르고 있습니다. 무작위 엔트리와 비교하면 더 나은 위험 보상 특성을 제공합니다. 열쇠는 적절한 매개 변수 조정, 도구 선택 및 균형 빈도 및 수익성입니다. 추가 분석을 가진 경험이 많은 거래자에게 적합합니다.


/*backtest
start: 2023-10-15 00:00:00
end: 2023-10-22 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Marcns_

//@version=5
// a script that highlights open drives around cash market opens throughout the day
// this indicator identifies the following cash open, open drives 0700 - 0715 / 0800 - 0815 / 1300 - 1315 / 1430 - 1445 
// an open drive is when a cash market opens and price runs either up or down away from the opening price, often this will be the high or the low the remainer of the session or day
// and often identify a trend session
strategy("Open Drive", commission_type =  strategy.commission.cash_per_contract, commission_value = 3.8 )

// open drive filter times - all times GMT
eu_sev = time(timeframe.period, "0700-0715", "GB")
eu_eig = time(timeframe.period, "0800-0815", "GB")
us_one = time(timeframe.period, "1300-1315", "GB")
us_two = time(timeframe.period, "1430-1445", "GB")


// identify bar that opens at low and closes at high + vice versa 
// bar needs to open at one extreme and close at another 
TrndExThreshold_Open = 0.15
TrndExThreshold_Close = 0.15

// add a bar range expansion filter - range of bar correlates to volume, high volume = wider range. This script will be able to filter for a break of a 5 bar range +100% or -100%

fbhi = ta.highest(5)
fblo = ta.lowest(5)

fbr = (fbhi - fblo)

RangeEx_up = 0.0

if high >= (fbhi[1] + fbr[1])
    RangeEx_up := 1.0
else
    na

// range ex down

RangeEx_do = 0.0

if low <= (fblo[1] - fbr[1]) 
    RangeEx_do := 1.0
else
    na


//#1 open within 5% of low

OpenAtLow = 0.0 

if (close > open) and (open-low) / (high-low) < TrndExThreshold_Open
    OpenAtLow := 1.0
else 
    na 

//#2 close within 5% of high
    
CloseAtHigh = 0.0

if (close > open) and (high-close) / (high-low) < TrndExThreshold_Close
    CloseAtHigh := 1.0
else
    na 

OD_Up = 0.0

if (OpenAtLow + CloseAtHigh + RangeEx_up == 3.0) and ( eu_sev or eu_eig or us_one or us_two)
    OD_Up := 1
else
    na

plot(OD_Up, title = "OD_up")



OpenAtHigh = 0.0 

if (close < open) and (high-open) / (high-low) < TrndExThreshold_Open
    OpenAtHigh := 1.0
else 
    na 

//#2 close within 5% of high
    
CloseAtLow = 0.0

if (close < open) and (close-low) / (high-low) < TrndExThreshold_Close
    CloseAtLow := 1.0
else
    na 

OD_Down = 0.0

if (OpenAtHigh + CloseAtLow + RangeEx_do == 3.0) and ( eu_sev or eu_eig or us_one or us_two)
    OD_Down := -1
else
    na

plot(OD_Down, title = "OD_down", color = color.red)


//3sma

ma = ta.sma(close,3)

// one time framing - highlight bars the make a series of lower highs or higher lows to identify trend 
// one time frame up 
otf_u = 0.0

if close > ma and close[1] > ma[1]
    otf_u := 1
else
    na
// one time frame down 
otf_d = 0.0

if close < ma and close[1] < ma[1]
    otf_d := 1
else
    na


//bgcolor(otf_u ? color.rgb(76, 175, 79, 70) : na)
//bgcolor(otf_d ? color.rgb(255, 82, 82, 66) : na)

// record high and low of entry bar into variable for absolute stop
// buy stop
bs = 0.0

if OD_Up
    bs := low[1]
else
    na

// sell stop
ss = 0.0

if OD_Down
    ss := high[1]
else
    na




// strategy entry and exits 
// long
if OD_Up
    strategy.entry("el", strategy.long, 2)
if ta.barssince(OD_Up)> 3 
    strategy.exit(id = "ex" , from_entry = "el", limit = close)

// short 
if OD_Down
    strategy.entry("es", strategy.short, 2)
if ta.barssince(OD_Down)> 3
    strategy.exit(id = "ex" , from_entry = "es", limit = close)



더 많은