BongHuyn

Simple FX Market Hours

BongHuyn Aktualisiert   
█ 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!
Versionshinweise:
Fix a bug in calculating timezone differences
Versionshinweise:
  • Fix timezone not converting probably and the labels are not updating.
Versionshinweise:
Minor fix
Versionshinweise:
  • Fix weekend logic weekend will now start from 10pm FRIDAY til 10PM SUNDAY, GMT+0 timezone.
Versionshinweise:
  • 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 Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?