Classifying Price Slopes Against Historical Pivot Patterns with KNN
Summary
The indicator compares the current regression slope of closing prices with stored slopes from confirmed pivot highs and lows. A pivot is identified using highs or lows across a configurable window; the slope over the bars leading into each pivot is saved in a separate library. On each bar, the indicator finds the nearest stored slopes for each library and assigns the class whose average distance is smaller. It displays a directional bias and a confidence value, and marks transitions out of neutral. The document also describes adjustable pivot length, regression window, neighbour count, and a panel summarizing recent signals.
The examples and settings explain how the indicator is constructed, but the document provides no independent performance results. Its confidence measures relative similarity to the two stored groups, not the probability or timing of a future reversal. The described summary statistics use a limited recent window and may be uninformative when few signals occur; the tool is presented as context or a filter, not a forecast of price distance.
Key ideas
- The model stores regression slopes from confirmed pivot highs and lows in separate groups.
- Each bar's current closing-price slope is compared with the nearest stored examples in both groups.
- The nearer group determines the directional class, while the confidence reflects relative distance between groups.
- A high-pivot resemblance does not specify when a pivot will occur or how far price may move.
- The recent signal panel summarizes a limited window and can remain uninformative when signals are scarce.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.