Skip to content
All library documents

Trend Score: Counting Directional Bars and Spotting Channels

Article MQL5 code base

Summary

This document defines Trend Score as a cumulative count of directional price changes. With a fixed period, each bar contributes positive one when price rises, negative one when it falls, and zero when unchanged; summing these values gives a bounded measure of directional persistence. Without a fixed period, the count resets when price direction changes, so the running values describe the length and direction of the current sequence. The example illustrates how bearish, bullish, and unchanged bars affect that sequence.

The text suggests that, for periods from 5 to 20, readings near the period's extreme may indicate that a trend is nearing completion. It also proposes watching prolonged values around negative one to positive one in the unbounded version, since these choppy stretches may correspond to horizontal channels whose breakout could be traded. These are qualitative observations, not tested results: no data, rules for confirming a breakout, risk controls, or performance statistics are provided. The indicator may describe recent direction without reliably predicting reversals or channel breaks.

Key ideas

  • Trend Score adds one for an advancing bar, subtracts one for a declining bar, and adds zero for an unchanged bar.
  • The fixed-period version sums directional readings over a bounded lookback window.
  • The reset version counts the current directional sequence and starts over when direction changes.
  • The document proposes extreme readings as possible signs of trend completion and choppy readings as possible channel conditions.
  • The proposed interpretations are qualitative and are not supported by reported testing.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.