function that will return the distance (in points) between the open and close of the candle

 

Hello everyone. I am slowly developing an EA and i observe the candles in the chart. I noticed that there are some candles that the open and close is so near or they called it a pinbar and if the pinbar has a high volume then it will make a breakout. I am thinking that if this candle will appear i will put horizontal line above and below that candle and if the price crosses the line then it will execute a trade. But, as of now i dont know how to code this function. 

I hope theres someone that will help me with the code about this. 

Thank you very much in advance for the positive response regarding with my problem

God Bless you all.



int CandleOpenCloseDistance()

{


return;

}

Reason: