Ora
All documentation

Docs / Questions & answers

bool

A plain true or false from the exact reading of a condition on the latest session. Use it when your code wants a yes or a no rather than a belief.

{
  "state": {
    "symbol": "NVDA",
    "stop": 150
  },
  "questions": {
    "above_stop": {
      "type": "bool",
      "ask": "=C > stop"
    }
  }
}

Real answers, on a set of 25 bars:

{
  "unk": {
    "type": "bool",
    "bool": null,
    "rule": "C > sma(C, 200)",
    "basis": "rule",
    "as_of": "2026-01-25",
    "reason": "\"C > sma(C, 200)\" has no value yet: not enough history to compute it."
  },
  "known": {
    "type": "bool",
    "bool": true,
    "rule": "C > sma(C, 5)",
    "basis": "rule",
    "as_of": "2026-01-25"
  },
  "or_t": {
    "type": "bool",
    "bool": true,
    "rule": "C > sma(C, 200) or C > 0",
    "basis": "rule",
    "as_of": "2026-01-25"
  }
}

A condition that can't be known has "bool": null and a reason, and never false: too little history, a fact that isn't out, a division by zero. and is false as soon as one side is false, and or is true as soon as one side is true, so a known side still decides.

In an action rule, a bool is a condition by itself: "when": "above_stop". A null fires neither above_stop nor not above_stop.

It needs a condition: a number is a 422 saying to add a comparison. It runs on ora-fin, on a symbol or your own bars; it isn't available on the pinned version ora-fin-0.1.1.

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