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

Prices and offsets

O H L C V are the open, high, low, close and volume of the latest completed daily session. An offset in brackets walks back: C[-1] is yesterday's close.

The barThe latest completed session (refreshed after each close). During the trading day, rules see the previous session; a still-forming bar is never used.
HistoryAbout 1,500 daily sessions per symbol, adjusted for splits.
OffsetsNegative numbers look back: H[-2] is the high two sessions ago. A positive offset looks forward, and there is no next bar, so it answers 0.50.
Beyond price lettersUse ref(x, -n): ref(sma(C, 20), -5) is the 20-day average a week ago.

Offsets on XLE

Session of 2026-10-30:

RuleBelief
C > C[-1]0.9085
C[-1] > C[-2]0.6708
C > ref(C, -1)0.9085
C > C[-5]0.7066
C > C[1]0.5
sma(C, 20) > ref(sma(C, 20), -5)0.9425

C > C[-1] and C > ref(C, -1) are the same rule. C > C[1] sits on 0.50 because tomorrow does not exist yet.

Price functions

O H L C V

Open, high, low, close and volume of the bar being evaluated: the latest completed daily session. Prices are split- and dividend-adjusted.

ExampleC > OA green day. Every rule is about the latest bar unless you look back with an offset.
Belief, 2026-10-30SPY 0.0736NVDA 0.1024TSLA 0.8513XLE 0.801Try it
C[-n] H[-n] L[-n] O[-n] V[-n]

The same value n bars back. C[-1] is yesterday's close, H[-2] the high two sessions ago. Offsets work on the five price letters only; for anything else use ref().

ExampleC > C[-5]Higher than a week (five sessions) ago. A positive offset such as C[1] looks forward: there is no next bar, so it reads as "not known" (0.50).
Belief, 2026-10-30SPY 0.2586NVDA 0.2069TSLA 0.9265XLE 0.7066Try it
hl2()

The middle of the bar: (H + L) / 2.

ExampleC > hl2()Closed in the upper half of the day's range.
Belief, 2026-10-30SPY 0.4149NVDA 0.3742TSLA 0.8711XLE 0.8314Try it
hlc3()

The typical price: (H + L + C) / 3.

Examplehlc3() > sma(hlc3(), 20)Typical price above its own 20-day average.
Belief, 2026-10-30SPY 0.0824NVDA 0.0713TSLA 0.907XLE 0.9091Try it
ohlc4()

The average of the four prices: (O + H + L + C) / 4.

Exampleohlc4() > sma(C, 10)The day's average price is above the 10-day average close.
Belief, 2026-10-30SPY 0.0939NVDA 0.1115TSLA 0.8412XLE 0.8436Try it
tr()

True range: the bar's high minus low, extended to include a gap from the previous close.

Exampletr() > 1.5 * ref(atr(14), -1)Today's true range is half again yesterday's ATR: a wide day.
Belief, 2026-10-30SPY 0.943NVDA 0.8962TSLA 0.2396XLE 0.1049Try 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.