Close order on close price in MQL5

 

I am trying to find out a way to close order on the closing price of the current candles.

Kindly, guide me how I can do that. I have read about the Ctrade PositionClose() function, but do not know the usage. Can anyone help?

Reason: