Trend strength detector
A 0-100 trend score that reads 100 on almost every bar at default settings, so it rarely separates trend from chop.
The indicator fits a straight line through the last window of closes, 50 one-minute bars by default, and scores three things: the R-squared of that fit, the gap between higher highs and lower lows bar to bar, and the net price move. The net move adds very little on one-minute bars, since a 0.1 percent move adds only 0.01 to the raw score. The three parts are weighted 40, 30 and up to 30, added together, then multiplied by 100 and capped at 100, so any window with a raw score of 1 or more reads exactly 100.
How to read it
- The line sits in its own pane below the price, scaled 0 to 100.
- At default settings it reads 100 on nearly every bar, so a flat line at the top is the normal state.
- A dip below 100 marks a choppy stretch, where the closes fit no straight line and highs and lows lean no way.
- The score has no direction, so it cannot tell you whether the trend runs up or down.
What it outputs
- Trend strength
- A 0-100 trend score. At default settings it reads exactly 100 on at least 95 percent of scored bars and drops below 100 only in choppy windows with no straight-line trend.
Settings
- window
- How many one-minute bars the line fit and the high and low count look back over. A shorter window reacts faster on fewer bars. A longer one covers more history per reading. At the default of 50 the score already sits at 100, so changes can be hard to see.
Pitfalls
- At default settings the score reads 100 on at least 95 percent of a month of SPY one-minute bars. Multiplying by 100 before the cap wipes out the promised 0 to 100 spread.
- The score is blind to direction. An up-trend and a down-trend both score high, and its correlation with the close in the sample was about zero at -0.003.
- Only the default window was checked on this data. The first 49 bars of the loaded data have no value at the default window.