I actually made a slight error in the above code didnt realise it till yesterday but I couldnt edit my last post so here is the correct version:

Quote:

function run() {
BarPeriod = 60;

if(dow(0) > 1 && dow(0) <= 5 && day(0) != day(1)) {
SkillLong[0] = priceOpen(timeOffset(UTC,1,0,0)); // Get Price From Yesterdays Open After Midnight For Monday-Thursday.
SkillLong[1] = priceClose(timeOffset(UTC,1,23,59)); // Get Price From Yesterdays Close Before Midnight For Monday-Thursday.
printf("\nDayOpen: %.5f",SkillLong[0]);
printf("\nDayClose: %.5f",SkillLong[1]);
}
else if(dow(0) == 1 && hour(0) == 0 && day(0) != day(1)) {
SkillLong[0] = priceOpen(23); // Get Price From Fridays Open After Midnight For Friday.
SkillLong[1] = priceClose(0); // Get Price For Fridays Close On Midnight Of Sunday.
printf("\nFDayOpen: %.5f",SkillLong[0]);
printf("\nFDayClose: %.5f",SkillLong[1]);
}
}