How to call values from ClusterDelta indicator and copy to buffer

 
Hello all, I have coded some EAs before, but I need a little help with this. I've attached MQL5 code to this. What I want to do is to run code every time a new range bar is completed that calls delta, and OHLC data for the range bars from the code. I assume this check would be placed within the OnTick function and would check whether a new range bar has been formed or not (the same way as we do with timeframe bars) and then run the necessary functions to do any analysis required. If anyone knows how to do this, I'd really appreciate any assistance. Thanks.
Files: