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
Comment