런던 브레이크오웃 데이 거래 전략

저자:차오장, 날짜: 2023-09-15 15:43:04
태그:

전략 개요

런던 브레이크아웃 데이 트레이딩 전략은 런던 세션 가격 동작을 간단한 브레이크아웃 로직으로 활용하여 외환 내일 거래에 설계되었습니다. 단기 수익을 위해 특정 거래 시간 및 가격 행동 패턴을 결합합니다.

전략 논리

  1. 영업일 런던 세션 시간, 예를 들어 GMT 0400-0500 동안만 거래합니다.

  2. 단기 트렌드를 결정합니다. 세 개의 연속 상향 촛불에서 장거리, 세 개의 연속 하향 촛불에서 단기.

  3. 긴 신호: 세 개의 촛불을 연속으로 볼 때 긴 신호를 입력합니다.

  4. 짧은 신호: 세 개의 촛불을 연속으로 볼 때 짧은 신호를 입력합니다.

  5. 스톱 로스/프로피스 취득: 입시 가격의 특정 비율로 스톱 로스를 설정하고 수익을 취합니다.

  6. 출구 규칙: 스톱 로스/프로프트 트리거 또는 런던 세션 종료시 출구

이 전략은 단기 트렌드를 파악하기 위해 단순한 브레이크아웃 신호를 사용하며, 거래당 위험/이익을 통제하기 위해 엄격한 리스크 관리를 사용합니다.

전략 의 장점

  • 매우 활발한 런던 시간 동안만 거래

  • 신호에 대한 간단한 가격 브레이크 로직

  • 엄격한 스톱 로스/익스피스 통제 위험

  • 낮은 유동성 야간 및 휴일 세션을 피합니다.

  • 명확한 입국 및 출입 규칙

위험 경고

  • 잠재적인 조기 또는 지연 출입 문제

  • 함락 될 위험

  • 야간/휴가 기간 동안 기회는 나타날 수 있습니다.

  • 주요 지원/저항 수준에 주의가 필요하다

결론

런던 브레이크아웃 데이 트레이딩 전략은 단기 내일 트레이딩에 매우 적합하며, 혼란스러운 기간을 피하고 유동성이 높은 기간 동안 수익을 내고 있습니다. 매개 변수 조정으로 효과적인 단기 트레이딩을 위해 더 많은 자산에 적응 할 수 있습니다.


/*backtest
start: 2023-09-07 00:00:00
end: 2023-09-08 09:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy("time zone", overlay=true, initial_capital=1000)
fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2000, title = "From Year", minval = 1970)
 //monday and session 
// To Date Inputs
toDay = input(defval = 31, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2020, title = "To Year", minval = 1970)

startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true

s = input(title="Session", type=input.session, defval="0400-0500")
s2 = input(title="eXOT", type=input.session, defval="0300-0900")
t1 = time(timeframe.period, s)
t2 = time(timeframe.period, s2)
c2 = #0000FF
//bgcolor(t1 ? c2 : na, transp=85)

UseHAcandles    = input(false, title="Use Heikin Ashi Candles in Algo Calculations")
//
// === /INPUTS ===

// === BASE FUNCTIONS ===

haClose = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, close) : close
haOpen  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, open) : open
haHigh  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, high) : high
haLow   = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, low) : low

isMon() => dayofweek(time('D')) == dayofweek.monday
isTue() => dayofweek(time('D')) == dayofweek.tuesday
isWed() => dayofweek(time('D')) == dayofweek.wednesday
isThu() => dayofweek(time('D')) == dayofweek.thursday
isFri() => dayofweek(time('D')) == dayofweek.friday
isSat() => dayofweek(time('D')) == dayofweek.saturday
isSun() => dayofweek(time('D')) == dayofweek.sunday

longe = input(true, title="LONG only")
shorte = input(true, title="SHORT only")
//sl=input(0.001, title="sl % price movement")
//accbalance = strategy.initial_capital + strategy.netprofit


entry = close

sl = input(0.005, title = "Stop Loss")
tp = input(0.005, title="Target Price")

// sldist = entry - sl
// tgdist = tp - entry 
// slper = sldist / entry * 100
// tgper = tgdist / entry * 100

// rr = tgper / slper
// size = accbalance * riskper / slper

balance = strategy.netprofit + 50000 //current balance
floating = strategy.openprofit          //floating profit/loss
risk = input(1,type=input.float,title="Risk % of equity ")           //risk % per trade


temp01 = (balance * risk)/100     //Risk in USD
temp02 = temp01/close*sl      //Risk in lots
temp03 = temp02*100000      //Convert to contracts
size = temp03 - temp03%1000 //Normalize to 1000s (Trade size)
if(size < 1000)
    size := 1000           //Set min. lot size



longC =  haClose> haClose[1] and  haClose[1] > haClose[2]  and haClose[2] <  haClose[3] 
shortC = haClose < haClose[1] and   haClose[1] < haClose[2]  and haClose[2] > haClose[3] 


luni = input(true, title="Monday")
marti = input(true, title="Tuesday")
miercuri = input(true, title="Wednesday")
joi = input(true, title="Thursday")
vineri = input(true, title="Friday")
if(time_cond)
    if(t1)
        if(luni==true and dayofweek == dayofweek.monday)
            if(longC and longe )
                strategy.entry("long",1)
            if(shortC and shorte)
                strategy.entry("short",0)
                
        if(marti==true and dayofweek == dayofweek.tuesday)
            if(longC and longe )
                strategy.entry("long",1)
            if(shortC and shorte)
                strategy.entry("short",0)
                
        if(miercuri==true and dayofweek == dayofweek.wednesday)
            if(longC and longe  )
                strategy.entry("long",1)
            if(shortC and shorte)
                strategy.entry("short",0)
                
        if(joi==true  and dayofweek == dayofweek.thursday)
            if(longC and longe)
                strategy.entry("long",1)
            if(shortC and shorte)
                strategy.entry("short",0)
                
        if(vineri==true and  dayofweek == dayofweek.friday)
            if(longC and longe)
                strategy.entry("long",1 )
            if(shortC and shorte)
                strategy.entry("short",0)  


//strategy.exit("closelong", "RSI_BB_LONG" , profit = close * 0.01 / syminfo.mintick, loss = close * 0.01 / syminfo.mintick, alert_message = "closelong")
//strategy.exit("closeshort", "RSI_BB_SHORT" , profit = close * 0.01 / syminfo.mintick, loss = close * 0.01 / syminfo.mintick, alert_message = "closeshort")

strategy.exit("sl","long", loss = close * sl / syminfo.mintick, profit = close * tp / syminfo.mintick)
strategy.exit("sl","short", loss=close * sl / syminfo.mintick, profit = close * tp / syminfo.mintick)

//strategy.close("long")
//strategy.close("short" )

//strategy.exit("sl","long", loss = sl)
//strategy.exit("sl","short", loss= sl)

if(not t2)
    strategy.close_all()
//strategy.risk.max_intraday_filled_orders(2)





더 많은