ClickAlgo Market Trading Clock

by Paul_Hayes in category Volatility at 09/03/2015
Description

TRADING HOURS OF MAJOR STOCK EXCHANGES

This indicator displays the global trading hours (trading sessions) for each of the 7 major stock exchanges in the world used by cTrader, configurable to show or hide, markets that are currently open, the opening and closing times, alarm bell when market opens and a countdown timer when market is about to open.

cTrader Market Clock

How will this help with my trading?

The useful feature of this indicator is to highlight volatility, when Frankfurt, London & New York overlap and are open at the same time you see high volatile movement in the EURUSD for example. 

All Features Selected (actual exchange opening times.)

You can choose between your local timezone opening and closing times for the exchanges or the actual local times for New York, London etc.

Athens UTC(+02:00) Example

You can also show/hide the location label which is displayed on the left of the screen.

You are able to select either your local timezone or the actual local times of the exchanges with the parameter below, you don't need to configure anything just select "YES" for show my timezone.

Show My TimeZone? (YES) (NO)


You can set the media file path to a sound file which plays a recording of the NY stock exchange opening bell or any other sound of your choice.

Option to see when each stock exchange is about to start trading, this is displayed below the actual local time of the clocks.

INDICATOR PARAMETERS

cTrader Market Clock

* Alert market opens: how many minutes left till market opens, a countdown timer will be displayed under the clock.

CURRENT FEATURES

  • Date and time order from left to right, so that closed markets are on the left of the highlighted open markets and markets about to open are on the right.
  • Show clock in your current timezone or the local exchange timezone.
  • Sends an email (x) minutes before an exchange opens.
  • User defined colors for the open and closed clocks to suit your background color.
  • Option to turn on/off sound for alarm
  • User defined sound when market opens, this can be any file located on your computer, so you can use a real exchange bell sound.
  • Show or hide the timezone location label.
  • Optional display of opening times for each of the exchanges.
  • Clocks show market closed message with all clocks in a closed state at the weekend.
  • Option to display closing times.
  • Option to display alert when market is about to open with countdown timer.
  • FxPro Midnight Inactivity message, trading stops for 5 minutes.
  • Easier to add additional exchanges.
  • Display 24hr clock option

* Use this Indicator with the Scalpers Buddy http://ctdn.com/algos/indicators/show/705 to manage volatility when an exchange opens.

Default Clock View - showing exchanges open, closed and when they open next in minutes.

Markets Closed for the Weekend

Markets Showing Opening Times

Alternative Background Colour

Global Exchange Clock Hours

(local time and deviation of local time zone from UTC)

The market opening and closing times, position and display order can be modified in the exchange creation section (Initialization)

cTrader Font Resizing Issue

Please be aware that if you change the font size on cTrader it will cause issues with displaying the clock correctly.

FXPro Customers Note: They currently halt trading for 5 minutes each night at midnight (Cyprus Time), as this is the time that the daily trading session finishes for their Liquidity Providers. At this time each night, the Liquidity Providers carry out their own daily reconciliations and withdraw their pricing for a very short period of time while this is carried out. Due to this temporary withdrawal of liquidity we see a widening of our spreads and a reduction in the liquidity available for their clients, in order to prevent their clients being affected by these abnormal market conditions they prefer to suspend trading until 00:05, when the Liquidity Providers have all returned pricing.


Sample New York Stock Market Open Bell

https://drive.google.com/open?id=0BwYhDOZlukMMYWxydzN3aElfT28&authuser=0

Sample Ship Bell

https://drive.google.com/open?id=0BwYhDOZlukMMQkR6eXhDcllydFk&authuser=0

* Just copy the file into a folder on your device and add that path to the Media File Path in the indicators parameters input field.


https://youtu.be/PQb3jMlWX6E?list=PLVkMnR8pfWHENp3K7i1JRvvxmXJzPbLIt


Visit Us

Phone: 0044 20 3289 6573

* All international calls are local rates (low cost)

Download
3245 downloads
How to install
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Windows.Forms;
using System.Threading;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class ClickAlgoSoftware : Indicator
    {
        private static Mutex dialogMutex = new Mutex();
        private static bool dialogIsShownOnce = false;

        protected override void Initialize()
        {
            ShowDialogBox();
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = ...
        }

        public static void ShowDialogBox()
        {
            dialogMutex.WaitOne();

            if (dialogIsShownOnce)
                return;

            var ret = MessageBox.Show("It is not possible to download the software from the cTDN website.\nWould you like to visit us at ClickAlgo.com where you can download it?", "Downloading...", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (ret == DialogResult.Yes)
            {
                System.Diagnostics.Process.Start("http://clickalgo.com/ctrader-market-trading-clock");
            }

            dialogIsShownOnce = true;

            dialogMutex.ReleaseMutex();
        }

    }
}
Comments

Paul_Hayes - March 09, 2015 @ 15:03

I have some discrepancy between the trading hours I am finding on each of the exchanges websites and what CTrader uses, I would not mind some help on what times would be best for Forex trading.

Thanks.

Paul_Hayes - March 09, 2015 @ 22:57

I have now configured the indicator to use trading session times which are taken from the official web sites, these show when trading actually takes place and does not include pre-opening where no orders are taken.

Paul_Hayes - March 13, 2015 @ 19:19

Update 13/03/2015: Bug fix, indicator was showing markets Closed when the first exchange closed on a Friday and not all of them, the current download corrects the problem.

8fold - March 15, 2015 @ 19:47

Paul, this is really nice! Will use it and let you know on possible improvement ideas / bugs / feedback.

Good luck trading!

 

 

Thank you!

8fold - March 15, 2015 @ 20:27

I get when building:

Error: Error occured during parsing project file: "HoursIns' is an unexpected token. The expected token is '=' Line2, position 60.'

Paul_Hayes - March 15, 2015 @ 20:46

Hi 8fold,

 

That's an interesting error, there is no variable or file by that name in the source code, could you give more information.

1. what operating system are you using

2. are you getting error when loading the indicator?

3. have you changed any values in the source code?

4. what are your user properties.

Thanks.

8fold - March 16, 2015 @ 11:15

Hi Paul,

First to answer your questions:

1. Windows 8.1

2. I did not try to load the indicator, i copied the source code (using the button on this page) then created a new indicator in cAlgo. The error was received when tried to build the code. I suggest you repaste the code (for instance, on the first line there are some random ascii caracters, though i don't think they cause the error)

3. Did not modify the code

4. What do you mean?

 

Today, I just downloaded the prebuilt indicator (after checking your profile, I concluded you are trustworthy :) ) and installed. Then looked on the source code :) as was building fine this time :). 

It looks elegant, I put it on one of my charts, will further test and let you know if I come with more ideas.

 

Thank you!

Paul_Hayes - March 16, 2015 @ 14:28

Hi,

The procedure to install any algorithm is to download it from cTDN and run it, it will install on your device for use, what spotware have done is to restrict what programmers can do to your computer when they develop cbots or indicators. So they are pretty safe to use, else any programmer can hack into your system and spotware will have to discontinue traders writing their own cbots etc.

In the code you will see this:

    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]

AccessRights set to none, means the program has no rights to do anything to your computer, if this was set to Full Rights then a warning would tell you when you attempt to install that the program.

Any algorithm that you download and install from cDTN should have AccessRights.None

So don't worry the code is perfectly safe on your machine thanks to cAlgo framework restricting any possible damage.

The copy and paste code is for developers who wish to modify the existing code, the strange characters at the start of the code appears and I don't know why.

have fun with the indicator and do not hesitate to contact me if you have any further problems at paul(dot)hayes.it@gmail.com , just replace the (dot) with a full stop.

Paul_Hayes - March 24, 2015 @ 18:32

Update 24/03/2015: New features added for version 1.1

  • Default opening and closing times as per cTraders trading hours.
  • Code refactoring(clean-up) for future scalability.
  • Show closing times.
  • Countdown timer for specified time before market opens
  • Re-align exchanges (spaces) between them.

Paul_Hayes - March 30, 2015 @ 08:55

Update 28/03/2015:

  • Bug fixing and major code clean-up, easier to add additional exchanges.

TRADER100D1M - April 06, 2015 @ 03:00

thank you, the indicator is very good and very useful.
here in Brazil we do business in the morning schedule for the Brasilia time starts at 3:00 and finish around 13:00 there is not a specific schedule what I use most is to pay attention to candlelstick sign on graph of 1 hour and 4 hours always looking the direction of graphic diary

Paul_Hayes - April 10, 2015 @ 13:28

Update 10/04/2015:

  • Bug fixed if opening time includes minutes, showing of minutes left to open were incorrect.
  • Bug fixed showing Monday as next opening time on a Friday

nealkaplan - April 17, 2015 @ 22:55

Is there a way to download and install in ctrader live account?

nealkaplan - April 17, 2015 @ 23:19

I figured out how to install in Ctrader, thank you. Now to change the time zone do you have to open it in CAlgo or can the time zone be adjusted in Ctrader.

 

nealkaplan - April 18, 2015 @ 08:19

Sorry, to make this Eastern Standard Time, why is this not correct? Thank you.             

 

   // create clock entities. * CHANGE CLOCK TIMES HERE *
                Exchange exchange = new Exchange(ExchangeName.Wellington);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("New Zealand Eastern Standard Time");
                exchange.OpeningTime = "08:00:00";
                exchange.ClosingTime = "17:00:00";
                exchange.LabelFormat = "{0,-134}";
                exchange.TimeFormat = "\n{0,-131}";
                exchange.DisplayOrder = 1;
                marketClocks.Exchanges.Add(exchange);


                exchange = new Exchange(ExchangeName.Sydney);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("AUS Eastern Standard Time");
                exchange.OpeningTime = "09:00:00";
                exchange.ClosingTime = "16:30:00";
                exchange.LabelFormat = "{0,-79}";
                exchange.TimeFormat = "\n{0,-80}";
                exchange.DisplayOrder = 2;
                marketClocks.Exchanges.Add(exchange);

                exchange = new Exchange(ExchangeName.Tokyo);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Eastern Standard Time");
                exchange.OpeningTime = "09:00:00";
                exchange.ClosingTime = "17:30:00";
                exchange.LabelFormat = "{0,-29}";
                exchange.TimeFormat = "\n{0,-31}";
                exchange.DisplayOrder = 3;
                marketClocks.Exchanges.Add(exchange);

                exchange = new Exchange(ExchangeName.Singapore);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("Singapore Eastern Standard Time");
                exchange.OpeningTime = "09:00:00";
                exchange.ClosingTime = "17:00:00";
                exchange.LabelFormat = "{0,33}";
                exchange.TimeFormat = "\n{0,31}";
                exchange.DisplayOrder = 4;
                marketClocks.Exchanges.Add(exchange);

                exchange = new Exchange(ExchangeName.Frankfurt);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("W. Europe Eastern Standard Time");
                exchange.OpeningTime = "08:00:00";
                exchange.ClosingTime = "17:00:00";
                exchange.LabelFormat = "{0,82}";
                exchange.TimeFormat = "\n{0,80}";
                exchange.DisplayOrder = 5;
                marketClocks.Exchanges.Add(exchange);

                exchange = new Exchange(ExchangeName.London);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("GMT Eastern Standard Time");
                exchange.OpeningTime = "08:00:00";
                exchange.ClosingTime = "17:00:00";
                exchange.LabelFormat = "{0,127}";
                exchange.TimeFormat = "\n{0,128}";
                exchange.DisplayOrder = 6;
                marketClocks.Exchanges.Add(exchange);

                exchange = new Exchange(ExchangeName.NewYork);
                exchange.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
                exchange.OpeningTime = "08:00:00";
                exchange.ClosingTime = "17:00:00";
                exchange.LabelFormat = "{0,175}";
                exchange.TimeFormat = "\n{0,175}";
                exchange.DisplayOrder = 7;
                marketClocks.Exchanges.Add(exchange);

Paul_Hayes - April 18, 2015 @ 10:50

Hi,

What is it you are trying to do? 

The clocks are already setup to display the local time for the country, this is the actual current time now in New York, London etc, you should not need to change anything, unless you wish to add another clock, would you like to add another clock?

Paul.

nealkaplan - April 19, 2015 @ 23:48

Hi Paul, I reinstalled the clock. I'm PST so I wanted the opening/closing times to reflect California time (PST). I can work with New York however.

One thing I noticed is the clock isn't counting down unless i reopen the chart again. Am I missing a setting. 

I really like this cbot and want to be able to use it correctly.

 

 

Paul_Hayes - April 20, 2015 @ 08:00

Hi Neal,

Thanks for your feedback on this indicator, the clocks will currently only show  local time for each of the exchanges location, I will release another version with a parameter option for the user to choose he clocks to be shown in their own local time or the time of the exchange, come back in a week and I will try and get it done by then.

The only countdown that occurs is when you set the "Alert market opens (mins)" parameter, when the value you specify is equal to or less then the amount of minutes until the market closes the timer will be displayed below current time or opening time, I will check to make sure it works ok.

Paul.

Paul_Hayes - April 20, 2015 @ 08:05

correction:, "when the value you specify is equal to or more then the amount of minutes"

I checked the clock countdown is working fine.

Paul_Hayes - April 20, 2015 @ 09:28

Hi Neal,

your right there is a bug when the exchange opens, the countdown remains, will fix.

nealkaplan - April 20, 2015 @ 20:30

Thank you, I look forward to the current time option. 

TRADER100D1M - April 22, 2015 @ 13:59

good day, you could put option 24H ? PM AM 

digital clocks display the hour of the day in 24-hour format

 

Paul_Hayes - April 22, 2015 @ 14:01

Will do it on the next release, thank you for your feedback.

TRADER100D1M - April 22, 2015 @ 14:54

Thank you for sharing your knowledge

TRADER100D1M - April 24, 2015 @ 08:10

very good success for you

Paul_Hayes - May 09, 2015 @ 11:33

NEW FEATURE ADDED

  • option to show clocks opening times in your current timezone.

TRADER100D1M - May 11, 2015 @ 02:20

thank you, once again you exceeded expectations, good for you and Business Success

TRADER100D1M - May 14, 2015 @ 06:12

Good evening, I noticed that the clocks have moments that are overlapping one another emcima didigto

Paul_Hayes - May 14, 2015 @ 17:43

ok, will fix

TRADER100D1M - May 17, 2015 @ 00:20

Thank you and good weekend

Paul_Hayes - February 09, 2016 @ 12:18

Hi Conno,

Thanks for letting me know, I will try and fix it this week.

if you want to give me your email I will ping you when its done. else check back next week.

Paul.

Paul_Hayes - February 09, 2016 @ 12:24

Hi Conno,

I just checked and it works fine with me.

Download the indicator again in-case you have an older version, if you still have problems, send me an email with a screen shot of your problem and who your broker is.

contact@calgo4u.com

Also if you like the clock please vote for it, does it really only deserve 2.5 :-(

Paul_Hayes - February 12, 2016 @ 09:47

All,

With CT new text re-sizing feature, the clock will be effected and messed up. If you want to use it you will need to keep the text size standard.

Paul_Hayes - September 09, 2016 @ 10:07

New feature added, will now send you an email a configurable number of minutes before the exchange opens.

3.75