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 อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?