Time Zones Clock free

by TraderExperto in category Other at 13/11/2022
Description

This is a Simple tool that Shows the Time Zones from main Market's Cities Like New York, London, Frankfurt, Tokyo, Sydney, Hong Kong and New Zealand and as well as your Local Time Zone in Real Time. This tool is great to monitor in real time the different hours, and follow the exact time that different Markets participants enter in their markets to play. Consider for instance that you're in Europe and trading the Dax and you monitor the New York time zone, and you prepare yourself for a much higher volatility to enter the markets cause New York players are entering the game at somewhere between 8:00 am New York Time.

 

Grupo de Telegram Para Brasileiros, Portugueses e todos aqueles que falam portugues: http://t.me/ComunidadeCtrader

Grupo CTrader en Español para Latinos:  http://t.me/ComunidadCtrader

 

 

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 System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(IsOverlay = true,  AccessRights = AccessRights.None)]
    public class ClockTimeZones : Indicator
    {

        [Parameter("Horizontal Position",  DefaultValue = HorizontalAlignment.Left)]
        public HorizontalAlignment HorizontalPos { get; set; }
        
        [Parameter("Vertical Position",  DefaultValue = VerticalAlignment.Bottom)]
        public VerticalAlignment VerticalPos { get; set; }

        [Parameter("Local Time", Group = "Local Time Zone",  DefaultValue = false)]
        public bool LocaltimeOption { get; set; }
        
        [Parameter("New York Time", Group = "New York Time Zone" , DefaultValue = true)]
        public bool NewyorktimeOption { get; set; }
        
        [Parameter("London Time", Group = "London Time Zone",  DefaultValue = true)]
        public bool LondontimeOption { get; set; }
        
        [Parameter("Frankfurt Time", Group = "Frankfurt Time Zone",  DefaultValue = false)]
        public bool FrankfurttimeOption { get; set; }
        
        [Parameter("Hong Kong Time", Group = "Hong Kong Time Zone",  DefaultValue = false)]
        public bool HongKongtimeOption { get; set; }
        
        [Parameter("Tokyo Time", Group = "Tokyo Time Zone",  DefaultValue = false)]
        public bool TokyotimeOption { get; set; }
        
        [Parameter("Sydney Time", Group = "Sydney Time Zone",  DefaultValue = false)]
        public bool SydneytimeOption { get; set; }
        
        [Parameter("New Zealand Time", Group = "New Zealand Time Zone",  DefaultValue = false)]
        public bool NewZealandtimeOption { get; set; }

        
        public DateTime currentTime = DateTime.Now;
        
        public DateTime utcTime;
        
        public DateTime NewYorkTime;
        
        public DateTime LondonTime;
        
        public DateTime FrankfurtTime;
        
        public DateTime HongKongTime;
        
        public DateTime TokyoTime;
        
        public DateTime SydneyTime;
        
        public DateTime NewZealandTime;
        
        public DateTime LocalTime;
         
        
        public StackPanel NewYorkStack;
        
        public TextBlock newYorkText;
        
        public Border NewYorkBorder;
                
        
        public StackPanel LondonStack;
        
        public TextBlock LondonText;
        
        public Border LondonBorder;
        
               
        public StackPanel FrankfurtStack;
        
        public TextBlock FrankfurtText;
        
        public Border FrankfurtBorder;
        
                
        public StackPanel HongKongStack;
        
        public TextBlock HongKongText;
        
        public Border HongKongBorder;
        
                
        public StackPanel TokyoStack;
        
        public TextBlock TokyoText;
        
        public Border TokyoBorder;
        
        
        public StackPanel SydneyStack;
        
        public TextBlock SydneyText;
        
        public Border SydneyBorder;
            
            
        public StackPanel NewZealandStack;
        
        public TextBlock NewZealandText;
        
        public Border NewZealandBorder;
        
              
        public StackPanel LocalTimeStack;
        
        public TextBlock LocalTimeText;
        
        public Border LocalTimeBorder;
             
        public StackPanel mainStack;
        
        Dictionary<string, Border> SelectedClocks =  new Dictionary<string, Border>();
                
        protected override void Initialize()
        {

            CheckSelectedClocks();
            Timer.TimerTick += OnTimerTick;
            Timer.Start(1);
        }

        public override void Calculate(int index)
        {

        }
        
        private void OnTimerTick()
        {
            currentTime = DateTime.Now;
          
            if(NewyorktimeOption)
            {    
                NewYorkTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "Eastern Standard Time");
                newYorkText.Text = " New York " +  NewYorkTime.ToString("HH:mm:ss");
            }
            if(LondontimeOption)
            {    
                LondonTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "GMT Standard Time");  
                LondonText.Text = "  London " + LondonTime.ToString("HH:mm:ss");
            }
            if(FrankfurttimeOption)
            {    
                FrankfurtTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "W. Europe Standard Time");
                FrankfurtText.Text = "Frankfurt " + FrankfurtTime.ToString("HH:mm:ss");
            }
            if(HongKongtimeOption)
            {  
                HongKongTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "China Standard Time");
                HongKongText.Text = "Hong Kong " + HongKongTime.ToString("HH:mm:ss");
            }
            if(TokyotimeOption)
            {  
                TokyoTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "Tokyo Standard Time");
                TokyoText.Text = "    Tokyo " + TokyoTime.ToString("HH:mm:ss");
            }
            if(SydneytimeOption)
            {  
                SydneyTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "AUS Eastern Standard Time");
                SydneyText.Text = "   Sydney " + SydneyTime.ToString("HH:mm:ss");
            }
            if(NewZealandtimeOption)
            {  
                NewZealandTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currentTime, TimeZoneInfo.Local.Id, "New Zealand Standard Time");
                NewZealandText.Text = "NewZealand " + NewZealandTime.ToString("HH:mm:ss");
            }
            if(LocaltimeOption)
            {  
                LocalTime = currentTime.ToLocalTime();
                LocalTimeText.Text = "Local Time " + LocalTime.ToString("HH:mm:ss");
            }

        }
        public void CheckSelectedClocks()
        {
            if(LocaltimeOption)
            {
                LocalTimeText = new TextBlock()
                {
                    Padding = "15 10 10 10",
                    Text = "Local Time " +  LocalTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    
                    FontFamily = "Digital-7"
  
                };

                LocalTimeStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
            
                    Width = 185,
                    Height = 45,

                };
        
                LocalTimeBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Margin = "0 0 0 1",
                    Child = LocalTimeStack
 
                }; 
                LocalTimeStack.AddChild(LocalTimeText);

                SelectedClocks.Add("LocalTime", LocalTimeBorder);
            }
            if(NewyorktimeOption)
            {
                newYorkText = new TextBlock()
                {
                    Padding = "15 10 10 10",
                    Text = "New York " +  NewYorkTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                NewYorkStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 45,
                };
        
                NewYorkBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = NewYorkStack
                }; 
                NewYorkStack.AddChild(newYorkText);
                
                SelectedClocks.Add("NewYork", NewYorkBorder);
            }
            if(LondontimeOption)
            {
                LondonText = new TextBlock()
                {
                    Padding = "15 10 10 10",
                    Text = "  London " +  LondonTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                LondonStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
        
                LondonBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = LondonStack
                };

                LondonStack.AddChild(LondonText);
                SelectedClocks.Add("London", LondonBorder);
            }
            if(FrankfurttimeOption)
            {
                FrankfurtText = new TextBlock()
                {
                    Padding = "14 10 10 10",
                    Text = "Frankfurt " +  FrankfurtTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                FrankfurtStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
                FrankfurtBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = FrankfurtStack
                };

                FrankfurtStack.AddChild(FrankfurtText);
                SelectedClocks.Add("Frankfurt", FrankfurtBorder);
            }
            if(HongKongtimeOption)
            {
                HongKongText = new TextBlock()
                {
                    Padding = "12 10 10 10",
                    Text = "Hong Kong " + HongKongTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                HongKongStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
                HongKongBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = HongKongStack
                };

                HongKongStack.AddChild(HongKongText);
                 
                SelectedClocks.Add("HongKong", HongKongBorder);
            }
            if(TokyotimeOption)
            {
                TokyoText = new TextBlock()
                {
                    Padding = "10 10 10 10",
                    Text = "    Tokyo " + TokyoTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                TokyoStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
                TokyoBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = TokyoStack
                };

                TokyoStack.AddChild(TokyoText);
                SelectedClocks.Add("Tokyo", TokyoBorder);
            }
            if(SydneytimeOption)
            {
                SydneyText = new TextBlock()
                {
                    Padding = "10 10 10 10",
                    Text = " Sydney " + SydneyTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 20,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                SydneyStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
                SydneyBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = SydneyStack
                };

                SydneyStack.AddChild(SydneyText);   
                SelectedClocks.Add("Sydney", SydneyBorder);
            }
            if(NewZealandtimeOption)
            {
                
                
                NewZealandText = new TextBlock()
                {
                    Padding = "6 10 10 10",
                    Text = "NewZealand " + NewZealandTime.ToString("HH:mm:ss"),
                    ForegroundColor = "White",
                    FontSize = 19,
                    FontWeight = FontWeight.Bold,
                    FontStyle = FontStyle.Normal,
                    FontFamily = "Digital-7"
                };

                NewZealandStack = new StackPanel()
                {
                    BackgroundColor = "Transparent",
                    Width = 185,
                    Height = 40,
                };
                NewZealandBorder = new Border()
                {
                    BackgroundColor = "D21C1B21",
                    BorderColor = Color.LightSlateGray,
                    BorderThickness = 1,
                    CornerRadius = 5,
                    Width = 185,
                    Height = 40,
                    VerticalAlignment = VerticalAlignment.Bottom,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Child = NewZealandStack
                };

                NewZealandStack.AddChild(NewZealandText);
                SelectedClocks.Add("NewZealand", NewZealandBorder);
            }
            
            
            GenerateClocks();
        }
        
        public void GenerateClocks()
        {
             mainStack = new StackPanel()
            {
                Width = 190,
                HorizontalAlignment = HorizontalPos,
                VerticalAlignment = VerticalPos
            };

            var clockGrid = new Grid(SelectedClocks.Count,1)
            {
                Margin = "2 2 2 10"    
            };
            
            clockGrid.Columns[0].SetWidthInPixels(220);
  
            for(int i = 0; i < SelectedClocks.Count; i++)
            {
                Print(i);
                var item = SelectedClocks.ElementAt(i);
                var obj = item;
                clockGrid.Rows[i].SetHeightInPixels(42);
                clockGrid.AddChild(obj.Value, i, 0);
            }
            
            mainStack.AddChild(clockGrid);
            Chart.AddControl(mainStack);
        }
    }
}
Comments

leeminho2662000 - November 16, 2022 @ 04:04

Thank you for sharing this data. I really enjoy what you've written on your blog. You've shared a very useful and entertaining blog post with the public. Weaver game online 

lisapurnellsw - November 16, 2022 @ 09:23

I feel particularly appreciative that I read this. It is especially useful and to an extraordinary degree significant and I incredibly took in an 1v1 battle   unfathomable course of action from it. 

johndavidd8888 - November 17, 2022 @ 05:48

A clock is a device that tells time. There are a variety of clocks, and they all have different purposes. Some are used to track the time, while snake io others are used to keep track of the seasons. Some clocks are used to keep track of the seasons, while others are used to keep track of the time. 

kateberry642 - November 18, 2022 @ 09:37

It is really helpful. Now students can easily avail the best services of nursing essay writing service UK for that students can get the best academic assistance and easily submit there work before the deadline. A good opportunity for students and professionals. 

leelinda13899 - November 19, 2022 @ 04:16

I have read your article; it is very instructive and valuable to me. I admire the valuable information you offer in your articles. Thanks for posting it. usps tracking number

asshancuc - November 19, 2022 @ 04:42

First of all, thank you for your post. totosite Your posts are neatly organized with the information I want, so there are plenty of resources to reference.  I bookmark this site and will find your posts frequently in the future. Thanks again ^^ 

mohsinkhatri652 - November 21, 2022 @ 13:11

It is a fantastic post – immense clear and easy to understand. I am also holding out for the sharks too that made me laugh. no link

mohsinkhatri652 - November 22, 2022 @ 12:45

You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us to read this... https://www.uspslitebluelogin.net/

mohsinkhatri652 - November 25, 2022 @ 16:51

Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. lectura del tarot para saber si mi pareja me engaña

michaelclarke9112 - November 29, 2022 @ 12:33

Our writers also have a planned strategy that they implement when working on any order of report writing help. This follows in-depth researching, unearthing the latest information, digging into valuable e-books and resources such as journals, libraries, etc., and then outlining a proper framework of the order.

0