Ora
All documentation Overview

Get started

IntroductionQuickstartHow ora-fin1 decidesHow to build with OraUse-case map

Rule language

OverviewGrammarOperators and beliefsPrices and offsetsWindowsIndicatorsSignals and eventsPattern functionsFunction referenceRule libraryCommon mistakesError messagesEarnings and dividend facts

Questions & answers

Questionsyes_no (noul)choicescoreConfidenceThresholds and calibrationStateAsk by symbol

Patterns

Patterns

Actions & workflows

OverviewRules and templatesDestinationsWebhooks and signaturesWorkflows

API reference

POST /v1/systemoneGET /v1/models

Errors & limits

ErrorsRate limitsKnown limitations

Pricing

Pricing

Resources

FAQChangelogModels & versionsCode in 8 languages

Docs / Rule language

Rule language

Signals and events

A state is something that is true for a while (above the 50-day). An event happens on one bar (crossed above the 50-day today). Signal functions turn one into the other.

Events answer 0.95 or 0.05crossup(C, sma(C, 50)) on its own is 1 or 0, with no margin to measure, so its belief is 0.95 on the day it happens and 0.05 every other day. The same holds for between() on its own.
Graded insteadIf you want "how far above", compare: C > sma(C, 50). To require a recent cross and a margin, combine them: barssince(crossup(C, sma(C, 50))) <= 5 and C > sma(C, 50).
Agesbarssince(cond) is 0 on a bar where the condition holds and counts up after. It is unknown (0.50) until the condition has been true once.

Signal functions

crossup(a, b)

1 on the bar where a crosses above b (it was at or below b on the bar before), 0 otherwise. As a whole rule it answers 0.95 or 0.05.

Examplecrossup(C, sma(C, 50))Crossed above the 50-day today.
Belief, 2026-10-30SPY 0.05NVDA 0.05TSLA 0.05XLE 0.05Try it
crossdown(a, b)

1 on the bar where a crosses below b.

Examplecrossdown(sma(C, 20), sma(C, 50))The 20-day crossed under the 50-day today.
Belief, 2026-10-30SPY 0.05NVDA 0.95TSLA 0.05XLE 0.05Try it
barssince(cond)

Bars since a condition was last true (0 = true on this bar). Not known until it has been true once.

Examplebarssince(C > highest(C, 20)) > 30More than 30 sessions since the last 20-day closing breakout.
Belief, 2026-10-30SPY 0.0797NVDA 0.0637TSLA 0.0578XLE 0.0537Try it

Maths and logic helpers

abs(x)

Absolute value.

Exampleabs(C / C[-1] - 1) > 0.02Moved more than 2% either way today.
Belief, 2026-10-30SPY 0.2193NVDA 0.9106TSLA 0.1973XLE 0.4331Try it
sqrt(x)

Square root (negative input is not a number).

Examplestd(log(C / C[-1]), 20) * sqrt(252) > 0.4Annualized 20-day volatility above 40%.
Belief, 2026-10-30SPY 0.0537NVDA 0.1389TSLA 0.2867XLE 0.0537Try it
log(x)

Natural logarithm (zero or negative input is not a number).

Examplelog(C / C[-20]) > 0.05A 20-session log return above 5%.
Belief, 2026-10-30SPY 0.0537NVDA 0.0537TSLA 0.6655XLE 0.89Try it
sign(x)

−1, 0 or 1.

Examplesum(sign(C - C[-1]), 10) > 2More up days than down days over ten sessions, by at least three.
Belief, 2026-10-30SPY 0.5NVDA 0.1194TSLA 0.1318XLE 0.8416Try it
iif(cond, a, b)

a where the condition holds, b otherwise. Use it to switch a threshold by regime.

Examplersi(C, 14) < iif(C > sma(C, 200), 40, 30)Oversold, with a looser line (40) in an uptrend and a stricter one (30) below the 200-day.
Belief, 2026-10-30SPY 0.4642NVDA 0.7816TSLA 0.0537XLE 0.0537Try it
ref(x, -n)

Any series n bars back: the offset for things that are not a price letter.

Examplesma(C, 50) > ref(sma(C, 50), -10)The 50-day average is higher than ten sessions ago: rising.
Belief, 2026-10-30SPY 0.2481NVDA 0.2352TSLA 0.8547XLE 0.9395Try it
between(x, a, b)

1 when x is inside [a, b] (inclusive, either order), else 0.

Examplebetween(rsi(C, 14), 40, 60)RSI in the neutral band. As a whole rule it answers 0.95 or 0.05.
Belief, 2026-10-30SPY 0.95NVDA 0.05TSLA 0.05XLE 0.05Try it
least(a, b)

The smaller of two series, bar by bar.

Exampleleast(O, C) - L > 2 * abs(C - O)A long lower wick: twice the body.
Belief, 2026-10-30SPY 0.0941NVDA 0.1245TSLA 0.1878XLE 0.179Try it
greatest(a, b)

The larger of two series, bar by bar.

ExampleH - greatest(O, C) > 2 * abs(C - O)A long upper wick: twice the body.
Belief, 2026-10-30SPY 0.0564NVDA 0.0714TSLA 0.1727XLE 0.1666Try it

Recursion

rec(seed, step)

A series built from its own previous value: inside step, self is the previous bar's result (seed before the first bar). Only arithmetic, comparisons and abs/sqrt/log/sign/iif/least/greatest/between may touch self.

ExampleC > rec(C, self + 0.1 * (C - self))Above a home-made exponential average (smoothing 0.1).
Belief, 2026-10-30SPY 0.0786NVDA 0.0737TSLA 0.9187XLE 0.9249Try it

Information, not investment advice. Beliefs and probabilities on this page are real responses for the session shown and change with every session.

Create an account Open the Playground Everything here also lives in the console, next to your keys and usage.