Last "P4L Clock.mq4" update: Nov 03, 2018, posted new v2_13
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 display of a comment. The by-the-bar text displays single-digit seconds just fine. (":09")
FYI, when the seconds remaining is a negative number, the old bar is over but the new bar is yet to be formed, or in a sense it's overdue. In such cases I now display a "WAIT4BAR:-MM:SS" text so it is clearly distinct from the normal display. (FYI, when markets are slow a lot of M1 and even M5 (and higher) bars never form at all, so the "WAIT4BAR" condition can persist for quite a long while).
The above program I have called "P4L CandleTime.mq4". You can rename it if you like.
I also decided to modify another time related program, Clock_v1_3.mq4, aka Clock.mq4, that had some similar display issues. That tool displays an array of market names and hours in one corner of your chart. I made some significant enhancements to the indicator which I call "P4L Clock.mq4" :
* Different highlight color(s) used for Market Open hours (Assuming 8AM - 5PM local market hours)
* Added seconds display, and used method such that single digits look better (":09" not ":9")
* Added "Broker_Time_Is_Gold_Standard" to adjust (by a few seconds or minutes) the market hours, because as if often the case, the local computer clock may be off by a small amount.
* Two extern variables to control display of seconds: bool Display_Time_With_Seconds, int Display_Bar_With_Seconds.
* When Display_Bar_With_Seconds=2 (Auto mode), seconds display when < 2min, OR, if Display_Time_With_Seconds=True.
* "Bar:" changed to "Bar Left:" (remaining time!). Also, it will say "wait4bar" (rather than to display a negative number as would have occurred) during periods of low activity until a new bar is formed.
* "Suppress_Bar_HH_Below_H1" displays only [MM:SS] for H1 and below since HH in [HH:MM:SS] is always "00"
* Adjusted pixel distance between labels depending on options.
* "Bar Left:" time does not display above D1 charts. A future enhancement (not planned) could report DD_HH:MM[:SS]
* Added Show_DIBS_London clock with user-setable start/stop hour relative to London (6AM and 7PM at present). (The DIBS method is discussed over in thread http://www.forexfactory.com/showthread.php?t=86766 )
(Further enhancements & features are described in the "Update" section below).
FYI, I found a modification of Clock_v1_3.mq4 called Clock_v1_4.mq4 but which is actually a script. (I posted it elsewhere -- and can't delete it now -- a copy I called Clock_v1_4_script.mq4 ). I posted it without first fully testing it. I had problems using that script. After a bar completed, the bar time wasn't working for me. ('Time[0]' was frozen because it was in an infinite loop with 'Sleep(1)' ). I also couldn't change timeframes without stopping the script and then re-adding it. Maybe I was doing something wrong, but it didn't work well for me.
My version updates on a by-tick basis (but not more than once-per-second). It should be relatively CPU friendly compared to an infinite loop (??). Please NOTE: The clocks do not update unless new ticks come in. Also note that on weekends, the broker clock is frozen and even with simulated ticks you will not see updates! You could try "Weekend_Test_Mode=true", or better... wait for the market to open.
Installation:
// Copy this file to: C:/Program Files/--your-MT4-directory-here---/experts/indicators/
// Review the "extern" variable settings below. Change as desired, then restart MT4 or do "Compile" in MetaEditor.
//
// Open a chart and add this indicator. Assuming you compiled with the "extern" defaults you prefer,
// you shouldn't need to change any of the defaults, *except* one: (FOR "P4L Clock.mq4" ONLY!)
// This Version requires "Allow DLL Imports" to be set under the Common Tab when you add this to a chart!
// FYI, the DLLs retrieve the local CPU clock time and timezone info as well as world timezone info.
// A word of caution: You can see my entire source code and what the DLL's do which should be harmless.
// Personally, I *never* enable DLL's on any binary .EX4 file because I don't trust what the program might do.
// For all I know, it could be sending out very private information about me or my account!
//
// NOTE! The world timezone times are only as accurate as your LOCAL CPU CLOCK or, if variable
// Broker_MMSS_Is_Gold_Standard=True, your Broker's clock! At least verify your own clock and set it accurately!
// NOTE! Your Broker time is independent of your local CPU clock and, though unlikely, may change at any time.
(Thanks go to the previous authors for their ideas and implementation which I have further enhanced.)
Please report any issues/problems...
Enjoy!
Pips4life (Kent)
UPDATES:
2008-09-27: New "P4L Clock.mq4" v2_1
"P4L Clock.mq4" version v2_1 addresses all timezone/ST/DST issues. Also adds Sydney TZ. Given reports of problems with the old DST/timezone code, I rewrote that section entirely. TimeZone and ST/DST changeovers should display the correct times regardless of your own timezone and ST/DST change dates. However, plan on revisiting this post early in 2009 (and each year) for an annual update with new ST/DST crossover dates! (Correction: no annual update is required!).
2008-09-28: New "P4L Clock.mq4" v2_2
Turns out version v2_1 will NOT require annual updates! The timezone info was not limited to 2008 after all. Updates will only be required if ST/DST changeover dates are changed legislatively (such as Tokyo adopting DST, or US/London/Sydney changing their dates). This version has mostly cosmetic changes to remove the reference to "annual" updates. My apologies for the confusion.
2008-09-28: New "P4L Clock.mq4" v2_3 (Downloaded 1074 times before next version update).
(Note: Covers all issues and enhancements requested through Post #12)
Added Auckland, Moscow, Berlin, Seattle for Jodie(jhp2025). Default topOffsetPixels is now 10.
2008-10-02: New "P4L CandleTime.mq4" v1_1 (Downloaded 974 times before next version update!)
For H4 and above, display "#hours:MM:SS" bar-remaining time. However, for W1 and MN, the bar remaining time may not be accurate (depending on your broker weekend closing time) since the Period() function is not precise, and some weekend time may be included in "remaining" time.
2009-11-13: New "P4L CandleTime.mq4" v1_2 (Downloaded 1590 times before next version update!)
For Weekly and Monthly charts, the number of remaining hours might be excessive (well over 24 hours), so a new format is used: D_HH:MM:SS
The program was also updated to be compatible with timeshifted charts as created by the new "P4L PeriodCon.mq4" indicator. (See http://www.forexfactory.com/showthread.php?t=206301 for "Improved multi-timeframe/offset/chart period converter, P4L PeriodCon.mq4"
2009-11-29: New "P4L Clock.mq4" v2_4 (Downloaded 105 times before next version update!)
Changes: New colors plus user control over font name/size, vert. & horiz. offsets and spacing. Reworked auto-spacing of labels based on AM/PM vs. 24 hour, and display of seconds (or not) and ShowBarTime (or not). Added timezones for: China, Jakarta, India, Israel, Helsinki, Brazil, Mexico, Central and Mountain; renamed "Seattle" to "Pacific". Label order is consistent for any LabelCorner but can also be reversed. Can be drawn in a chart sub-window. New "OverrideShowALL" to see every timezone. New defaults for zones and display-style but user can change as desired. AM/PM is off. Seconds are displayed to better allow precise calibration of local CPU Clock vs. Broker time (Very helpful for news events).
2010-01-14: New "P4L Clock.mq4" v2_5 (Downloaded 26 times before next version update!)
Changes: New "Background_Under_Labels" feature draws a rectangle (actually several) under the labels to make them more readable. The rectangle COVERS price bars and other lines/objects (so long as your F8 "Chart on foreground" variable is un-checked, and if other objects have their Background=true. (Traderathome suggested the rather clever use of OBJ_LABEL with font Webdings, key "g", and large fontsize to create the background rectangle). (See GBPJPY H1 picture below which also shows every market zone supported. This shows bottom-left corner, but any corner can be used for the labels).
2010-01-21: New "P4L Clock.mq4" v2_6 (Downloaded 96 times before next version update!)
Changes:
* New "ShowPipSpread" (Ask-Bid) in pips (including automatic 1/10th pips for extra-digit-brokers).
* New "ShowBidPrice" where color indicates last tick was higher/lower.
* New "ShowVolume". Color indicates higher/lower vs. the last bar. Also, the label changes to "*HiVol*" if the volume is >= the-12th-highest-of-last-120-bars.
* Flag LowSpread by setting "LowSpreadHighlightThreshold" to >0
* New popup Alerts (once-per-bar): DoHighVolumeAlerts & DoLowSpreadAlerts
* New arrows using DoLowSpreadArrows to mark LowSpread events on the chart. (Because they can't be recreated, these arrows persist unless you remove them by changing "Delete_Old_SpreadArrows" to true.
* An Alert ERROR now occurs if the user forgets to enable DLLs.
* Regular MarketOpenHours (8A-5P) (and those for Sydney, 7A-4P) can now be customized with external variables if desired.
2010-02-23: New "P4L Clock.mq4" v2_7 (Downloaded 1609 times before next version update!)
Changes:
* Added option for Dubai timezone
* New "ShowRange" to show current bar High-Low (in pips)
* New "ShowPips2open" to display current currentBarPrice-Open in +/- pips
* New "ShowAvgPeriodRange" to display APR (or A#R). The period, lookback and display are controled with APR_Period, APR_Bars and APR_LabelShowMinutes
* New "ShowAvgDailyRange". Lookback controlled with ADR_Bars
* Renamed old "Background_Name_Pixels" to "Background_AddWidth_Pixels"
* Fixed a few bugs with v2_6
* KNOWN issue with ADR/APR: When calculations are based on a different chart timeframe, the calculations are only correct if your history data is current for the other timeframe (i.e. ADR will be accurate if your Daily history data is current). Best way to be sure is to have a Daily chart open in addition to the chart you attach this indicator to.
2011-03-22: New "P4L CandleTime.mq4" v1_3
FYI, if you replace an older version you must "Reset" the variable values on every chart, or simply detach and re-attach the indicator to every chart.
Changes:
* New variable "TextUsuallyAbovePriceLine" is set to "FALSE" by default. If False, the time label now appears BELOW the price line, more consistently close to the line vs. previous versions.
* Previous v1_2 had some problems to display "WAIT4BARS" (which is rare anyway) for timeframes > H1). Problem is fixed.
* Changed to a fixed-size font, "Lucida Console", which is necessary to handle the longest string displayed.
* This version runs every tick, however, for the 2nd-Nth ticks within a single second, the label is only moved and not recalculated.
* New external variable "AdjustWeeklyTimeRemainBy_min" is a hack to fix at least one broker's error with the true start time of weekly bars. The broker feed SAYS the bars start Sunday 00:00:00 but in fact new bars form on Monday 00:00:00. A value of 1440 minutes is needed to provide the true countdown left.
* This version handles offline charts > 1Month as generated by "P4L PeriodCon.mq4" .
2011-03-22: New "P4L Clock.mq4" v2_8 (Downloaded 1543 times before next version update!)
Changes:
* Fixed bug that ShowAvgDailyRange was forced to false if ShowAvgPeriodRange was false. They are now independent.
* Default LabelCorner changed to 2 (bottom-left). Was 1 (top-right). The old default location tended to cover fibo levels and more recent price bars. NOTE: THE USER MAY EDIT AND CHANGE THE CODE AS DESIRED!
* Default "DoLowSpreadArrows" is now false.
* Double-checked ST/DST changover dates and updated Israel dates.
* Added Bid price to low-spread alert.
* LowSpread arrows have Background=false, and now occur at the exact current price.
* Every LowSpread event now creates an arrow. (Used to be one-arrow-per-bar storing only the last event per bar)
(FYI, sound alerts are not yet implemented in this version).
2011-09-20: New "P4L Clock.mq4" v2_10 (Downloaded 7500 times before next version update!)
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 which is now v2_10)
2014-01-30: New "P4L Clock.mq4" v2_11 (Downloaded 714 times before next version update!)
Changes:
* Made code changes to make it compatible with upcoming new MT4 (>build 579). The changes, however, still compile and work on current 509 build, and the 509 .ex4 that you make is also forward compatible, should there be any need to do so.
* Note: (Beta?) 579 is still new and has many bugs. For example, a 579 compiled "P4L CandleTime.ex4" loses track of the font name upon MT4 restart, but they say it's fixed in the next version. A 509 compiled version appears to work fine. Of course there could be other problems that come up when they finally settle on a production MT4 release, so we'll see what happens.
2014-03-19: New "P4L Clock.mq4" v2_12 (Downloaded 10,426 times before next version update!)
Changes:
* Fixed bug related to use of templates in new MT4 builds >=600.
* Changed version variable to unique name per release, because templates might have stored old values, masking the fact it's a new release.
* Added a free-will "Donations Welcome" message (PayPal to pips4life_at_yahoo_dt_com), to offset the considerable effort it takes to maintain this and other free programs, especially since the new release of (buggy) MT4 builds>=600, which I myself do not even use yet.
P.S. New screenshots contain a few useful notes. Several new market zones and bar info may not be shown in the older screenshots. FYI, previous versions have been downloaded 1000's of times! (See stats next to each version release above).
2018-Nov-03: New "P4L Clock.mq4" v2_13
Changes:
* The clock now updates every second, based on a Timer, and is no longer dependent upon incoming ticks to update the clocks. (Thanks for assist, Nicholishen)
* New variable, Display_Wait4Bar_As_Tplus_Seconds (true), that when a new bar has not yet formed, Bar Next displays "T+" followed by the time the bar is OVERDUE (waiting for a real tick to form the new bar). Example: "[T+00:03]" is 3 seconds overdue. If false, it displays "[wait4bar]" similar to previous version.
* Minor corrections to Moscow, Israel, Brazil timezones (including the dates that ST/DST changes).
* New internal variable CreatedObjectsSelectable=false. The individual label objects created are not intended to be selected then moved.
* Various Minor updates.
-----------------------------------------------
FYI, see also: Collection of programs by pips4life
-----------------------------------------------
These and other programs I've posted are *free*, but donations are welcome! PayPal to pips4life_at_yahoo_dot_com
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 display of a comment. The by-the-bar text displays single-digit seconds just fine. (":09")
FYI, when the seconds remaining is a negative number, the old bar is over but the new bar is yet to be formed, or in a sense it's overdue. In such cases I now display a "WAIT4BAR:-MM:SS" text so it is clearly distinct from the normal display. (FYI, when markets are slow a lot of M1 and even M5 (and higher) bars never form at all, so the "WAIT4BAR" condition can persist for quite a long while).
The above program I have called "P4L CandleTime.mq4". You can rename it if you like.
I also decided to modify another time related program, Clock_v1_3.mq4, aka Clock.mq4, that had some similar display issues. That tool displays an array of market names and hours in one corner of your chart. I made some significant enhancements to the indicator which I call "P4L Clock.mq4" :
* Different highlight color(s) used for Market Open hours (Assuming 8AM - 5PM local market hours)
* Added seconds display, and used method such that single digits look better (":09" not ":9")
* Added "Broker_Time_Is_Gold_Standard" to adjust (by a few seconds or minutes) the market hours, because as if often the case, the local computer clock may be off by a small amount.
* Two extern variables to control display of seconds: bool Display_Time_With_Seconds, int Display_Bar_With_Seconds.
* When Display_Bar_With_Seconds=2 (Auto mode), seconds display when < 2min, OR, if Display_Time_With_Seconds=True.
* "Bar:" changed to "Bar Left:" (remaining time!). Also, it will say "wait4bar" (rather than to display a negative number as would have occurred) during periods of low activity until a new bar is formed.
* "Suppress_Bar_HH_Below_H1" displays only [MM:SS] for H1 and below since HH in [HH:MM:SS] is always "00"
* Adjusted pixel distance between labels depending on options.
* "Bar Left:" time does not display above D1 charts. A future enhancement (not planned) could report DD_HH:MM[:SS]
* Added Show_DIBS_London clock with user-setable start/stop hour relative to London (6AM and 7PM at present). (The DIBS method is discussed over in thread http://www.forexfactory.com/showthread.php?t=86766 )
(Further enhancements & features are described in the "Update" section below).
FYI, I found a modification of Clock_v1_3.mq4 called Clock_v1_4.mq4 but which is actually a script. (I posted it elsewhere -- and can't delete it now -- a copy I called Clock_v1_4_script.mq4 ). I posted it without first fully testing it. I had problems using that script. After a bar completed, the bar time wasn't working for me. ('Time[0]' was frozen because it was in an infinite loop with 'Sleep(1)' ). I also couldn't change timeframes without stopping the script and then re-adding it. Maybe I was doing something wrong, but it didn't work well for me.
My version updates on a by-tick basis (but not more than once-per-second). It should be relatively CPU friendly compared to an infinite loop (??). Please NOTE: The clocks do not update unless new ticks come in. Also note that on weekends, the broker clock is frozen and even with simulated ticks you will not see updates! You could try "Weekend_Test_Mode=true", or better... wait for the market to open.
Installation:
// Copy this file to: C:/Program Files/--your-MT4-directory-here---/experts/indicators/
// Review the "extern" variable settings below. Change as desired, then restart MT4 or do "Compile" in MetaEditor.
//
// Open a chart and add this indicator. Assuming you compiled with the "extern" defaults you prefer,
// you shouldn't need to change any of the defaults, *except* one: (FOR "P4L Clock.mq4" ONLY!)
// This Version requires "Allow DLL Imports" to be set under the Common Tab when you add this to a chart!
// FYI, the DLLs retrieve the local CPU clock time and timezone info as well as world timezone info.
// A word of caution: You can see my entire source code and what the DLL's do which should be harmless.
// Personally, I *never* enable DLL's on any binary .EX4 file because I don't trust what the program might do.
// For all I know, it could be sending out very private information about me or my account!
//
// NOTE! The world timezone times are only as accurate as your LOCAL CPU CLOCK or, if variable
// Broker_MMSS_Is_Gold_Standard=True, your Broker's clock! At least verify your own clock and set it accurately!
// NOTE! Your Broker time is independent of your local CPU clock and, though unlikely, may change at any time.
(Thanks go to the previous authors for their ideas and implementation which I have further enhanced.)
Please report any issues/problems...
Enjoy!
Pips4life (Kent)
UPDATES:
2008-09-27: New "P4L Clock.mq4" v2_1
"P4L Clock.mq4" version v2_1 addresses all timezone/ST/DST issues. Also adds Sydney TZ. Given reports of problems with the old DST/timezone code, I rewrote that section entirely. TimeZone and ST/DST changeovers should display the correct times regardless of your own timezone and ST/DST change dates. However, plan on revisiting this post early in 2009 (and each year) for an annual update with new ST/DST crossover dates! (Correction: no annual update is required!).
2008-09-28: New "P4L Clock.mq4" v2_2
Turns out version v2_1 will NOT require annual updates! The timezone info was not limited to 2008 after all. Updates will only be required if ST/DST changeover dates are changed legislatively (such as Tokyo adopting DST, or US/London/Sydney changing their dates). This version has mostly cosmetic changes to remove the reference to "annual" updates. My apologies for the confusion.
2008-09-28: New "P4L Clock.mq4" v2_3 (Downloaded 1074 times before next version update).
(Note: Covers all issues and enhancements requested through Post #12)
Added Auckland, Moscow, Berlin, Seattle for Jodie(jhp2025). Default topOffsetPixels is now 10.
2008-10-02: New "P4L CandleTime.mq4" v1_1 (Downloaded 974 times before next version update!)
For H4 and above, display "#hours:MM:SS" bar-remaining time. However, for W1 and MN, the bar remaining time may not be accurate (depending on your broker weekend closing time) since the Period() function is not precise, and some weekend time may be included in "remaining" time.
2009-11-13: New "P4L CandleTime.mq4" v1_2 (Downloaded 1590 times before next version update!)
For Weekly and Monthly charts, the number of remaining hours might be excessive (well over 24 hours), so a new format is used: D_HH:MM:SS
The program was also updated to be compatible with timeshifted charts as created by the new "P4L PeriodCon.mq4" indicator. (See http://www.forexfactory.com/showthread.php?t=206301 for "Improved multi-timeframe/offset/chart period converter, P4L PeriodCon.mq4"
2009-11-29: New "P4L Clock.mq4" v2_4 (Downloaded 105 times before next version update!)
Changes: New colors plus user control over font name/size, vert. & horiz. offsets and spacing. Reworked auto-spacing of labels based on AM/PM vs. 24 hour, and display of seconds (or not) and ShowBarTime (or not). Added timezones for: China, Jakarta, India, Israel, Helsinki, Brazil, Mexico, Central and Mountain; renamed "Seattle" to "Pacific". Label order is consistent for any LabelCorner but can also be reversed. Can be drawn in a chart sub-window. New "OverrideShowALL" to see every timezone. New defaults for zones and display-style but user can change as desired. AM/PM is off. Seconds are displayed to better allow precise calibration of local CPU Clock vs. Broker time (Very helpful for news events).
2010-01-14: New "P4L Clock.mq4" v2_5 (Downloaded 26 times before next version update!)
Changes: New "Background_Under_Labels" feature draws a rectangle (actually several) under the labels to make them more readable. The rectangle COVERS price bars and other lines/objects (so long as your F8 "Chart on foreground" variable is un-checked, and if other objects have their Background=true. (Traderathome suggested the rather clever use of OBJ_LABEL with font Webdings, key "g", and large fontsize to create the background rectangle). (See GBPJPY H1 picture below which also shows every market zone supported. This shows bottom-left corner, but any corner can be used for the labels).
2010-01-21: New "P4L Clock.mq4" v2_6 (Downloaded 96 times before next version update!)
Changes:
* New "ShowPipSpread" (Ask-Bid) in pips (including automatic 1/10th pips for extra-digit-brokers).
* New "ShowBidPrice" where color indicates last tick was higher/lower.
* New "ShowVolume". Color indicates higher/lower vs. the last bar. Also, the label changes to "*HiVol*" if the volume is >= the-12th-highest-of-last-120-bars.
* Flag LowSpread by setting "LowSpreadHighlightThreshold" to >0
* New popup Alerts (once-per-bar): DoHighVolumeAlerts & DoLowSpreadAlerts
* New arrows using DoLowSpreadArrows to mark LowSpread events on the chart. (Because they can't be recreated, these arrows persist unless you remove them by changing "Delete_Old_SpreadArrows" to true.
* An Alert ERROR now occurs if the user forgets to enable DLLs.
* Regular MarketOpenHours (8A-5P) (and those for Sydney, 7A-4P) can now be customized with external variables if desired.
2010-02-23: New "P4L Clock.mq4" v2_7 (Downloaded 1609 times before next version update!)
Changes:
* Added option for Dubai timezone
* New "ShowRange" to show current bar High-Low (in pips)
* New "ShowPips2open" to display current currentBarPrice-Open in +/- pips
* New "ShowAvgPeriodRange" to display APR (or A#R). The period, lookback and display are controled with APR_Period, APR_Bars and APR_LabelShowMinutes
* New "ShowAvgDailyRange". Lookback controlled with ADR_Bars
* Renamed old "Background_Name_Pixels" to "Background_AddWidth_Pixels"
* Fixed a few bugs with v2_6
* KNOWN issue with ADR/APR: When calculations are based on a different chart timeframe, the calculations are only correct if your history data is current for the other timeframe (i.e. ADR will be accurate if your Daily history data is current). Best way to be sure is to have a Daily chart open in addition to the chart you attach this indicator to.
2011-03-22: New "P4L CandleTime.mq4" v1_3
FYI, if you replace an older version you must "Reset" the variable values on every chart, or simply detach and re-attach the indicator to every chart.
Changes:
* New variable "TextUsuallyAbovePriceLine" is set to "FALSE" by default. If False, the time label now appears BELOW the price line, more consistently close to the line vs. previous versions.
* Previous v1_2 had some problems to display "WAIT4BARS" (which is rare anyway) for timeframes > H1). Problem is fixed.
* Changed to a fixed-size font, "Lucida Console", which is necessary to handle the longest string displayed.
* This version runs every tick, however, for the 2nd-Nth ticks within a single second, the label is only moved and not recalculated.
* New external variable "AdjustWeeklyTimeRemainBy_min" is a hack to fix at least one broker's error with the true start time of weekly bars. The broker feed SAYS the bars start Sunday 00:00:00 but in fact new bars form on Monday 00:00:00. A value of 1440 minutes is needed to provide the true countdown left.
* This version handles offline charts > 1Month as generated by "P4L PeriodCon.mq4" .
2011-03-22: New "P4L Clock.mq4" v2_8 (Downloaded 1543 times before next version update!)
Changes:
* Fixed bug that ShowAvgDailyRange was forced to false if ShowAvgPeriodRange was false. They are now independent.
* Default LabelCorner changed to 2 (bottom-left). Was 1 (top-right). The old default location tended to cover fibo levels and more recent price bars. NOTE: THE USER MAY EDIT AND CHANGE THE CODE AS DESIRED!
* Default "DoLowSpreadArrows" is now false.
* Double-checked ST/DST changover dates and updated Israel dates.
* Added Bid price to low-spread alert.
* LowSpread arrows have Background=false, and now occur at the exact current price.
* Every LowSpread event now creates an arrow. (Used to be one-arrow-per-bar storing only the last event per bar)
(FYI, sound alerts are not yet implemented in this version).
2011-09-20: New "P4L Clock.mq4" v2_10 (Downloaded 7500 times before next version update!)
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 which is now v2_10)
2014-01-30: New "P4L Clock.mq4" v2_11 (Downloaded 714 times before next version update!)
Changes:
* Made code changes to make it compatible with upcoming new MT4 (>build 579). The changes, however, still compile and work on current 509 build, and the 509 .ex4 that you make is also forward compatible, should there be any need to do so.
* Note: (Beta?) 579 is still new and has many bugs. For example, a 579 compiled "P4L CandleTime.ex4" loses track of the font name upon MT4 restart, but they say it's fixed in the next version. A 509 compiled version appears to work fine. Of course there could be other problems that come up when they finally settle on a production MT4 release, so we'll see what happens.
2014-03-19: New "P4L Clock.mq4" v2_12 (Downloaded 10,426 times before next version update!)
Changes:
* Fixed bug related to use of templates in new MT4 builds >=600.
* Changed version variable to unique name per release, because templates might have stored old values, masking the fact it's a new release.
* Added a free-will "Donations Welcome" message (PayPal to pips4life_at_yahoo_dt_com), to offset the considerable effort it takes to maintain this and other free programs, especially since the new release of (buggy) MT4 builds>=600, which I myself do not even use yet.
P.S. New screenshots contain a few useful notes. Several new market zones and bar info may not be shown in the older screenshots. FYI, previous versions have been downloaded 1000's of times! (See stats next to each version release above).
2018-Nov-03: New "P4L Clock.mq4" v2_13
Changes:
* The clock now updates every second, based on a Timer, and is no longer dependent upon incoming ticks to update the clocks. (Thanks for assist, Nicholishen)
* New variable, Display_Wait4Bar_As_Tplus_Seconds (true), that when a new bar has not yet formed, Bar Next displays "T+" followed by the time the bar is OVERDUE (waiting for a real tick to form the new bar). Example: "[T+00:03]" is 3 seconds overdue. If false, it displays "[wait4bar]" similar to previous version.
* Minor corrections to Moscow, Israel, Brazil timezones (including the dates that ST/DST changes).
* New internal variable CreatedObjectsSelectable=false. The individual label objects created are not intended to be selected then moved.
* Various Minor updates.
-----------------------------------------------
FYI, see also: Collection of programs by pips4life
-----------------------------------------------
These and other programs I've posted are *free*, but donations are welcome! PayPal to pips4life_at_yahoo_dot_com
Attached Images
Attached File(s)
P4L CandleTime.mq4
16 KB
|
23,230 downloads
|
Uploaded Mar 23, 2011 12:14am
P4L Clock.mq4
105 KB
|
3,911 downloads
|
Uploaded Nov 3, 2018 8:50pm