• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:44am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:44am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Average session range, session candle indicators 4 replies

World News and a World Clock to keep time 29 replies

Cool Time And Date Zone Website and Time Zone Converter. :) 3 replies

Forex Clock: Live Feed Session Times. 12 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 47
Attachments: New very cool CandleTime and session time Clock indicators
Exit Attachments
Tags: New very cool CandleTime and session time Clock indicators
Cancel

New very cool CandleTime and session time Clock indicators

  • Last Post
  •  
  • 1 34Page 567 10
  • 1 4Page 56 10
  •  
  • Post #81
  • Quote
  • Sep 16, 2011 12:02am Sep 16, 2011 12:02am
  •  pah
  • | Joined Apr 2011 | Status: Basket Case | 235 Posts
http://forex.timezoneconverter.com/

Here you can also specify your local time zone so it will tell you when each market opens & closes for your local time.

Regards, Paul.
 
 
  • Post #82
  • Quote
  • Sep 16, 2011 12:17am Sep 16, 2011 12:17am
  •  Callisto
  • | Additional Username | Joined Jun 2011 | 421 Posts
Quoting pah
Disliked
http://forex.timezoneconverter.com/

Here you can also specify your local time zone so it will tell you when each market opens & closes for your local time.

Regards, Paul.
Ignored
Hey, that is pretty neat, thanks, here is one that I also use, check it out

http://www.forex4noobs.com/forex-tools/forex-clock/

OPPORTUNITY IS NOWHERE
 
 
  • Post #83
  • Quote
  • Sep 16, 2011 2:02am Sep 16, 2011 2:02am
  •  kitsura
  • | Joined Jun 2011 | Status: Member | 3 Posts
Quoting pah
Disliked
http://forex.timezoneconverter.com/

Here you can also specify your local time zone so it will tell you when each market opens & closes for your local time.

Regards, Paul.
Ignored
I don't think that is accurate. For one the Tokyo Forex hours are wrong.
 
 
  • Post #84
  • Quote
  • Sep 16, 2011 2:48am Sep 16, 2011 2:48am
  •  pah
  • | Joined Apr 2011 | Status: Basket Case | 235 Posts
Quoting kitsura
Disliked
I don't think that is accurate. For one the Tokyo Forex hours are wrong.
Ignored
I've never checked it but from other sources it seems they might have a 9 hour session. What do you think the correct times should be?

I emailed them to query it anyway.

Regards, Paul.
 
 
  • Post #85
  • Quote
  • Sep 16, 2011 7:04am Sep 16, 2011 7:04am
  •  kitsura
  • | Joined Jun 2011 | Status: Member | 3 Posts
Quoting pah
Disliked
I've never checked it but from other sources it seems they might have a 9 hour session. What do you think the correct times should be?

I emailed them to query it anyway.

Regards, Paul.
Ignored
9-6 JST. Since I work in a Japanese company I know for certain that banks only operate from 9am so any site that lists 8am JST as the tokyo forex opening hour is definitely wrong.
 
 
  • Post #86
  • Quote
  • Sep 18, 2011 4:20pm Sep 18, 2011 4:20pm
  •  pips4life
  • Joined Apr 2007 | Status: Member | 873 Posts

See post #1 for the latest update:



2011-09-18: New "P4L Clock.mq4" v2_9
Changes:
* Tokyo local market Open/Close hours changed to 9AM-6PM (These are user controllable using variables TokyoLocalOpenHour and TokyoLocalCloseHour)
* Moscow TZ was updated because it no longer observes any change for ST/DST.


P.S. I considered whether it was possible to implement a simple visual clue whether each timezone was observing DST or not. Several timezone websites do offer this information so it certainly must be possible.


The Clock program makes use of a Windows function, "SystemTimeToTzSpecificLocalTime". While it does tell me what time it is in various user-specified timezones, what it doesn't tell me is whether the output time is observing ST or DST.

If anyone knows of a publicly available function that does, let me know. The function "GetTimeZoneInformation" would be perfect except that it only indicates whether the LOCAL machine's timezone is observing ST or DST. I don't care about the local TZ but care instead about the various market zones. I'm still looking for a function that can better work with remote timezones that tells me whether DST is at any given moment being observed or not.

 
 
  • Post #87
  • Quote
  • Sep 20, 2011 4:26am Sep 20, 2011 4:26am
  •  pips4life
  • Joined Apr 2007 | Status: Member | 873 Posts

See post #1 for the latest update:



My apologies to the 9 people that downloaded the recent v2_9 release in which I introduced an error with the "Berlin" timezone. That is now fixed in "v2_10". The v2_9 list of changes are repeated here:


2011-09-20: New "P4L Clock.mq4" v2_10
Changes:
* Tokyo local market Open/Close hours changed to 9AM-6PM (These are user controllable using variables TokyoLocalOpenHour and TokyoLocalCloseHour)
* Moscow TZ was updated because it no longer observes any change for ST/DST.

* (Fixed an error with Berlin time that was briefly there in v2_9)

 
 
  • Post #88
  • Quote
  • Sep 20, 2011 10:48am Sep 20, 2011 10:48am
  •  extremerrage
  • | Joined Jan 2011 | Status: Member | 201 Posts
Quoting pips4life
Disliked
Last "P4L Clock.mq4" update: Sep 20, 2011, posted new v2_10
Last "P4L CandleTime.mq4" update: Mar 22, 2011, posted new v1_3

Hi all,

I have used CandleTime.mq4 (aka b-Clock.mq4) for a long time, and it had some quirks in the display of single digits (e.g. ":9" instead of ":09"), and sometimes the number of seconds remaining went negative, which I thought was strange and a bit hard to notice the "-" sign.

I cleaned up the code and added some user variables to control color, and/or display of the time by the bar, and/or...
Ignored
indeed very cool thxxxx
 
 
  • Post #89
  • Quote
  • Oct 8, 2011 4:59am Oct 8, 2011 4:59am
  •  all4X
  • | Joined Oct 2009 | Status: Member | 10 Posts
Hi, P4L,

Thank you for sharing your P4Lclock. I just hunted it in the Forex Factory forest. I find it excellent for what it is designed and very useful.

Two questions:

1) If I wish to edit the program to replace Jakarta with a more significant market like Singapore, do I just replace all instances of "Jakarta"
with "Singapore" and do I have to arrange the TZArray and all the "if" arguments in chronological order? Or is it more complicated than that?

2) Is it possible to incorporate ATR (Average True Range) into the program, with user-defineable variables? There should be sufficient vertical space since not all the cities will be set to "true" by everyone.

Since you already have ADR etc, do you think it will tax the CPU any further if ATR were added?

As you mention in post #17 "...but I put whatever I could into the init() procedure ...", it may help similarly. I do not know. Just speculating. Am not a coder...

I hope this request is not the final straw...

Thank you.


Allison
 
 
  • Post #90
  • Quote
  • Oct 8, 2011 7:24pm Oct 8, 2011 7:24pm
  •  pips4life
  • Joined Apr 2007 | Status: Member | 873 Posts
Quoting all4X
Disliked
Hi, P4L,

Thank you for sharing your P4Lclock. I just hunted it in the Forex Factory forest. I find it excellent for what it is designed and very useful.

Two questions:

1) If I wish to edit the program to replace Jakarta with a more significant market like Singapore, do I just replace all instances of "Jakarta"
with "Singapore" and do I have to arrange the TZArray and all the "if" arguments in chronological order? Or is it more complicated than that?
Ignored
You're welcome and glad you like it. Regards to Singapore, it is already the same time zone as "China" in the indicator. Jakarta is an hour earlier. To add a timezone is complicated and would be a little tough for a non-programmer. To make small edits of existing names is doable by anyone regardless of skill. So if you want it to say "Singapore" instead of "China", you could find-and-replace as needed. Be certain to preserve case; if it's a small "c", use a small "s". If capital "C", use capital "S". In other words, preserving case, change all-or-most instances of "China" to "Singapore", and "china" to "singapore".

Quote
Disliked
2) Is it possible to incorporate ATR (Average True Range) into the program, with user-defineable variables? There should be sufficient vertical space since not all the cities will be set to "true" by everyone.

Since you already have ADR etc, do you think it will tax the CPU any further if ATR were added?

Allison

CPU-usage is not an issue.

I don't know if there is a standard definition for what "ADR" is vs. "ATR" but "ATR" seems fairly straight-forward and I already use it. My program calculates "ATR" for both the current timeframe AND for the Daily timeframe. The Daily label just says "ADR" but perhaps it should say "ATDR". In my calculation, however the value is shifted by 1-bar. My program calculates:
apr = ... ( iMA(NULL,apr_timeframe,APR_Bars,0,MODE_SMA,PRICE_HIGH,1) - iMA(NULL,apr_timeframe,APR_Bars,0,MODE_SMA,PRICE_LOW,1) )

The "APR_Bars" is user-controlled and defines how many bars to average. The mode "SMA" is a simple calculation; equal weighting for each of the bars in the calculation. The only difference between what mine says vs. an "ATR" indicator added to a chart is that mine does not use the *current* bar in it's calculation. Rather, it uses the previous #-of-bars only. Mine reports in "pips" vs. what ATR reports in terms of absolute price.

If you want the current bar used in the calculation, then change the two red instances of "1" to "0". (In the program, ALSO make the same change for the "adr =" line further down; so, four total changes). I don't see this as a significant change to make in the original (and I would prefer the way it is myself) but you are welcome to edit your own accordingly.

I searched briefly for "ADR" and found some variations of the calculations that are quite different, but those are not what mine does. So probably I don't even have what *some* programs call "ADR" at all, and maybe mine would be more properly labeled as "ATDR" (Average True Daily Range). That extra "T" might add its own kind of confusion but it would be consistent at least with my own program, because I already have an average range calculation that uses your current chart period, so for example, on a M15 chart, it says "A15R(5)". The "15" is the chart period, and the "(5)" is the number of bars. I suppose I could label that as "AT15R(5)". The extra "T" implying "True".

Bottom line: I think the indicator already provides "ATR" values but they are shifted by 1-bar, they're in pips, and the labels don't have a "T". Not a big deal but I'll probably change just the labels in a future version. (No promise when).
 
 
  • Post #91
  • Quote
  • Oct 8, 2011 9:17pm Oct 8, 2011 9:17pm
  •  euclid
  • Joined May 2007 | Status: Member | 356 Posts
Quoting pips4life
Disliked
The Clock program makes use of a Windows function, "SystemTimeToTzSpecificLocalTime". While it does tell me what time it is in various user-specified timezones, what it doesn't tell me is whether the output time is observing ST or DST.
Ignored
Well it does. If you compare the output with UTC to see what the offset is and then check that against the TZInfoArray to see whether it's ST or DST. Personally, I wouldn't bother

I was experimenting today with pulling the TZInfo from the windows registry. I think you might find that useful. See attached example code.
Attached File(s)
File Type: mq4 TestClock.mq4   4 KB | 467 downloads
 
 
  • Post #92
  • Quote
  • Oct 9, 2011 10:34am Oct 9, 2011 10:34am
  •  euclid
  • Joined May 2007 | Status: Member | 356 Posts
Quoting euclid
Disliked
Personally, I wouldn't bother
Ignored
Well I did bother after all. It seems to work OK.
Attached File(s)
File Type: mq4 TestClock2.mq4   6 KB | 759 downloads
 
 
  • Post #93
  • Quote
  • Oct 9, 2011 2:09pm Oct 9, 2011 2:09pm
  •  pips4life
  • Joined Apr 2007 | Status: Member | 873 Posts
Quoting euclid
Disliked
Well I did bother after all. It seems to work OK.
Ignored
Hi euclid,

Your method to obtain TZinfo is very good. I wish I knew your method a couple years ago when I implemented the current manual TZ definition in the code (for which the values come from tedious steps of changing my computer clock to each and every market-zone to extract the data). Back then, I knew so little about using Windows DLL functions but by each example, knowledge expands. Yours is a great addition.

Your suggestion how to determine DST-or-ST status is after-the-fact so obvious, but it never occurred to me. Simple but clever.

Since my current P4L Clock is working fine for now, (and DST status isn't critical) I'll hold off for now on making the effort to incorporate your ideas but thanks for sharing them. Eventually I'll get to it, just don't know when...

Ideas are always welcome, and tips from fellow coders are especially so.

Kent (pips4life)
 
 
  • Post #94
  • Quote
  • Edited 8:08am Oct 10, 2011 8:06am | Edited 8:08am
  •  MaeBeOK
  • | Joined Jan 2011 | Status: Junior Member | 1 Post
Hi Pips4Life,
Newbie here. I installed the clock, closed and restarted Metatrader, seemed to be fine. Dragged it onto the charts. Asks me when I change to a chart if I want to show it on that chart, etc. However, the clock does not appear on any of the time frames.

Also I noted your comment about not allowing DLL's on Binary, to protect private account info. Where is that setting? Under the Tools Options?
Thankshttp://www.forexfactory.com/images/icons/icon6.gif
MaeBeOK
 
 
  • Post #95
  • Quote
  • Oct 10, 2011 4:08pm Oct 10, 2011 4:08pm
  •  hc2000
  • | Joined Jan 2010 | Status: Member | 30 Posts
I was looking for the clock indicators, thanks for sharing!
 
 
  • Post #96
  • Quote
  • Oct 17, 2011 7:25am Oct 17, 2011 7:25am
  •  traderiva
  • | Joined Mar 2011 | Status: Member | 5 Posts
Quoting euclid
Disliked
Well I did bother after all. It seems to work OK.
Ignored
Euclid,

You created exactly what I was trying to create, thanks for it. I have a question about this. I edited the program to show the GMT time of a bartime.

string ServerTime=TimeToStr(TimeToUTC("W. Europe Standard Time", Time[0]));

The Broker / bartime is GMT+2.
The outcome of TimeToUTC is GMT+3.

Any ideas?
 
 
  • Post #97
  • Quote
  • Edited 9:44am Oct 17, 2011 9:20am | Edited 9:44am
  •  euclid
  • Joined May 2007 | Status: Member | 356 Posts
Quoting traderiva
Disliked
Euclid,

You created exactly what I was trying to create, thanks for it. I have a question about this. I edited the program to show the GMT time of a bartime.

string ServerTime=TimeToStr(TimeToUTC("W. Europe Standard Time", Time[0]));

The Broker / bartime is GMT+2.
The outcome of TimeToUTC is GMT+3.

Any ideas?
Ignored
Yes. I haven't tested that TimeToUTC function and as you've discovered, it's broken. Please hold .....

Try this.
PHP Code
 datetime TimeToUTC(string TimeZone, datetime t)

  {
  
int SysTime[4], LocTime[4], TZInfo[43];
  
GetTZI(TZInfo, TimeZone);
  
TimeToSystime(t, LocTime);
  
TzSpecificLocalTimeToSystemTime(TZInfo, LocTime, SysTime);
  return(
SystimeToTime(SysTime));
  } 
 
 
  • Post #98
  • Quote
  • Oct 17, 2011 10:03am Oct 17, 2011 10:03am
  •  traderiva
  • | Joined Mar 2011 | Status: Member | 5 Posts
Euclid,

Thanks for your quick response, it works perfect now.
 
 
  • Post #99
  • Quote
  • Oct 20, 2011 8:02pm Oct 20, 2011 8:02pm
  •  fufighter
  • | Joined Sep 2011 | Status: Member | 100 Posts
wow, just come here to download the clock. Thank you so much for your afford!
 
 
  • Post #100
  • Quote
  • Nov 4, 2011 12:22pm Nov 4, 2011 12:22pm
  •  kfernie
  • | Joined Oct 2009 | Status: Junior Member | 1 Post
I never post pretty much just read; I'm making an exception on this thread..this indicator is a fine asset for my charts, kudos for a job well done.
 
 
  • Platform Tech
  • /
  • New very cool CandleTime and session time Clock indicators
  • Reply to Thread
    • 1 34Page 567 10
    • 1 4Page 56 10
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023