BongHuyn

Simple FX Market Hours

BongHuyn 已更新   
█ 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!
發布通知:
Fix a bug in calculating timezone differences
發布通知:
  • Fix timezone not converting probably and the labels are not updating.
發布通知:
Minor fix
發布通知:
  • Fix weekend logic weekend will now start from 10pm FRIDAY til 10PM SUNDAY, GMT+0 timezone.
發布通知:
  • 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.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?