The indicator has two parameters: the period and the number of splits. For the selected period, the maximum and minimum are calculated, and the scope of the market is determined by the difference between the maximum and minimum. The scope is divided by the number of partitions, thereby determining the step of the levels. If the average price (ohlc4) falls within the range between levels, this range is drawn. A simpler analogy: we have a local minimum. and the local maximum for the selected period, we build a ladder between them, the number of steps of which is equal to the number of splits, and if the price is on some step of this ladder, then this step is drawn, so we can see how many steps separate us from the maximum and minimum.