Okies I have a question.

Say Im using a 60 minute bar period and I want to get the daily open and close of a full daily candle how exactly do I achieve this so it mirrors the open and close of the daily bars on FXCM.

Quote:

BarPeriod = 60;
static var DailyOpen = 0, DailyClose = 0;
if(day(0) != day(1)) { // midnight has passed.
DailyOpen = priceOpen(24); //Get open from 24 bars ago?
DailyClose = priceClose(0); //Get close from last bar?
}


Though it doesn't seem to work right, also Sunday is a puzzle to me. Say if I want the first daily candle of the week to be from the Sunday open candle on FXCM to the close of the Monday candle (because technically that is the first full day of the week) how is that done...

Thanks for any feedback.