Hi all,

could you help me?
I want to get daily bars whose open price is the first price of that day and the close price is the last one.
I'm struggling with the weekend and with the close price of the friday bar.
I want to exclude the sunday price AT ALL.
To do this I have set: StartWeek = 10000; EndWeek = 52359;
Also I placed the BR_WEEKEND flag.

Here's the code I use. I set an hourly BarPeriod and the TimeFrame = frameSync(24) to get the daily prices.

Everything seems correct except from the friday bar printed on monday.
Its close price is actually the midnight price of sunday. I would like to exclude the sunday getting the last available price of friday as the close price of the friday bar.
Is this possible?

Code
function run()
{
set(LOGFILE);
assetList("AssetsFix");
BarPeriod = 60;
BarOffset = 0;
BarMode = BR_WEEKEND;
Weekend = 2;
StartWeek = 10000;
EndWeek = 52359;
StartDate = 20200401;
asset("EUR/USD");

printf("\n%s", datetime());

/*HOUR PRICES*/
printf(" | open=%f - close=%f | ", priceOpen(), priceClose());

TimeFrame = frameSync(24);
vars open = series(priceOpen());
vars close = series(priceClose());
TimeFrame = 1;

/*DAILY PRICES*/
printf(" | open=%f - close=%f | ", open[0], close[0]);

}


Thanks