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
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
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")