Indicators: News events and market times on your chart

 

News events and market times on your chart:

Indicator displays News with a market clock.

Author: Tjipke de Vries

 

Hi deVries,


I found another possible issue and I cannot see what needs to be changed/fixed.

I am not getting the "market open" to display properly for the NZ, AS, JP, and HK sessions. Europe, London and NY seem to work fine. See screenshot below.

According to the comments in your code and verified on the worldmarkethours.com site (above) at the time of this screenshot, the New Zealand, Australian and Japan sessions should show as open.


The time calculations in this are challenging my current coding skills.

Any suggestions on what might be going on??

thanks,

dave

P.S. I followed up over here rather than on the donnaforex.com because I am more familiar with how to post here.

 
bdeyes:

Hi deVries,

I found another possible issue and I cannot see what needs to be changed/fixed.

I am not getting the "market open" to display properly for the NZ, AS, JP, and HK sessions. Europe, London and NY seem to work fine. See screenshot below.

According to the comments in your code and verified on the worldmarkethours.com site (above) at the time of this screenshot, the New Zealand, Australian and Japan sessions should show as open.

The time calculations in this are challenging my current coding skills.

Any suggestions on what might be going on??

thanks,

dave

P.S. I followed up over here rather than on the donnaforex.com because I am more familiar with how to post here.


You are playing with the code, this is not the way you have downloaded the indicator the clockdisplay was only to move down and go to the right

This was to avoid to put it at the same corner where the upcoming/recent news events appear. You changed the spread for 5 digit brokers

I guess download the indicator again if you don't have the original I made and see if this indicator does it the way it has to do...

Your the first telling me this.....

So it could be by changing the code you have done something wrong why it is now wrong displayed

 
bdeyes:

Hi deVries,


I found another possible issue and I cannot see what needs to be changed/fixed.

I am not getting the "market open" to display properly for the NZ, AS, JP, and HK sessions. Europe, London and NY seem to work fine. See screenshot below.

According to the comments in your code and verified on the worldmarkethours.com site (above) at the time of this screenshot, the New Zealand, Australian and Japan sessions should show as open.



The time calculations in this are challenging my current coding skills.

Any suggestions on what might be going on??

thanks,

dave

P.S. I followed up over here rather than on the donnaforex.com because I am more familiar with how to post here.

I had the similar issues but from the fix which I came up with it wasn't the fact that I had changed the code for a 5 point broker. The trouble for me was the the StrToTime for Auckland was giving a time for the day before. I fixed it by adding turning the times into strings only. It seems to work.

if(NZDHoliday < TimeCurrent()){
  if ((StrToTime (aucklands) > StrToTime ("9:45"))&& (StrToTime (aucklands) <  StrToTime("10:00"))&& TimeDayOfWeek(auckland) != 0 && TimeDayOfWeek(auckland) != 6)
      {closingSession = "New Zealand opens in " + (60 - TimeMinute(TimeLocal()))+ " mins";}
  if ((auckland > StrToTime ("10:00")) && ((auckland) <  StrToTime("16:45")) && TimeDayOfWeek(auckland) != 0 && TimeDayOfWeek(auckland) != 6)
   {
      openSessions = openSessions + " New Zealand";
      if(TimeHour(auckland) == 16 && TimeMinute(auckland)>14 && TimeMinute(auckland)<45)
       {
         closingSession = "New Zealand closing in " + (45 - TimeMinute(TimeLocal()))+ " mins";
       } 
   }
 }  



 
deVries:
bdeyes:

Hi deVries,

I found another possible issue and I cannot see what needs to be changed/fixed.

I am not getting the "market open" to display properly for the NZ, AS, JP, and HK sessions. Europe, London and NY seem to work fine. See screenshot below.

According to the comments in your code and verified on the worldmarkethours.com site (above) at the time of this screenshot, the New Zealand, Australian and Japan sessions should show as open.

The time calculations in this are challenging my current coding skills.

Any suggestions on what might be going on??

thanks,

dave

P.S. I followed up over here rather than on the donnaforex.com because I am more familiar with how to post here.


You are playing with the code, this is not the way you have downloaded the indicator the clockdisplay was only to move down and go to the right

This was to avoid to put it at the same corner where the upcoming/recent news events appear. You changed the spread for 5 digit brokers

I guess download the indicator again if you don't have the original I made and see if this indicator does it the way it has to do...

Your the first telling me this.....

So it could be by changing the code you have done something wrong why it is now wrong displayed

Hi Tjipke,

Per your suggestion i have downloaded a clean version of the indi from above and ran it as downloaded (without any changes/modifications)

The result was the the same as in my October 6 post (see new screenshot below)

The Market Hours website shows the NZ market is open at 1400 local and AUS market opens 1600 local and both show as closed on indi - at the time of the screenshot both markets are open and indi shows closed.

Maybe a timezone problem? I am in North America (Pacific Daylight Savings Time = GMT-7) and broker time is New York (GMT-4).

I do not understand the other post on this issue, the TimeToString function already converts the time and if it is a current day / previous day problem it seems to me that should only be a problem on the first or last day of the week. However, I will implement a version with that suggestion in it and see what the results are.

Also the clock indicator can be put in the same corner under the news events by simply adjusting the godown and goright values.



thanks,

Dave

 

Thanks bdeyes and heelflip43

Saw the error with changing the timezone of my pc

Made a change in how to get GMT value and used the suggestion of heelflip43

Also made a change for the spread

I only don't know how to put this new version at the top of this topic

So for all it is placed inside https://www.mql5.com/go?link=http://www.donnaforex.com/forum/index.php?topic=4339.0

 

Hi Tjipke,

Yep, new version seem to solved all those issues. It's working great for me!

I think you have to re-post the indi again to get it on this site. Maybe whoever proofreads the post can help you link it back to this one (or you can put links between the posts).

thanks,

dave

 

Hi Tjipke,

 

It's great indicator for the news events, I've not seen such great indicator. Thanks again.

 

Recently i observed news events are not showing up on my metatrador. seems like http://www.dailyfx.com/files/  is not supporting any more. Any suggestions?. 

 

Thanks,

Suresh 

 
This is a great indicator but it's no longer working. Hope someone can fix it.
 

Hi ... Is it possible to show all past News lines, not only the future news lines?

Best Regards

Files:
news_line.png  119 kb