Sessions Rainbow EST with overlaps
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © jlc3fx

//@version=5

indicator("Sessions Rainbow EST with overlaps", overlay=true)

frankfurt       = time(timeframe.period, "0200-0300")
london          = time(timeframe.period, "0300-0800")
london_newyork  = time(timeframe.period, "0800-1100")
newyork         = time(timeframe.period, "1100-1600")
sidney          = time(timeframe.period, "1600-1800")
sidney_tokyo    = time(timeframe.period, "1800-0000")
tokyo           = time(timeframe.period, "0000-0200")

Sidney          = na(sidney)         ? na : color.new(#FF0000, 90)  // Red
Sidney_tokyo    = na(sidney_tokyo)   ? na : color.new(#FF7F00, 90)  // Orange
Tokyo           = na(tokyo)          ? na : color.new(#FFFF00, 90)  // Yellow   
Frankfurt       = na(frankfurt)      ? na : color.new(#00FF00, 90)  // Green
London          = na(london)         ? na : color.new(#0000FF, 90)  // Blue  
London_newyork  = na(london_newyork) ? na : color.new(#4B0082, 90)  // Indigo
Newyork         = na(newyork)        ? na : color.new(#9400D3, 90)  // Violet 

bgcolor(Frankfurt     , title="Frankfurt")
bgcolor(London        , title="London")
bgcolor(London_newyork, title="London NewYork")
bgcolor(Newyork       , title="NewYork")
bgcolor(Sidney        , title="Sidney")
bgcolor(Sidney_tokyo  , title="Sidney Tokyo")
bgcolor(Tokyo         , title="Tokyo")
	
