Category Other  Published on 09/09/2013

Real Market Hours

Description

Half the secret to being successful in the ForEx markets is timing.  I haven't seen a reliable market hours indicator posted here, so here is my verison.  Opening and closing times for the New York and London markets are based on 8 to 5 business hours.  Opening and closing times for Sydney and Japan are based on 9 to 5 business hours.  Some people use 6pm close time for Tokyo and some use a 4pm close time for Sydney.  However, did you know that ForEx trading hours are not based on corresponding stock markets close times?  They are based on investment banking business hours.  You can set the hours as you like within the indicator.  Many beginers think once you convert the business hours to local time that you will have the market hours all figured out, but its not that simple.  Did you know that Daylight savings starts on different days in London and New York.  So there is a period in March where  opening time in New York is at 12pm instead of 1pm.  Did you know Daylight savings in Austrailia is reverse that of New York so that opening times shift 2 hours instead of one between the winter and summer months, leaving a 2 hour gap between the New York close and the Sydney open?  Do you know which timezone your broker is using and how it affects the conversion?  Well all that is taken care of with my handy dandy market hours indicator! WooHoo!

The markets are color coded and I assigned the market hour value to the result so you could better visually see as markets are coming to a close and execute trades based on specific hours.  Make sure you comment out the LocalTime zone which does not apply to you.  cTrader brokers seem to be using either Cyprus time or UTC Local Time Zones.  Hope it helps!


u

lec0456's avatar
lec0456

Joined on 14.11.2012

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Real Market Hours.algo
  • Rating: 5
  • Installs: 6136
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
PO
polinazinkk · 2 years ago

I'd say that nowadays, it's more beneficial for entrepreneurs to learn how to promote their business because for some reason, most of them don't put enough mind to it. But I don't understand what's the problem with checking various articles like https://prposting.com/blog/25-redirect-301 to understand the basic and how to develop a good link building strategy, it's not hard at all.

AN
anton.kovalchuk · 4 years ago

Tnak you a lot! 

JA
jakubdonovan · 8 years ago

Hi, is it possible to make the sessions appear as very light colour boxes on the chart rather than dots under the chart? 

lec0456's avatar
lec0456 · 9 years ago

if you are live it will give you a different value depending on when you run it.  but it works for me.just the way you mention.  As far as daylight saving, the system time functions take care of that when you convert.  so, all is good.

lec0456's avatar
lec0456 · 9 years ago

if you are live it will give you a different value depending on when you run it.  but it works for me.just the way you mention.  As far as daylight saving, the system time functions take care of that when you convert.  so, all is good.

DE
deejbee · 10 years ago

Hi All,

This looks like a great indicator lec0456 so I've tried to use it in a bot I'm writing but can't seem to get it working.

Say I want to create a position after London has opened, I thought this would suffice:

protected override void OnTick()
{

    if (_realMarketHours.London.LastValue > 0) {

        Print("_realMarketHours.London.LastValue: {0}", _realMarketHours.London.LastValue);

         //create position

    }

}

 

However running this on a backtest produces different results in the log every time.

Can I use it this way?

Many thanks

 

AR
Arpad · 10 years ago

Thanks, this is superior, awesome!

lec0456's avatar
lec0456 · 11 years ago

So, just uploaded a big update to this indicator related to all the recent platform changes in handling the Time.  So now the robot uses the timezone set by the new timezone attribute of the indicator.  Before, there would have been issues if you set the indicator timezone to something different from the broker timezone, but now they are one and the same. Good Luck! 

lec0456's avatar
lec0456 · 11 years ago
Robo Forex and Fibo Group are also using Cyprus time. Actually, I think its best because it divides the day properly. Once New York closes on a particular day, the Australian Session begins on the following day. For example, if the NY session closes on the 15th at 4:59pm EST at 5pm EST the Australian Session begins and it is the 16th in Australia. Cyprus time is 12am. During the summer months when there is a gap between the NY and Australian Sessions, Cyprus time still falls in between, nicely dividing the trading day data. I guess that's why Cyprus is the center of the Forex Universe:)
lec0456's avatar
lec0456 · 11 years ago
I added the following lines: TimeZoneInfo LocalTimeZone = TimeZoneInfo.FindSystemTimeZoneById("UTC"); //GMT Time w/ no daylight savings For Divisa Capitol and IC Markets //Print("Local Time Zone Name:{0} Offset:{1} DST:{2} ",LocalTimeZone.DisplayName,LocalTimeZone.BaseUtcOffset,LocalTimeZone.SupportsDaylightSavingTime); [Levels(8,9,10,11,12,13,14,15,16)]
lec0456's avatar
lec0456 · 11 years ago
Ok, had to update the code. Sorry. It turns out that IC markets uses UTC Time not London time(GMT Standard Time) as originally coded. You might think they are the same but London used daylight savings and UTC does not, so you would be off by an hour during the summer. I couldn't really verify that until March 30th when it kicked in for London. Also, I verified that Divisa Capitol uses UTC as well, same as IC Markets and Lqd Markets uses Cyprus Time same as FX Pro and Trader's Way. So, now the indicator should be accurate for all platforms. I also added a levels statement to display the times consistently and a print statement to verify time zone info if necessary. Hope it helps!