indicator · on price · open source
Asian / London / NY Killzones
Running…
Loading chart…
About
Asian / London / NY Killzones shade the chart background during the three classic institutional trading windows (UTC hours).
- Asian: 00:00–08:00 UTC (default purple shade).
- London: 08:00–13:00 UTC (default blue shade).
- New York: 13:00–20:00 UTC (default green shade).
- Toggle each zone on/off via the input checkboxes; pick custom colours per zone.
Source code
//@version=5
indicator("Asian / London / NY Killzones", overlay=true)
showAsian = input.bool(true, "Show Asian")
showLondon = input.bool(true, "Show London")
showNy = input.bool(true, "Show New York")
asianColor = input.string("#9c27b050", "Asian Color")
londonColor = input.string("#2962ff50", "London Color")
nyColor = input.string("#4caf5050", "New York Color")
h = math.floor((time / 3600000) % 24)
isAsian = h >= 0 and h < 8
isLondon = h >= 8 and h < 13
isNy = h >= 13 and h < 20
asianBg = showAsian and isAsian ? asianColor : na
londonBg = showLondon and isLondon ? londonColor : na
nyBg = showNy and isNy ? nyColor : na
bgCol = not na(asianBg) ? asianBg : (not na(londonBg) ? londonBg : (not na(nyBg) ? nyBg : na))
bgcolor(bgCol)
alertcondition(showAsian and isAsian and not isAsian[1], "Asian opens", "Asian killzone active")
alertcondition(showLondon and isLondon and not isLondon[1], "London opens", "London killzone active")
alertcondition(showNy and isNy and not isNy[1], "NY opens", "New York killzone active")
No comments yet.
Sign in to comment.