Ora
All guides All guides

Getting started

Your first decision in the Playground Call the API from your code Save, share and reuse queries

Financial decisions

Decide on a stock with just its symbol Write your own rule Read probabilities and choose thresholds

Rule playground

From English to rule Combining conditions Offsets and windows Reading beliefs Rules plus forecasts in one request Turning a rule into an alert or workflow

Automation

Send a Slack alert when a rule fires Send decisions to your own system Run a watchlist every day after the close

Production

Handle errors, rate limits and retries

Cookbooks

All cookbooks Rank a watchlist by probability Send a pre-open digest Trend filter plus entry trigger Breakout confirmation with volume RSI and Bollinger mean-reversion checks Gap-fill playbook to your order system Confidence-gated actions Detect two-way risk Size positions by volatility regime Risk guardrail before an order Ask many questions in one request Self-consistency: three wordings Route support tickets Is a headline relevant to a symbol?

Use cases

Tag financial news for trading signalsGuardrails for LLM appsSupport ticket triage and routingFilter retrieved passages before your LLM answersVerify claims and citations against a source

Guides / Cookbooks

Cookbooks · Signals: rules plus forecasts · Intermediate · about 8 min

Trend filter plus entry trigger

Only take long entries while price is above its 200-day average, and only when the forecast for the week leans up and the drawdown odds are not high.

  1. When to use it

    A trend filter is a fact about today ("is the close above the 200-day?"), and the rule engine answers it from the price history. The trigger is a forecast ("higher in a week?"), answered by the financial model. One request carries both, and one action fires only when they agree.

  2. The request

    trend sends the rule directly with ask. trend_en asks the same thing in English to show that it compiles to the same rule.

    {
      "model": "ora-fin1",
      "state": {
        "symbol": "QQQ"
      },
      "questions": {
        "trend": {
          "type": "yes_no",
          "ask": "C > sma(C,200)"
        },
        "trend_en": {
          "type": "yes_no",
          "instructions": "Is it above its 200-day moving average?"
        },
        "up_week": {
          "type": "yes_no",
          "instructions": "Will the stock be higher in a week?"
        },
        "drop5": {
          "type": "yes_no",
          "instructions": "Will it drop at least 5% at some point in the next month?"
        }
      },
      "actions": [
        {
          "id": "entry",
          "when": "trend >= 0.6 and up_week >= 0.55 and drop5 < 0.5",
          "do": "webhook",
          "connection": "my-oms",
          "body": {
            "symbol": "{{symbol}}",
            "signal": "trend_entry",
            "p_trend": "{{trend}}",
            "p_up_week": "{{up_week}}",
            "p_drop5": "{{drop5}}",
            "as_of": "{{as_of}}"
          }
        }
      ],
      "dry_run": true
    }
    Open this in the Playground
  3. The real response

    QQQ:

    {
      "model": "ora-fin1",
      "answers": {
        "trend": {
          "type": "yes_no",
          "yes_no": 0.7987,
          "rule": "C > sma(C,200)",
          "basis": "rule"
        },
        "trend_en": {
          "type": "yes_no",
          "yes_no": 0.7987,
          "rule": "C > sma(C, 200)",
          "basis": "comparison",
          "explain": "today's close > sma200"
        },
        "up_week": {
          "type": "yes_no",
          "yes_no": 0.561
        },
        "drop5": {
          "type": "yes_no",
          "yes_no": 0.443
        }
      },
      "usage": {
        "input_tokens": 387,
        "output_tokens": 16
      },
      "context": {
        "source": "server",
        "symbol": "QQQ",
        "as_of": "2026-10-30"
      },
      "version": "ora-fin-0.1.1",
      "actions": [
        {
          "id": "entry",
          "fired": true,
          "status": "dry_run",
          "do": "webhook",
          "connection": "my-oms",
          "preview": {
            "body": {
              "symbol": "QQQ",
              "signal": "trend_entry",
              "p_trend": 0.7987,
              "p_up_week": 0.561,
              "p_drop5": 0.443,
              "as_of": "2026-10-30"
            }
          }
        }
      ]
    }

    Both trend questions carry "rule": "C > sma(C,200)" and the same belief, 0.7987; the English one adds "explain". With up_week at 0.561 and drop5 at 0.443, the entry action fired and shows the exact webhook body it would send.

    The same request for IWM: trend 0.5564, up_week 0.526, drop5 0.234. The action was skipped: a trend belief that close to 0.5 means the close is only just above its 200-day line, so it does not clear trend >= 0.6.

  4. The code

    Requires curl 7.76+. Save as run.sh, then: bash run.sh
    curl -sS https://oramodel.com/v1/systemone \
      -H "Authorization: Bearer $JEV_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "ora-fin1",
      "state": {
        "symbol": "QQQ"
      },
      "questions": {
        "trend": {
          "type": "yes_no",
          "ask": "C > sma(C,200)"
        },
        "trend_en": {
          "type": "yes_no",
          "instructions": "Is it above its 200-day moving average?"
        },
        "up_week": {
          "type": "yes_no",
          "instructions": "Will the stock be higher in a week?"
        },
        "drop5": {
          "type": "yes_no",
          "instructions": "Will it drop at least 5% at some point in the next month?"
        }
      },
      "actions": [
        {
          "id": "entry",
          "when": "trend >= 0.6 and up_week >= 0.55 and drop5 < 0.5",
          "do": "webhook",
          "connection": "my-oms",
          "body": {
            "symbol": "{{symbol}}",
            "signal": "trend_entry",
            "p_trend": "{{trend}}",
            "p_up_week": "{{up_week}}",
            "p_drop5": "{{drop5}}",
            "as_of": "{{as_of}}"
          }
        }
      ],
      "dry_run": true
    }'
  5. Act on it

    The action delivers a signed JSON body to your order system; the receiving side is in Send decisions to your own system. If you prefer to decide in your code, drop actions and compare the same numbers:

    a = {k: v["yes_no"] for k, v in data["answers"].items()}
    if a["trend"] >= 0.6 and a["up_week"] >= 0.55 and a["drop5"] < 0.5:
        submit_entry(symbol)
  6. Variations

    • A faster filter: C > sma(C,50), or a crossover: sma(C,20) > sma(C,50).
    • An exit rule in the same request: {"type": "yes_no", "ask": "C < sma(C,200)"}.
    • Many more ready-made entry and exit pairs are under Examples → Strategies; the grammar is in Rule language.

Information, not investment advice. Every number on this page is a real response for the session shown; answers change with each session.

What's next

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