Chicago Trading Sessions UTC-5

Andersen1409 · study · 19 行 · 点赞 3 · TradingView 原页

本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。

Pine Script

//@version=6
indicator("Chicago Trading Sessions UTC-5", overlay=true)
 
string TZ = "UTC-5"
 
// Sessions
bool asia    = not na(time(timeframe.period, "1900-0400", TZ))
bool london  = not na(time(timeframe.period, "0200-1100", TZ))
bool newYork = not na(time(timeframe.period, "0700-1600", TZ))
 
// Background colors
color asiaColor    = color.new(color.blue, 90)
color londonColor  = color.new(color.green, 90)
color newYorkColor = color.new(color.orange, 90)
 
// Color the entire chart background
bgcolor(asia ? asiaColor : na, title="Asia")
bgcolor(london ? londonColor : na, title="London")
bgcolor(newYork ? newYorkColor : na, title="New York")

← 返回列表