Hi,
I am based in the UK and running EFS scripts against intraday charts with a GMT defined template that runs from 14:30 to 21:00 hours in the UK. I need to be able to identify the first bar of the day and the last bar of the day. Code below to do this.
var nInterval = getInterval(0);
var nHour = getHour(0);
var nMinute = getMinute(0);
if (nHour == 14 && nMinute == 30) firstbarofday = true;
else firstbarofday = false;
if ((nHour == 20) && (nMinute == 60 - nInterval)) lastbarofday = true;
else lastbarofday = false;
I have hit a problem with British Summer Time. For the week of 27 Oct 08 to 31 Oct 08 the UK clocks went back but the US clocks did not.
My charts automatically showed bars from 13:30 to 19:00 for that week without having to change the time template.
With my code above I am missing the firstbar of day at 13:30 and picking it up an hour later at 14:30 and I am not picking up the last bar of day at all.
Any suggestions of how to code this to correctly pick up the right bars?
I am based in the UK and running EFS scripts against intraday charts with a GMT defined template that runs from 14:30 to 21:00 hours in the UK. I need to be able to identify the first bar of the day and the last bar of the day. Code below to do this.
var nInterval = getInterval(0);
var nHour = getHour(0);
var nMinute = getMinute(0);
if (nHour == 14 && nMinute == 30) firstbarofday = true;
else firstbarofday = false;
if ((nHour == 20) && (nMinute == 60 - nInterval)) lastbarofday = true;
else lastbarofday = false;
I have hit a problem with British Summer Time. For the week of 27 Oct 08 to 31 Oct 08 the UK clocks went back but the US clocks did not.
My charts automatically showed bars from 13:30 to 19:00 for that week without having to change the time template.
With my code above I am missing the firstbar of day at 13:30 and picking it up an hour later at 14:30 and I am not picking up the last bar of day at all.
Any suggestions of how to code this to correctly pick up the right bars?
Comment