2005issue C031-6
A three-state directional breakout on a moving-average midline
Each bar is labeled directional-up, directional-down, or non-directional by comparing both its high and its low with a 20-period simple moving average of the close. The same three-state rule can be shown as a histogram-display under price or as a colored-bar-display on the price series.
- A directional-up bar has both its low and its high at or above a 20-period simple moving average of the close.
- A directional-down bar has both its high and its low at or below that same moving-average midline.
- A non-directional bar straddles the midline: the low is at or below it and the high is at or above it.
- Histogram-display and colored-bar-display show the same three-state rule, but each style needs its own expert definition.
What the three-state rule constructs
A breakout here is a chart condition that labels every bar against a moving-average midline. The moving-average is a 20-period simple average of the close. The rule-based-entry maps that comparison to one of three states and, if desired, paints the state on the chart so a later test can accept, reject, or skip the trade.
The three states are directional-up, directional-down, and non-directional. The procedure is complete when every bar receives one of those labels.
How each bar is labeled
A directional-up state is defined when both the bar low and the bar high are at or above the 20-period simple moving average of the close.
A directional-down state is defined when both the bar high and the bar low are at or below the same 20-period simple moving average of the close.
A non-directional state is defined when the bar low is at or below that moving-average and the bar high is at or above it. In that case the bar straddles the midline.
Two ways to show the same rule
A histogram-display plots the three states as separate colored histograms in a pane below price, with the 20-period simple moving average of the close drawn on the price pane. The sequence of states is then visible without coloring the price bars.
A colored-bar-display attaches the expert highlights to the price series that already carries the 20-period simple moving average. The same three-state rule is then read directly on the price bars.
One expert cannot draw both displays
The two display constructions cannot be used together from a single expert definition. If both styles are needed, a second expert must be created, one for each display style.
All readings on this track · 20 readings
- 1982Constructing a funnel from converging support and resistance
- 1990Bond trends as auction tests at prior highs
- 1995Constructing mechanical trendline breakout entries
- 2000Crowd balance points before a range-breakout
- 2000Breakout rules fail without tested exits
- 2002Waiting for setups instead of forcing trades
- 2003The 20-day channel high as a support test after breakout
- 2004Intermediate-term breakout rules and fifty-day exits
- 2004A three-check drill for support and resistance
- 2004Weekly exponential averages turn from breakout rails to resistance
- 2005Constructing a three-state moving-average breakout histogram
- 2005A three-state directional breakout on a moving-average midline
- 2005A range-market breakout watchlist with 50-day pullbacks and stops
- 2009Optimism bias, breakout adds, and predefined loss limits
- 2015Refuse mixed-horizon entries until the checklist locks one persona
- 2017Intraday breakouts planned from whole-number support and resistance
- 2017A fractal-dimension regime-gate for mechanical breakout entries
- 2018Trend-first FX walls stay a hypothesis until a second touch, RSI recross, or failed break
- 2019Constructing a sell-relative-strength-index from the intrabar range ratio
- 2020Decluttered charts for breakout, support, and stop rules