I recommend to copy all candlestick’s upper wick of M5 to first array, after copy all candlestick’s upper wick of M15 to second array, etc... After that please search in arrays the value of candlestick’s upper wick what you need, please use function ArrayBsearch() or similar. (Also please read article about arrays on mql - https://www.mql5.com/en/articles/567 ).
Have you been able to solve this? I tried working on something similar but didn't make much progress. Please let me know, I am very interested in the solution.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.