TradeViora AcademyLearn. Analyze. Practice. Trade Smarter.
Menu

FREE FINANCIAL EDUCATION

A trend-state transition table

Study a trend-state transition table through mechanisms, a synthetic worked case, practice, and explained assessment.

Market Structure

APPLIED STUDY · ORIGINAL LESSON

Learning plan and prerequisites

Before you begin: Complete swing-sequence comparison and break-of-structure lessons.

Mechanism and interpretation

A state table turns descriptive labels into a repeatable sequence. This lesson uses four states: insufficient, upward, downward and mixed. Until two confirmed highs and two confirmed lows exist, state is insufficient. Thereafter, recompute on each newly confirmed pivot: upward requires both latest like-pivot changes to be up; downward requires both to be down; every other combination is mixed. Equality uses a declared tolerance and belongs to mixed. Between new pivot confirmations, retain the last computed state.

An intrabar breach or close through a level can be logged as a separate alert without instantly changing this state machine. This distinction prevents one implementation from using confirmed swings while another silently uses every price crossing. The state table does not claim that markets have four natural regimes. It defines a consistent model that can be tested. More complex machines may add transition states or persistence requirements, but they need equally explicit input and update rules.

Worked case — synthetic data

Synthetic confirmed highs 100 and 110 and lows 90 and 98 make both changes positive, so the initial state is upward with zero tolerance. A newly confirmed high 108 changes the high side to down while the low side remains up; the state becomes mixed. A later confirmed low 95 changes the low side to down, so both latest changes are now down and state becomes downward. The transition sequence is upward → mixed → downward.

Suppose price briefly traded below 98 before the 95 low was confirmed. That event could trigger a recorded downside alert under another rule, but it would not yet create a confirmed low 95 for this machine. Backdating the downward state to the first breach would combine two different systems. A useful event log stores input timestamp, new pivot ID, previous state, current like-pivot comparisons and resulting state. It should also preserve no-change updates so another researcher can reproduce when the model remained mixed.

Context and failure modes

Sparse pivot algorithms can keep a state unchanged for long intervals, while dense algorithms can generate frequent transitions. Neither behaviour establishes which state is economically meaningful. Differences in tolerances and confirmation delays must be reported. Missing data should not be interpreted as an unchanged market merely because the program received no event. Distinguish a valid retained state from an unavailable calculation caused by a data gap.

Practice task

The latest two highs are 70 and 75 and lows 60 and 64, giving an upward state. The next confirmed low is 62, followed by a confirmed high 76. With zero tolerance, state the result after each event.

Worked practice answer

After low 62, the low side is down while the high side is up, so state becomes mixed. After high 76, the high side remains up while the last low comparison 64-to 62 remains down, so state stays mixed. A new high alone does not satisfy the requirement that both sides rise.

Topic assessment

Choose an answer before opening each explanation. These questions test the specific mechanism in this lesson.

1. What triggers recomputation in this machine?

  1. Every unconfirmed wick automatically
  2. A newly confirmed pivot
  3. Any mouse movement on the chart
Reveal answer and explanation

B. The input-event definition determines when the table is evaluated.

2. Why is the state mixed after high 108?

  1. Both sides fall
  2. There are no confirmed pivots
  3. The high side falls while the low side still rises
Reveal answer and explanation

C. The two latest like-event changes disagree.

3. Can a breach alert and the trend state differ?

  1. Yes; they use different defined inputs
  2. No; all structure labels are identical
  3. Only if arithmetic is impossible
Reveal answer and explanation

A. An alert can occur before the later pivot confirmation required by the state table.

Primary references and scope

Original explanation and synthetic calculations. Chart thresholds are explicit research conventions, not exchange rules or proof of predictive ability.