How the candle is constructed:
Open= Open price of Friday, if Friday is a holiday, next available open price
High= Highest high price of Friday, Monday, Tuesday, Wednesday, Thursday
Low= Lowest low price of Friday, Monday, Tuesday, Wednesday, Thursday
Close=Close price of Thursday, if Thursday is a holiday, previously available close price
I am very new to Pine script, so waiting for your comments and review.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.