'Collecting OHLC for current timeframe and identifying the mode

Essentially I want to collect all the data of the OHLC of a symbol and identify the most common (mode) numbers that are closest to each other within a 1 pip/point range.

To clarify I want the most common point where price closes on 1 timeframe within a specific price range.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source