BongHuyn

Simple FX Market Hours

BongHuyn Updated   
█ OVERVIEW

A simple market session indicator that show you what market is in session according to the timezone you configured. It will draw a table with 4 cells matching 4 market Sydney, Tokyo, London and New York. Whenever market is in session the matching text will change colour.

█ WHAT MAKE THIS DIFFERENT

All other indicator on the market are either bar colouring, background colouring, or some sort of box drawing on the chart which is very messy and cluttered your chart. This indicator is as simple as it gets. The label are positions by default at the top right corner (you can change this in the config). It doesn’t draw anything on your chart so you can get right into your price action without anything blocking you.

Also, these type of indicator on the market are not auto converting the market session time to your your configured timezone, you will have to manually entered in the market session hours in your local time. This indicator does! Or perhaps I didn’t look hard enough. Either way I think there aren’t any indicator that are this simple.

█ HOW IT WORKS

I’m using table function (available to pinescript version 4 and above) to position the market labels and change colour of them according to if the market is in session or not.

For timezone, I have predefined all the market hours in all of the timezone from GMT-12 to GMT+12. When you select your timezone it will convert it to the symbol’s exchange timezone. Feel free to update the timezone if I had it incorrectly.

This script doesn’t take into account the DST because DST doesn’t starts or ends on a fixed date.

I also put in a check for symbol type using: syminfo.type == "forex”. So that it will only display if you are on forex pairs. You don’t need to hide it while you are looking at crypto or other assets. For convenience purposes.

█ NOTES

If you like the script be sure to press the like button it will help shows other people that this is useful. Thank you very much!
Release Notes:
Fix a bug in calculating timezone differences
Release Notes:
  • Fix timezone not converting probably and the labels are not updating.
Release Notes:
Minor fix
Release Notes:
  • Fix weekend logic weekend will now start from 10pm FRIDAY til 10PM SUNDAY, GMT+0 timezone.
Release Notes:
  • Add an override settings temporary to solve daylight saving. I will look more into how to get this pre-configured so all you have to do is check a box for daylight saving without manually entering in the correct daylight saving time session for your local timezone.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?