Trendline distances
How far the close is above the lower and upper trendlines, in percent of each line on this bar.
It reads the lower and upper trendlines on this bar, the lines through the last two swing lows and the last two swing highs, and gives the close's distance from each in percent: positive when the close is above the line, negative below it.
How to read it
- Lower distance near zero means the close is testing the rising lows; below zero the lows have broken.
- Upper distance is mostly negative: on SPY minute bars 95% were at or below zero, since a close above it soon forms a new swing high.
- On SPY the lower distance ran from about -0.5% to +2.1% on 90% of bars, and the upper from about -1.9% to 0%.
What it outputs
- From lower line
- The close's distance above the lower trendline, in percent of the line's value.
- From upper line
- The close's distance above the upper trendline, in percent; below zero while under it.
Settings
- Swing size
- How far price must turn, as a fraction (0.005 is 0.5%), before a low or high counts as a swing. Raising it keeps only bigger swings, so lines last longer and start later; lowering it redraws them more often on smaller wiggles.
Pitfalls
- Each line is redrawn when a new swing confirms, so it jumps on that bar; the values before a jump came from the old line.
- Nothing draws until four swings have formed: at 0.5% on SPY one-minute bars that took about 4,200 bars, some 11 sessions.