finn

Forex Session Overlap

Applies gray background coloring for each major active Forex session, the more sessions active the lighter the background. Adjusted coloring for low (Sydney, Tokyo) and high (Frankfurt, London, New York) liquidity. Market opening hours for Sydney, Tokyo, Frankfurt, London and New York have been set to 08:00 - 17:00 local time and are converted to EST while taking daylight saving time into account across regions (REMEMBER: configure manually!). Sessions can be turned on or off separately. By default this indicator hides itself in larger time-frames (>30min by default). Enabling session breaks or daily pivots helps distinguish between sessions.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
// Created By: Finn
// Date: 2015-05-16 (initial publication)
// Description: Applies gray background coloring for each major active forex session,
//                  the more sessions active the lighter the background.
//              Adjusted coloring for low (Sydney, Tokyo) and high (Frankfurt, London, New York) liquidity
//              Market opening hours for Sydney, Tokyo, Frankfurt, London and 
//                  New York have been set to 08:00 - 17:00 local time and are converted
//                  to EST while taking daylight saving time into account across regions (REMEMBER: configure manually!).
//              Sessions can be turned on or off separately.
//              By default this indicator hides itself in larget timeframes (>30min by default).
//              Enabling session breaks or daily pivots helps distinguish between sessions.

study(title="Forex Session Overlap",shorttitle="Forex Session Overlap", overlay=true)
timeinrange(res, sess) => time(res, sess) != 0

maxDisplayInterval = input(defval=30,    type = integer, title="Hide above interval (minutes)", minval=1, maxval=240)
australiaDstOn     = input(defval=false, type = bool, title="Australia DST (summer time)")
europeDstOn    	   = input(defval=true,  type = bool, title="Europe DST (summer time)")
usaDstOn           = input(defval=true,  type = bool, title="U.S.A. DST (summer time)")

doSydney       = input(defval=true, type = bool, title="Sydney session")
doTokyo        = input(defval=true, type = bool, title="Tokyo session")
doFrankfurt    = input(defval=true, type = bool, title="Frankfurt session")
doLondon       = input(defval=true, type = bool, title="London session")
doNewYork      = input(defval=true, type = bool, title="New York session")

loadIndicator = (interval <= maxDisplayInterval)

lineTransparency = 50

marketPeriodColor       = #181818
marketPeriodColorLiquid = #303030

//Open/close times in local TimeZone DST Off:
//Syndey:    08:00 - 17:00 +10 GMT (+11 GMT @DST on, 04-10-2015 - 03-04-2016)
//Tokyo:     08:00 - 17:00  +9 GMT ( +9 GMT no DST!!)
//Frankfurt: 08:00 - 17:00  +1 GMT ( +2 GMT @DST on, 29-03-2015 - 25-10-2015)
//London:    08:00 - 17:00  +0 GMT ( +1 GMT @DST on, 29-03-2015 - 25-10-2015)
//New York:  08:00 - 17:00  -5 GMT ( -4 GMT @DST on, 08-03-2015 - 01-11-2015)

//**************************************************************************
//Convert all open times to EST (with and without DST differences)
//**Sydney to New York
//sydOpenDstOffNyDstOff = "1700" //-15h/+9h
//sydOpenDstOffNyDstOn  = "1800" //-14h/+10h
//sydOpenDstOnNyDstOff  = "1600" //-16h/+8h
//sydOpenDstOnNyDstOn   = "1700" //-15h/+9h
//**Tokyo (no DST) to New York
//tokOpenNyDstOff       = "18:00" //-14h/+10h
//tokOpenNyDstOn        = "19:00" //-13h/+11h
//**Central Europe to New York
//ffOpenDstOffNyDstOff  = "02:00" //-6h/+18h
//ffOpenDstOffNyDstOn   = "03:00" //-5h/+19h
//ffOpenDstOnNyDstOff   = "01:00" //-7h/+17h will not occur
//ffOpenDstOnNyDstOn    = "02:00" //-6h/+18h
//**London to New York
//lonOpenDstOffNyDstOff = "03:00" //-5h/+19h
//lonOpenDstOffNyDstOn  = "04:00" //-4h/+20h
//lonOpenDstOnNyDstOff  = "02:00" //-6h/+18h will not occur
//lonOpenDstOnNyDstOn   = "03:00" //-5h/+19h
//
// Close times are always 9 hours later as every market is open locally from 08:00 - 17:00
//
//**************************************************************************

//Determine which which times to use
audOpenDstOffNyDstOff = (not australiaDstOn and not usaDstOn)	//"1700" //-15h/+9h
audOpenDstOffNyDstOn  = (not australiaDstOn and usaDstOn)	    //"1800" //-14h/+10h
audOpenDstOnNyDstOff  = (australiaDstOn and not usaDstOn)	    //"1600" //-16h/+8h
audOpenDstOnNyDstOn   = (australiaDstOn and usaDstOn)		    //"1700" //-15h/+9h
jpyOpenNyDstOff       = (not usaDstOn)				            //"18:00" //-14h/+10h
jpyOpenNyDstOn        = usaDstOn				                //"19:00" //-13h/+11h
eurOpenDstOffNyDstOff = (not europeDstOn and not usaDstOn)	    //"02:00" //-6h/+18h
eurOpenDstOffNyDstOn  = (not europeDstOn and usaDstOn)	    	//"03:00" //-5h/+19h
eurOpenDstOnNyDstOff  = (europeDstOn and not usaDstOn)		    //"01:00" //-7h/+17h will not occur
eurOpenDstOnNyDstOn   = (europeDstOn and usaDstOn)		        //"02:00" //-6h/+18h

bgcolor(loadIndicator and doSydney  	and audOpenDstOffNyDstOff 	and timeinrange(period, "1700-0200")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doSydney  	and audOpenDstOffNyDstOn  	and timeinrange(period, "1800-0300")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doSydney  	and audOpenDstOnNyDstOff  	and timeinrange(period, "1600-0100")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doSydney  	and audOpenDstOnNyDstOn   	and timeinrange(period, "1700-0200")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doTokyo  	    and jpyOpenNyDstOff   		and timeinrange(period, "1800-0300")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doTokyo  	    and jpyOpenNyDstOn   		and timeinrange(period, "1900-0400")  ? marketPeriodColor       : na, transp=lineTransparency)
bgcolor(loadIndicator and doFrankfurt  	and eurOpenDstOffNyDstOff	and timeinrange(period, "0200-1100")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doFrankfurt  	and eurOpenDstOffNyDstOn   	and timeinrange(period, "0300-1200")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doFrankfurt  	and eurOpenDstOnNyDstOff  	and timeinrange(period, "0100-1000")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doFrankfurt  	and eurOpenDstOnNyDstOn   	and timeinrange(period, "0200-1100")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doLondon  	and eurOpenDstOffNyDstOff   and timeinrange(period, "0300-1200")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doLondon  	and eurOpenDstOffNyDstOn   	and timeinrange(period, "0400-1300")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doLondon  	and eurOpenDstOnNyDstOff   	and timeinrange(period, "0200-1100")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doLondon  	and eurOpenDstOnNyDstOn   	and timeinrange(period, "0300-1200")  ? marketPeriodColorLiquid : na, transp=lineTransparency)
bgcolor(loadIndicator and doNewYork 	            				and timeinrange(period, "0800-1700")  ? marketPeriodColorLiquid : na, transp=lineTransparency)