Friday close/open

 

Can somebody please share with code how to

find Friday open and close when today is Monday.

This day has 23 hours only.

Thanks a lot.

 

Time or price?

 
phy:

Time or price?


Price, please.
 

B

If your broker has a Sunday bar, then Fridays Open is

double dFridayOpen, dFridayClose;

dFridayOpen = iOpen(Symbol(), PERIOD_D1, 2);

dFridayClose = iClose(Symbol(), PERIOD_D1, 2);

if there is no Sunday bar then it is

double dFridayOpen, dFridayClose;

dFridayOpen = iOpen(Symbol(), PERIOD_D1, 1);

dFridayClose = iClose(Symbol(), PERIOD_D1, 1);

Good Luck

-BB-

 

That would be easy but

it not works on Friday because Friday has 23 hours.

But other days have 24 hours.

 
Brygada:

That would be easy but

it not works on Friday because Friday has 23 hours.

But other days have 24 hours.


? I don't see how it would not work, it simply looks at the open and close values for the daily candle. It is exactly what you are after.
Reason: