UnknownUnicorn187266

Forex Trading Sessions with Daylight Savings TimeV1 - Max Warren

Different version of the CM one but everything is configurable and easy to manage.

Daylight savings may also be toggled, I cannot automatically toggle it yet but hopefully with a pine update I will be able to.

It had the four main sessions but version two could possibly have all of them as optional toggles

Hope it is useful
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?
study(title="Sessions - Max Warren", shorttitle="Sessions - Max Warren", overlay=true)
timeinrange(res, sess) => time(res, sess) != 0
    
render = input(false,title="Slow but exact background (Refresh page)")
renderRes = render ? "1" : "5"
lines = input(true, title="Border")

//True = winter; False = summer
DST = input(true)

//Tokyo
tokyoSession = "2300-0800" // time does not change for tokyo
tokyoSLB = "2300-2310"
tokyoSRB = "0800-0810"
tokyoColor = red
tokyo = input(true)
tokyoLines = input(true, title="Lines")
bgcolor(tokyo and timeinrange(renderRes, tokyoSession) ? tokyoColor : na, transp=96, title="Tokyo Session")
bgcolor(tokyoLines and lines and timeinrange(renderRes, tokyoSLB) ? tokyoColor : na, transp=50, title="Tokyo Left Border")
bgcolor(tokyoLines and lines and timeinrange(renderRes, tokyoSRB) ? tokyoColor : na, transp=50, title="Tokyo Right Border")

//London
londonSession = DST == true ? "0800-1700" : "0700-1600" //summer
londonSLB = DST == true ? "0800-0810" : "0700-0710"
londonSRB = DST == true ? "1700-1710" : "1590-1600"
londonColor = blue
london = input(true)
londonLines = input(true, title="Lines")
bgcolor(london and timeinrange(renderRes, londonSession) ? londonColor : na, transp=96, title="London Session")
bgcolor(londonLines and lines and london and timeinrange(renderRes, londonSLB) ? londonColor : na, transp=50, title="London Left Border")
bgcolor(londonLines and lines and london and timeinrange(renderRes, londonSRB) ? londonColor : na, transp=50, title="London Right Border")

//New York
newyorkSession = DST == true ? "1300-2200" : "1200-2100" //summer
newyorkSLB = DST == true ? "1300-1310" : "1200-1210"
newyorkSRB = DST == true ? "2200-2210" : "2100-2110"
newyorkColor = green
newyork = input(true, title="New York")
newyorkLines = input(true, title="Lines")
bgcolor(newyork and timeinrange(renderRes, newyorkSession) ? newyorkColor : na, transp=96, title="New York Session")
bgcolor(newyorkLines and lines and newyork and timeinrange(renderRes, newyorkSLB) ? newyorkColor : na, transp=50, title="New York Left Border")
bgcolor(newyorkLines and lines and newyork and timeinrange(renderRes, newyorkSRB) ? newyorkColor : na, transp=50, title="New York Right Border")


sydneySession = DST == true ? "2100-0600" : "2200-0700" //summer
sydneySLB = DST == true ? "2100-2110" : "2210-2220"
sydneySRB = DST == true ? "0600-610" : "0690-0700"
sydneyColor = yellow
sydney = input(true)
sydneyLines = input(true, title="Lines")
bgcolor(sydney and timeinrange(renderRes, sydneySession) ? sydneyColor : na, transp=96, title="Sydney Session")
bgcolor(sydneyLines and lines and sydney and timeinrange(renderRes, sydneySLB) ? sydneyColor : na, transp=50, title="Sydney Left Border")
bgcolor(sydneyLines and lines and sydney and timeinrange(renderRes, sydneySRB) ? sydneyColor : na, transp=50, title="Sydney Right Border")