Skip to main content
Track Moving average
9 / 15
Library

2005issue C021

Three-state moving-average directional breakout construction

Lock lookback-length, offset, source-series, and average type first, then classify each bar against a moving-average-baseline as a full-bar-breakout above, a full-bar-breakout below, or an overlap-state. Those states are written as a histogram-pair on a separate dual histogram, so the overlap case stays visible before any later out-of-sample comparison.

  • Fix lookback-length, offset, source-series, and average type before any bar is classified against the moving-average-baseline.
  • A full-bar-breakout is assigned only when the whole bar sits on one side of the baseline: the low above it, or the high below it.
  • An overlap-state is kept as a mixed histogram-pair instead of a single-signed directional value.
  • The study is a separate dual histogram with a zero baseline, and histogram colors stay independent of price-bar colors.
Entries in this reading1 entry

A baseline before a breakout state

A moving-average-baseline is a lookback smoother of an ordered price series used as the comparison level for a bar, not as a plotted price overlay.

Editorial reading: lock that baseline first, then classify each bar as fully above it, fully below it, or crossing it, so the overlap-state stays visible before any later out-of-sample comparison.

Lock the constructor first

Lookback-length is the number of sampling intervals used to compute the average. It is constructed with a minimum length of 1 bar and a documented default of 20.

The moving-average constructor also exposes an offset, documented with a default of 0.

The source-series is the price input fed into the average. It defaults to close and also allows high, low, open, or a multi-price composite.

The same lookback can be computed as a simple, exponential, weighted, or volume-weighted average, with the simple form as the default.

Classify each bar into one of three states

A full-bar-breakout is a state in which the entire bar sits on one side of the moving-average-baseline.

A bar is recorded as fully positive only when its low is above the moving average, and fully negative only when its high is below that average.

An overlap-state is a state in which the range of the bar crosses the moving average, so neither a full upside nor a full downside reading is assigned.

When the bar overlaps the average, the construction returns a mixed histogram-pair instead of a single-signed directional value. A histogram-pair is two signed histogram values that encode the directional state, including a split pair for the overlap case.

Show the states off the price pane

The study is built as a separate dual histogram with a zero baseline rather than as a price-pane overlay.

Histogram colors and price-bar colors are independent parameters for the positive, overlap, and negative states.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
9 of 15 in the Moving average track
20051-1 pp.Next on Moving averageConstructing a move-adjusted moving averageA simple moving average can dampen noise in an ordered series, but it only describes values already observed.
All readings on this track · 15 readings
  1. 1990Building a percent-difference moving-average oscillator
  2. 1991Ease of movement oscillator construction
  3. 1993A twelve-month moving-average filter for inflation direction
  4. 1993Constructing two-endpoint JSA moving averages
  5. 1999Centered moving averages for trend construction
  6. 2000Constructing a slope-corrected moving average
  7. 2000Lookback length as a construction check for the modified moving average
  8. 2001Smoothing balance of market power with a moving average
  9. 2005Three-state moving-average directional breakout construction
  10. 2005Constructing a move-adjusted moving average
  11. 2005Moving-average construction: windows, weights and stops
  12. 2008Constructing stacked moving-average filters
  13. 2011Constructing percentage-offset moving-average bands
  14. 2015Linearity, commutation, and ratio smoothing in moving averages
  15. 2019Constructing a 50-200 sma-channel for swing entries and exits
All 449 readings tagged Moving average
Also on Moving average5 readings