Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.trinigence.com/llms.txt

Use this file to discover all available pages before exploring further.

What operators and conditions are

Indicators by themselves only produce values. Operators and conditions define how those values are interpreted and turned into decisions. In Trinigence:
  • indicators → produce values or states
  • operators → compare or relate values
  • conditions → resolve to true or false
Only conditions can trigger entries, exits, or filters.

Conditions at a glance

A condition is any expression that evaluates to true or false. Examples:
RSI(14) > 50
EMA(20) crosses above EMA(50)
ATR(14) > ATR(14) average
Conditions are evaluated deterministically on candle close.

Comparison operators

Comparison operators compare two values. Common operators:
  • > greater than
  • < less than
  • >= greater than or equal
  • <= less than or equal
  • == equal to
Examples:
RSI(14) > 50
Close price < EMA(200)

Crossover operators

Crossover operators detect events, not states. Examples:
EMA(20) crosses above EMA(50)
RSI(14) crosses below 30
Crossovers:
  • trigger only on the candle where the crossing occurs
  • are not continuously true
  • are commonly used for entries
Crossovers are event-based, not condition-based.

State conditions

State conditions describe ongoing situations. Examples:
EMA(20) is above EMA(50)
MACD is above signal
Trend is bullish
State conditions:
  • remain true across multiple candles
  • are often used as filters
  • define context rather than triggers

Logical operators (AND / OR)

Multiple conditions can be combined using logical operators.

AND

All conditions must be true.
RSI(14) > 50 AND EMA(20) > EMA(50)

OR

At least one condition must be true.
RSI(14) < 30 OR price breaks previous low
OR conditions can significantly increase trade frequency.

Grouping conditions

Conditions can be grouped to control evaluation order. Example:
(RSI(14) > 50 AND EMA(20) > EMA(50))
OR
(MACD crosses above signal)
Grouping prevents unintended logic behavior.

Direction-aware conditions

Conditions may apply to:
  • long entries only
  • short entries only
  • both directions
Example:
Go long when RSI(14) > 55.
Go short when RSI(14) < 45.
Each direction is evaluated independently.

Evaluation timing

Conditions are evaluated:
  • on candle close
  • on the strategy timeframe
  • once per candle
If a condition is true intrabar but false at close, it does not trigger.

Defaults and assumptions

If operators or conditions are:
  • explicit → used exactly
  • implied but standard → ATI infers safely
  • ambiguous → ATI asks for clarification

What Trinigence fills automatically

See how logic gaps are handled.

Common mistakes

Crosses are events. States persist over time.
OR conditions can unintentionally flood a strategy with trades.
Without grouping, logic may not behave as intended.

Best practices

  • Use crosses for entries
  • Use states for filters
  • Group complex logic explicitly
  • Keep conditions readable

Indicator categories

Explore indicators by type.

Indicator categories

Trend, momentum, volatility, and more.

Entry logic

How conditions trigger trades.

Schedule & filters

Restrict when conditions are allowed.

Indicators overview

Return to the big picture.
Indicators produce signals.
Operators define meaning.
Conditions drive action.