There is a problem with the MT4 code switching to MT5 code

1
This is the code to convert the GapFinder button MT4 version to the GapFinder button MT5 version.The compilation passed though, I think the algorithm is incorrect and does not implement the same functionality as the MT4 version.Please modify the GapFinder button MT5 version.The merit is immeasurable!