The time ranges are set to the default Frankfurt, London, NY, Sydney and Tokyo, but can be
freely modified and turned off (I personally use to display only Tokyo and NY).
If you are a day trader, e.g. you trade with the Market Makers, this tool is a "must have".
It also displays the day of the week, which can be set off as well.
vitelot/yanez/Vts Sept 2019
PS I chose this script to belong to the "volatility" category since it can be used to highlight the Asian session,
and there was no suitable category available.
I have hacked this to add my own time zones etc.
Luckily your code is easy to read (unlike that from others).
The day name display is not working for me at all. The menu is there to turn it on / off and all that. But it never displays.
Have you any idea why that might be? Is that functionality definitely still working?
Let me know
The day name displays only on timeframes up to 4H.
You need to rework the script to be able to display it up to the daily. But then the code gets weird...
Does this answer your Q?
Here is what I got:
It would be nice for the shape text to be a little smaller I guess, maybe I'll figure that out at some stage ;0)
Only issues I have is with the transparency set for the shaded area set by the script (is always at 1%, I don't know why).
But otherwise am happy with the result.
// Determine the chart's background colour for the current day / time
chartColour = BarInSession(weekendSession) ? monToFriColour : weekendColour // this works
// Determine the chart's background color transparency for the current day / time
chartColourTransparency = BarInSession(weekendSession) ? monToFriColourTransparency : weekendColourTransparency // probably works too, but bgcolour function will not accept it
bgcolor(color=chartColour, transp=91, title="Weekend session")
// the above line of code works, but I have no idea why the following line of code does not work:
//bgcolor(color=chartColour, transp=chartColourTransparency, title="Weekend session")
I guess that the bgcolour() function just will not allow the transp property to be set in this way. But if you know of how I could fix this or can see what I have done wrong here then please let me know. Basically, yes my code is colouring the background of weekdays as blue, and weekends as red. But it is not allowing me via the code to set different transparencies for those two colours.