Skip to main content

Events vs states

One of the most common sources of confusion in strategy logic is the difference between:
  • events (something happens now)
  • states (something is true over time)
Crossovers and trend changes are events. They trigger at a specific moment - not continuously.

What a crossover is

A crossover occurs when one value moves from one side of another value to the other. Examples:
EMA(20) crosses above EMA(50)
MACD line crosses below signal
RSI(14) crosses above 50
A crossover:
  • triggers on the candle where the crossing happens
  • is true for one evaluation only
  • becomes false again on the next candle

Crossovers vs comparisons

Compare: Crossover
EMA(20) crosses above EMA(50)
Triggers once. Comparison
EMA(20) > EMA(50)
Remains true as long as the condition holds.
Most entries should be based on crossovers, not comparisons.

What a trend change is

A trend change is a transition from one directional state to another. Examples:
Trend changes to bullish
Supertrend flips to buy
Trend direction switches to down
Trend changes:
  • are event-based
  • usually derived from trend indicators
  • often abstract multiple internal calculations

Trend state vs trend change

Trend state
Trend is bullish
Trend change
Trend changes to bullish
Trend states persist.
Trend changes trigger once.

Common uses

Entries

Crossovers and trend changes are most commonly used for:
  • trade entries
  • initial position opening
  • momentum confirmation
Example:
Go long when EMA(20) crosses above EMA(50).

Exits

They can also be used for exits. Example:
Exit long when trend changes to bearish.

Evaluation timing

Crossovers and trend changes are evaluated:
  • on candle close
  • on the strategy timeframe
  • once per candle
If the cross happens intrabar but is gone at close, it does not trigger.
There is no intrabar crossover detection by default.

Direction-specific behavior

Crossovers may be defined per direction. Example:
Go long when EMA(20) crosses above EMA(50).
Go short when EMA(20) crosses below EMA(50).
Each event is evaluated independently.

Defaults and assumptions

If a crossover or trend change is:
  • clearly stated → used exactly
  • implied → ATI infers conservatively
  • ambiguous → ATI requests clarification

What Trinigence fills automatically

See how event logic is inferred.

Common mistakes

Crossovers are events, not states. Use comparisons for filters.
A crossover fires once, not continuously.
Trend changes are moments. Trend states persist.

Best practices

  • Use crossovers for entries
  • Use states for filters
  • Do not chain multiple crossovers unnecessarily
  • Validate trigger points visually

Operators & conditions

Learn how crossovers fit into logic.

Events trigger action.
States define context.