Docs / Rule language
Rule language
Operators and beliefs
A comparison does not answer true or false. It answers how far past the line the reading is, measured against how much that quantity normally moves for this symbol, as a belief between 0.05 and 0.95.
How a comparison becomes a belief
- Both sides are computed as series over the symbol's daily history. The margin is today's left side minus today's right side (the other way round for
<and<=). - The scale is the standard deviation of left minus right over the last 60 sessions: how much this gap normally moves. A threshold such as 70 does not change it, so
rsi(C, 14) > 30and> 70share one yardstick. - With r = |margin| ÷ scale, capped at 3, the belief is
0.5 + 0.45 × (1 − e−1.6r)when the margin is on the true side, and 1 minus that when it is not.
| Margin in scales | Belief if true | Belief if false |
|---|---|---|
| 0 (on the line) | 0.50 | 0.50 |
| 0.25 | 0.58 | 0.42 |
| 0.5 | 0.70 | 0.30 |
| 1 | 0.86 | 0.14 |
| 2 | 0.94 | 0.06 |
| 3 or more | 0.9463 | 0.0537 |
So a comparison never reaches 0 or 1: a threshold is a convention, and certainty about a convention would be the wrong kind of confident.
One threshold ladder on SPY
The same RSI against five lines, session of 2026-10-30. The belief slides smoothly instead of flipping:
| Rule | Belief |
|---|---|
rsi(C, 14) > 30 | 0.9145 |
rsi(C, 14) > 40 | 0.5358 |
rsi(C, 14) > 50 | 0.0919 |
rsi(C, 14) > 60 | 0.0537 |
rsi(C, 14) > 70 | 0.0537 |
and, or, not
a and b | The lower of the two beliefs. A rule that is only just satisfied stays only just satisfied. |
|---|---|
a or b | The higher of the two. |
not a | 1 minus the belief. |
On NVDA (2026-10-30):
| Question | Rule | Belief |
|---|---|---|
above_200d | C > sma(C,200) | 0.5455 |
rsi_up | rsi(C,14) > 50 | 0.073 |
both | C > sma(C,200) and rsi(C,14) > 50 | 0.073 |
either | C > sma(C,200) or rsi(C,14) > 50 | 0.5455 |
not_above | not (C > sma(C,200)) | 0.4545 |
Special cases
| Case | Belief | Example on SPY |
|---|---|---|
Exactly on the line (a tie, including >= and <=) | 0.50 | C >= max(C, 1) → 0.5 |
| Not enough history to compute a side | 0.50 | C > sma(C, 2000) → 0.5 |
A bare expression with no comparison (an event, between(), a pattern made only of events) | 0.95 or 0.05 | crossdown(C, sma(C, 20)) → 0.05 |
== | from about 0.10 (far apart) to 0.55 (equal) | On continuous prices prefer abs(a - b) < x |
!= | from 0.50 (equal) to about 0.95 | Rarely useful on prices |
A belief is not a probability
A forecast's 0.64 is the model's probability that an outcome happens. A rule's 0.64 is about a fact that has already been decided: the condition holds, and only a little past the line. Read rule beliefs as strength, and set lines accordingly: Reading beliefs and Choosing thresholds.
Information, not investment advice. Beliefs and probabilities on this page are real responses for the session shown and change with every session.