How to calculate Exchange Opening Time? - NinjaTrader Programming | futures io social day trading
futures io futures trading


How to calculate Exchange Opening Time?
Updated: Views / Replies:2,987 / 13
Created: by baruchs Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

How to calculate Exchange Opening Time?

  #1 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

How to calculate Exchange Opening Time?

Hi,
For my strategy I need to know the opening times of all exchanges (NY, Tokyo, Sidney, London).
So I have those parameters:
private int NYStart = 830;
private int TokyoStart = 1800;
private int SydneyStart = 1800;
private int LondonStart = 200;

Its for CST so I also have a parameter for CSTOffsetHours.
Now I need to change those opening hours depending on different DST (day light saving times).
So that is how I do it:
int MonthDay = ToDay(Time[0]) % 10000;
if (MonthDay > 313 && MonthDay < 1106) TokyoStart -= 100;
if (!(MonthDay > 403 && MonthDay < 1002)) SydneyStart += 100;
if (MonthDay > 313 && MonthDay < 2603) TokyoStart -= 100;
if (MonthDay > 313 && MonthDay < 1106) LondonStart -= 100;
if (MonthDay > 1030 && MonthDay < 1106) LondonStart += 100;

Is this correct?

Baruch

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Auckland
 
Futures Experience: Advanced
Platform: Ninja Trader
Broker/Data: Zen-Fire
Favorite Futures: CL and ES
 
Posts: 710 since Apr 2010
Thanks: 3,720 given, 661 received


Hi

This might assist but not sure if it will

Attached Thumbnails
How to calculate Exchange Opening Time?-timezones-lesson-3.pdf  
Reply With Quote
 
  #4 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Hi sharmas,
No it does not help. I know the times. My question is about the calculaton of DST.

Baruch

Reply With Quote
 
  #5 (permalink)
Elite Member
Milan (I)
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,217 given, 2,067 received


baruchs View Post
Hi,
For my strategy I need to know the opening times of all exchanges (NY, Tokyo, Sidney, London).
So I have those parameters:
private int NYStart = 830;
private int TokyoStart = 1800;
private int SydneyStart = 1800;
private int LondonStart = 200;

Its for CST so I also have a parameter for CSTOffsetHours.
Now I need to change those opening hours depending on different DST (day light saving times).
So that is how I do it:
int MonthDay = ToDay(Time[0]) % 10000;
if (MonthDay > 313 && MonthDay < 1106) TokyoStart -= 100;
if (!(MonthDay > 403 && MonthDay < 1002)) SydneyStart += 100;
if (MonthDay > 313 && MonthDay < 2603) TokyoStart -= 100;
if (MonthDay > 313 && MonthDay < 1106) LondonStart -= 100;
if (MonthDay > 1030 && MonthDay < 1106) LondonStart += 100;

Is this correct?

Baruch

Hi Baruch,

Gomi is your man goto post #5 BeginTime EndTime timezone ? - Page 2 - NinjaTrader Support Forum

Reply With Quote
 
  #6 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Thanks redratsal,
Unfortunately it does not help. Gomi speaks about figuring the difference for current time from local time to exchange time and I need the difference from other (not local) time.

Baruch

p.s.
Its the second time that I ask a question on this forum. Can anyone help?
p.s.s
The first question was more like a suction to help if get helped, and I got no response.

Reply With Quote
 
  #7 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received

Why are you using in variables instead of DateTime variables ?
You want to manipulate "the opening times of all exchanges", so it will be much easier to manipulate DateTime than int, as you have all the needed classes and methods to play with timezones.
See TimeZoneInfo class, ConvertTime, DateTimeOffset, ...
You know in which timezone are NY, Tokyo, ..., so you're also able to convert any date from a timezone to another one. And as these classes are "DST aware", I don't see where could be the problem to do what you want to do.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #8 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Thanks sam028,
That is exactly what I was looking for.

Baruch

Reply With Quote
 
  #9 (permalink)
Elite Member
España
 
Futures Experience: None
Platform: NT
Favorite Futures: 6E
 
redegenerated's Avatar
 
Posts: 131 since Jun 2010
Thanks: 301 given, 81 received


sharmas View Post
Hi

This might assist but not sure if it will

this comes handy to me that i always get lost in timezone nice summary, tnx

Reply With Quote
 
  #10 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



sharmas View Post
Hi

This might assist but not sure if it will

Some questions:

(1) This table does not take into account the different daylight saving schedules, so for Europe it will not work from March 13 to March 27, 2011 and from October 30 to November 6, 2011. Tokyo does not have any DST, so the schedule will run into problems during the summer. To display the times correctly, you would need 4 different schedules.

(2) To display the Tokyo open, you would need to introduce a column with Tokyo time, as it does not match any of the other timezones and does not use DST.

Opening hours of FOREX markets

I have visited about 20 websites for FOREX opening hours and this is the result:

Tokyo Open 6:00 PM EST in winter, 7:00 PM EST in summer
Tokyo Close 4:00 AM EST in summer 5:00 AM EST in summer
Frankfurt Open 2:00 AM EST
Frankfurt Close 11:00 AM EST
London Open 3:00 AM EST (except for the 3 weeks listed above)
London Close 12:00 PM EST (except for the 3 weeks listed above)
New York Open 8:00 AM EST
New York Close 5:00 PM EST

If I translate from your PDF: Euro Open => Frankfurt Open, London Activity => London Open, European Close => London Close, we get the same values for Europe.

I get a different value for New York (1 hour later), I only have found 4:00 PM as the New York close occasionally.

For Tokyo there are different hours for winter and summer, your opening hours at 8:00 PM are later than both the winter and summer times that I have found.

Glad if somebody knows better than this.

Reply With Quote

Reply



futures io > > > > > How to calculate Exchange Opening Time?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Developing Value Area Mauro_60 NinjaTrader Programming 8 September 24th, 2013 03:08 PM
Calculate MACD divergence scarr Traders Hideout 9 August 20th, 2011 01:15 PM
reporting exchange time LostTrader NinjaTrader Programming 8 June 23rd, 2011 01:18 PM
Local vs Exchange time Mondrakete TradeStation 2 May 8th, 2011 06:40 PM
How do we calculate MB's new forex commission structure? Dragon Reviews of Brokers and Data Feeds 7 May 8th, 2010 03:30 AM


All times are GMT -4. The time now is 04:15 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.11 seconds with 20 queries on phoenix via your IP 54.163.210.170