Use cases · Builders
Quant developer: 20 ways to use Ora
Wires exact rules and forecasts into pipelines, tests and order systems. Each example is a complete, runnable request with the real answers it returned (32 requests, captured 2026-10-31), what they mean and, where it fits, the action it would send.
ora-fin-0.1.1. Another model changes the request JSON and the Playground link; run it there to see its answers.Rule functions and facts used by this player (64)
sma 8ref 7offset 6avg 5ema 3abs 3atr 3crossup 2wma 2adx 2highest 2log 2sqrt 2std 2zscore 2rsi 2sum 2mean 2crossdown 1diminus 1diplus 1linreg 1median 1gap_down 1gap_up 1inside_bar 1marubozu 1outside_bar 1spinning_top 1cum 1rec 1rma 1macd 1macdsignal 1cci 1stochd 1stochk 1willr 1days_since_earnings 1days_to_earnings 1last_earnings_move 1next_report_amc 1barssince 1highestbars 1lowestbars 1bblower 1between 1iif 1sign 1greatest 1hammer 1hanging_man 1inverted_hammer 1least 1hl2 1hlc3 1ohlc4 1tr 1swinghigh 1swinglow 1lowest 1max 1obv 1percentrank 1
Examples 11–20 of 20 · page 2 of 2
Quant developer · example 11
Volatility-targeting inputs for TLT position sizing
Get realized-volatility states and the forward volatility forecast for a bond ETF before resizing a vol-targeted sleeve.
- StateTLT
- Questions5 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"TLT"} The server fills in the latest completed session.
Questions
hv | rule | std(log(C / C[-1]), 20) * sqrt(252) > 0.1520-day realized volatility above 15% a year |
atr_up | rule | atr(14) > 1.2 * ref(atr(14), -10)ATR up 20% in two weeks |
vol5 | English → rule | Is 5-day volatility higher than 20-day volatility? |
vol_up | forecast | Will volatility be higher over the next month? Higher volatility next month |
hv30 | forecast | Will annualized volatility over the next 21 sessions exceed 30%? Next-month volatility above 30% |
Answers
| Question | Answer | Reading |
|---|---|---|
hv20-day realized volatility above 15% a year | 0.0537 | false |
atr_upATR up 20% in two weeks | 0.0537 | false |
vol5Is 5-day volatility higher than 20-day volatility compiled to std(log(C / C[-1]), 5) * sqrt(5 / 4) > std(log(C / C[-1]), 20) * sqrt(20 / 19) | 0.2703 | false |
vol_upHigher volatility next month | 0.583 | 58% · close to even |
hv30Next-month volatility above 30% | 0.497 | 50% · close to even |
Actions
Rules on the answers decide what to send.
vol_up >= 0.6 or hv >= 0.6→Slackquant-devWhat it means
For TLT on the session of 2026-10-30: Not true: 20-day realized volatility above 15% a year; ATR up 20% in two weeks; Is 5-day volatility higher than 20-day volatility. Forecasts: Higher volatility next month 58%; Next-month volatility above 30% 50%. No action fired: every rule was false.
Sizing code reads the realized rule for today and the forecast for the month; the Slack note tells the developer on call that a resize will run.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "TLT"
},
"questions": {
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.15"
},
"atr_up": {
"type": "yes_no",
"ask": "atr(14) > 1.2 * ref(atr(14), -10)"
},
"vol5": {
"type": "yes_no",
"instructions": "Is 5-day volatility higher than 20-day volatility?"
},
"vol_up": {
"type": "yes_no",
"instructions": "Will volatility be higher over the next month?"
},
"hv30": {
"type": "yes_no",
"instructions": "Will annualized volatility over the next 21 sessions exceed 30%?"
}
},
"actions": [
{
"id": "resize",
"when": "vol_up >= 0.6 or hv >= 0.6",
"do": "slack",
"connection": "quant-dev",
"message": "{{symbol}} ({{as_of}}): vol-target sleeve needs a resize check. Realized vol above 15% {{hv|pct}}, higher vol next month {{vol_up|pct}}."
}
],
"dry_run": true
}Response JSON (TLT, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"hv": {
"yes_no": 0.0537,
"rule": "std(log(C / C[-1]), 20) * sqrt(252) > 0.15",
"basis": "rule"
},
"atr_up": {
"yes_no": 0.0537,
"rule": "atr(14) > 1.2 * ref(atr(14), -10)",
"basis": "rule"
},
"vol5": {
"yes_no": 0.2703,
"rule": "std(log(C / C[-1]), 5) * sqrt(5 / 4) > std(log(C / C[-1]), 20) * sqrt(20 / 19)",
"basis": "pattern"
},
"vol_up": {
"yes_no": 0.583
},
"hv30": {
"yes_no": 0.497
}
},
"context": {
"symbol": "TLT",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "resize",
"fired": false,
"status": "skipped"
}
]
}Quant developer · example 12
Mean-reversion candidates across consumer staples
Find staples trading below their lower band or with a negative z-score, inside a long uptrend.
- State5 symbols
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"PG"} then KO, PEP, CL, KMB, one request each. The server fills in the latest completed session.
Questions
band | rule | C < bblower(C, 20, 2)Closed under the lower Bollinger band |
zs | rule | zscore(C, 20) < -2Two deviations under the 20-day mean |
trend | English → rule | Is the stock above its 200-day moving average? |
back_inside | rule | crossup(C, bblower(C, 20, 2))Crossed back above the lower band |
up_week | forecast | Will the stock be higher in a week? Higher in a week |
Answers
| Symbol | bandrule | zsrule | trendrule | back_insiderule | up_weekforecast |
|---|---|---|---|---|---|
PG | 0.0573 | 0.0586 | 0.9431 | 0.05 | 0.485 |
KO | 0.0568 | 0.0585 | 0.9463 | 0.05 | 0.549 |
PEP | 0.0537 | 0.0585 | 0.1034 | 0.05 | 0.505 |
CL | 0.0601 | 0.0629 | 0.9337 | 0.05 | 0.513 |
KMB | 0.0588 | 0.0712 | 0.8926 | 0.05 | 0.528 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 5 symbols: Closed under the lower Bollinger band: true for none of 5. Two deviations under the 20-day mean: true for none of 5. Is the stock above its 200-day moving average: true for PG, KO, CL, KMB of 5. Crossed back above the lower band: true for none of 5. Highest odds for “Higher in a week”: KO at 55%.
The batch returns the same keys for every name; a candidate needs a band or z-score rule true while the long trend holds.
Request JSON (PG; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "PG"
},
"questions": {
"band": {
"type": "yes_no",
"ask": "C < bblower(C, 20, 2)"
},
"zs": {
"type": "yes_no",
"ask": "zscore(C, 20) < -2"
},
"trend": {
"type": "yes_no",
"instructions": "Is the stock above its 200-day moving average?"
},
"back_inside": {
"type": "yes_no",
"ask": "crossup(C, bblower(C, 20, 2))"
},
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
}
}
}Response JSON (PG, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"band": {
"yes_no": 0.0573,
"rule": "C < bblower(C, 20, 2)",
"basis": "rule"
},
"zs": {
"yes_no": 0.0586,
"rule": "zscore(C, 20) < -2",
"basis": "rule"
},
"trend": {
"yes_no": 0.9431,
"rule": "C > sma(C, 200)",
"basis": "comparison"
},
"back_inside": {
"yes_no": 0.05,
"rule": "crossup(C, bblower(C, 20, 2))",
"basis": "rule"
},
"up_week": {
"yes_no": 0.485
}
},
"context": {
"symbol": "PG",
"as_of": "2026-10-30"
}
}Quant developer · example 13
Adaptive RSI thresholds for JPM with iif and between
Use a regime-dependent oversold line and a neutral band check instead of hard-coding one threshold.
- StateJPM
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"JPM"} The server fills in the latest completed session.
Questions
adaptive | rule | rsi(C, 14) < iif(C > sma(C, 200), 40, 30)RSI under 40 in an uptrend, under 30 otherwise |
neutral | rule | between(rsi(C, 14), 40, 60)RSI between 40 and 60 |
sign_run | rule | sum(sign(C - C[-1]), 10) > 2net up days over the last 10 sessions above 2 |
up_week | forecast | Will the stock be higher in a week? Higher in a week |
Answers
| Question | Answer | Reading |
|---|---|---|
adaptiveRSI under 40 in an uptrend, under 30 otherwise | 0.1428 | false |
neutralRSI between 40 and 60 | 0.95 | true |
sign_runnet up days over the last 10 sessions above 2 | 0.45 | on the line (false) |
up_weekHigher in a week | 0.558 | 56% · close to even |
What it means
For JPM on the session of 2026-10-30: True now: RSI between 40 and 60. Not true: RSI under 40 in an uptrend, under 30 otherwise. On the line: net up days over the last 10 sessions above 2. Forecasts: Higher in a week 56%.
The adaptive rule encodes the regime once in the rule text, so the pipeline does not need its own branching.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "JPM"
},
"questions": {
"adaptive": {
"type": "yes_no",
"ask": "rsi(C, 14) < iif(C > sma(C, 200), 40, 30)"
},
"neutral": {
"type": "yes_no",
"ask": "between(rsi(C, 14), 40, 60)"
},
"sign_run": {
"type": "yes_no",
"ask": "sum(sign(C - C[-1]), 10) > 2"
},
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
}
}
}Response JSON (JPM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"adaptive": {
"yes_no": 0.1428,
"rule": "rsi(C, 14) < iif(C > sma(C, 200), 40, 30)",
"basis": "rule"
},
"neutral": {
"yes_no": 0.95,
"rule": "between(rsi(C, 14), 40, 60)",
"basis": "rule"
},
"sign_run": {
"yes_no": 0.45,
"rule": "sum(sign(C - C[-1]), 10) > 2",
"basis": "rule"
},
"up_week": {
"yes_no": 0.558
}
},
"context": {
"symbol": "JPM",
"as_of": "2026-10-30"
}
}Quant developer · example 14
Wick geometry on XOM with least and greatest
Compute long-lower-wick and long-upper-wick conditions directly, then compare with the named candle patterns.
- StateXOM
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"XOM"} The server fills in the latest completed session.
Questions
long_lower | rule | least(O, C) - L > 2 * abs(C - O)lower wick more than twice the body |
long_upper | rule | H - greatest(O, C) > 2 * abs(C - O)upper wick more than twice the body |
hammer | rule | hammer()hammer candle: Lower wick at least twice the body, upper wick at most 10% of the range, closing below the close five bars back. |
hanging | rule | hanging_man()hanging man candle: Hammer shape, closing above the close five bars back. |
inv_hammer | rule | inverted_hammer()inverted hammer candle: Shooting-star shape after a five-bar decline. |
Answers
| Question | Answer | Reading |
|---|---|---|
long_lowerlower wick more than twice the body | 0.2621 | false |
long_upperupper wick more than twice the body | 0.2569 | false |
hammerhammer candle: Lower wick at least twice the body, upper wick at most 10% of the range, closing below the close five bars back. | 0.0971 | false |
hanginghanging man candle: Hammer shape, closing above the close five bars back. | 0.0971 | false |
inv_hammerinverted hammer candle: Shooting-star shape after a five-bar decline. | 0.1089 | false |
What it means
For XOM on the session of 2026-10-30: Not true: lower wick more than twice the body; upper wick more than twice the body; hammer candle: Lower wick at least twice the body, upper wick at most 10% of the range, closing below the close five bars back.; hanging man candle: Hammer shape, closing above the close five bars back.; inverted hammer candle: Shooting-star shape after a five-bar decline..
The raw wick rules are shape only; the named patterns add the prior-trend condition, which explains when the two disagree.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "XOM"
},
"questions": {
"long_lower": {
"type": "yes_no",
"ask": "least(O, C) - L > 2 * abs(C - O)"
},
"long_upper": {
"type": "yes_no",
"ask": "H - greatest(O, C) > 2 * abs(C - O)"
},
"hammer": {
"type": "yes_no",
"ask": "hammer()"
},
"hanging": {
"type": "yes_no",
"ask": "hanging_man()"
},
"inv_hammer": {
"type": "yes_no",
"ask": "inverted_hammer()"
}
}
}Response JSON (XOM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"long_lower": {
"yes_no": 0.2621,
"rule": "least(O, C) - L > 2 * abs(C - O)",
"basis": "rule"
},
"long_upper": {
"yes_no": 0.2569,
"rule": "H - greatest(O, C) > 2 * abs(C - O)",
"basis": "rule"
},
"hammer": {
"yes_no": 0.0971,
"rule": "hammer()",
"basis": "rule"
},
"hanging": {
"yes_no": 0.0971,
"rule": "hanging_man()",
"basis": "rule"
},
"inv_hammer": {
"yes_no": 0.1089,
"rule": "inverted_hammer()",
"basis": "rule"
}
},
"context": {
"symbol": "XOM",
"as_of": "2026-10-30"
}
}Quant developer · example 15
Typical-price and midpoint checks on IWM
Validate derived price series (hl2, hlc3, ohlc4, true range) used in a feature store.
- StateIWM
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"IWM"} The server fills in the latest completed session.
Questions
upper_half | rule | C > hl2()closed in the upper half of the day's range |
typical | rule | hlc3() > sma(hlc3(), 20)typical price above its 20-day average |
ohlc | rule | ohlc4() > sma(C, 10)average of the four prices above the 10-day average close |
wide | rule | tr() > 1.5 * ref(atr(14), -1)True range 1.5× yesterday's ATR |
mean100 | rule | C > mean(C, 100)close above its 100-day mean |
Answers
| Question | Answer | Reading |
|---|---|---|
upper_halfclosed in the upper half of the day's range | 0.2555 | false |
typicaltypical price above its 20-day average | 0.7406 | true |
ohlcaverage of the four prices above the 10-day average close | 0.8215 | true |
wideTrue range 1.5× yesterday's ATR | 0.8915 | true |
mean100close above its 100-day mean | 0.1618 | false |
What it means
For IWM on the session of 2026-10-30: True now: typical price above its 20-day average; average of the four prices above the 10-day average close; True range 1.5× yesterday's ATR. Not true: closed in the upper half of the day's range; close above its 100-day mean.
These are deterministic checks; any mismatch with the feature store is a bug in one of the two, never a model judgment.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "IWM"
},
"questions": {
"upper_half": {
"type": "yes_no",
"ask": "C > hl2()"
},
"typical": {
"type": "yes_no",
"ask": "hlc3() > sma(hlc3(), 20)"
},
"ohlc": {
"type": "yes_no",
"ask": "ohlc4() > sma(C, 10)"
},
"wide": {
"type": "yes_no",
"ask": "tr() > 1.5 * ref(atr(14), -1)"
},
"mean100": {
"type": "yes_no",
"ask": "C > mean(C, 100)"
}
}
}Response JSON (IWM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"upper_half": {
"yes_no": 0.2555,
"rule": "C > hl2()",
"basis": "rule"
},
"typical": {
"yes_no": 0.7406,
"rule": "hlc3() > sma(hlc3(), 20)",
"basis": "rule"
},
"ohlc": {
"yes_no": 0.8215,
"rule": "ohlc4() > sma(C, 10)",
"basis": "rule"
},
"wide": {
"yes_no": 0.8915,
"rule": "tr() > 1.5 * ref(atr(14), -1)",
"basis": "rule"
},
"mean100": {
"yes_no": 0.1618,
"rule": "C > mean(C, 100)",
"basis": "rule"
}
},
"context": {
"symbol": "IWM",
"as_of": "2026-10-30"
}
}Quant developer · example 16
Swing-structure features for CVX with swinghigh and swinglow
Encode the last two swing highs and lows as structure features for a trend-following model.
- StateCVX
- Questions5 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"CVX"} The server fills in the latest completed session.
Questions
hh | rule | swinghigh(3, 1) > swinghigh(3, 2)latest 3-bar swing high above the one before |
hl | rule | swinglow(3) > swinglow(3, 2)Higher swing lows |
above_sh | rule | C > swinghigh(5)Above its last confirmed swing high |
near_sup | rule | C >= swinglow(5) and C <= 1.03 * swinglow(5)Within 3% above the last swing low |
break_res | forecast | Will it break above resistance this week? Breaking resistance this week |
Answers
| Question | Answer | Reading |
|---|---|---|
hhlatest 3-bar swing high above the one before | 0.9416 | true |
hlHigher swing lows | 0.4316 | on the line (false) |
above_shAbove its last confirmed swing high | 0.9333 | true |
near_supWithin 3% above the last swing low | 0.0537 | false |
break_resBreaking resistance this week | 0.503 | 50% · close to even |
Actions
Rules on the answers decide what to send.
hh >= 0.6 and hl >= 0.6→Webhookfeature-storeelse→Webhookfeature-store{
"entity": "CVX",
"as_of": "2026-10-30",
"structure": "none"
}What it means
For CVX on the session of 2026-10-30: True now: latest 3-bar swing high above the one before; Above its last confirmed swing high. Not true: Within 3% above the last swing low. On the line: Higher swing lows. Forecasts: Breaking resistance this week 50%. Fired: no_structure (Webhook → feature-store).
Swing pivots are confirmed bars later, so these features never look ahead; that is what makes them safe to train on.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "CVX"
},
"questions": {
"hh": {
"type": "yes_no",
"ask": "swinghigh(3, 1) > swinghigh(3, 2)"
},
"hl": {
"type": "yes_no",
"ask": "swinglow(3) > swinglow(3, 2)"
},
"above_sh": {
"type": "yes_no",
"ask": "C > swinghigh(5)"
},
"near_sup": {
"type": "yes_no",
"ask": "C >= swinglow(5) and C <= 1.03 * swinglow(5)"
},
"break_res": {
"type": "yes_no",
"instructions": "Will it break above resistance this week?"
}
},
"actions": [
{
"id": "structure",
"when": "hh >= 0.6 and hl >= 0.6",
"do": "webhook",
"connection": "feature-store",
"body": {
"entity": "{{symbol}}",
"as_of": "{{as_of}}",
"structure": "uptrend",
"p_break_res": "{{break_res}}"
}
},
{
"id": "no_structure",
"when": "else",
"do": "webhook",
"connection": "feature-store",
"body": {
"entity": "{{symbol}}",
"as_of": "{{as_of}}",
"structure": "none"
}
}
],
"dry_run": true
}Response JSON (CVX, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"hh": {
"yes_no": 0.9416,
"rule": "swinghigh(3, 1) > swinghigh(3, 2)",
"basis": "rule"
},
"hl": {
"yes_no": 0.4316,
"rule": "swinglow(3) > swinglow(3, 2)",
"basis": "rule"
},
"above_sh": {
"yes_no": 0.9333,
"rule": "C > swinghigh(5)",
"basis": "rule"
},
"near_sup": {
"yes_no": 0.0537,
"rule": "C >= swinglow(5) and C <= 1.03 * swinglow(5)",
"basis": "rule"
},
"break_res": {
"yes_no": 0.503
}
},
"context": {
"symbol": "CVX",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "structure",
"fired": false,
"status": "skipped"
},
{
"id": "no_structure",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "feature-store",
"preview": {
"body": {
"entity": "CVX",
"as_of": "2026-10-30",
"structure": "none"
}
}
}
]
}Quant developer · example 17
Route a DIS drawdown signal to Slack, else to a heartbeat webhook
Wire a monitoring pattern: a real signal goes to people, every other run goes to a heartbeat endpoint so the job is known to be alive.
- StateDIS
- Questions3 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"DIS"} The server fills in the latest completed session.
Questions
dd | rule | C < 0.8 * max(H, 252)More than 20% off the 52-week high |
breakdown | rule | C < lowest(L, 20)Closed under the 20-day low |
drop10 | forecast | Will it drop at least 10% at some point in the next month? A 10% drawdown within a month |
Answers
| Question | Answer | Reading |
|---|---|---|
ddMore than 20% off the 52-week high | 0.0537 | false |
breakdownClosed under the 20-day low | 0.0659 | false |
drop10A 10% drawdown within a month | 0.328 | 33% · unlikely |
Actions
Rules on the answers decide what to send.
dd >= 0.6 and drop10 >= 0.4→Slackquant-alertselse→Webhookheartbeat{
"job": "dd_monitor",
"symbol": "DIS",
"ok": true,
"as_of": "2026-10-30"
}What it means
For DIS on the session of 2026-10-30: Not true: More than 20% off the 52-week high; Closed under the 20-day low. Forecasts: A 10% drawdown within a month 33%. Fired: heartbeat (Webhook → heartbeat).
Exactly one branch fires per run: a page when both conditions hold, a heartbeat otherwise, so a missing heartbeat means the job failed.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "DIS"
},
"questions": {
"dd": {
"type": "yes_no",
"ask": "C < 0.8 * max(H, 252)"
},
"breakdown": {
"type": "yes_no",
"ask": "C < lowest(L, 20)"
},
"drop10": {
"type": "yes_no",
"instructions": "Will it drop at least 10% at some point in the next month?"
}
},
"actions": [
{
"id": "page",
"when": "dd >= 0.6 and drop10 >= 0.4",
"do": "slack",
"connection": "quant-alerts",
"message": "{{symbol}} ({{as_of}}): 20% under its 52-week high ({{dd|pct}}) with {{drop10|pct}} odds of another 10% drop."
},
{
"id": "heartbeat",
"when": "else",
"do": "webhook",
"connection": "heartbeat",
"body": {
"job": "dd_monitor",
"symbol": "{{symbol}}",
"ok": true,
"as_of": "{{as_of}}"
}
}
],
"dry_run": true
}Response JSON (DIS, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"dd": {
"yes_no": 0.0537,
"rule": "C < 0.8 * max(H, 252)",
"basis": "rule"
},
"breakdown": {
"yes_no": 0.0659,
"rule": "C < lowest(L, 20)",
"basis": "rule"
},
"drop10": {
"yes_no": 0.328
}
},
"context": {
"symbol": "DIS",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "page",
"fired": false,
"status": "skipped"
},
{
"id": "heartbeat",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "heartbeat",
"preview": {
"body": {
"job": "dd_monitor",
"symbol": "DIS",
"ok": true,
"as_of": "2026-10-30"
}
}
}
]
}Quant developer · example 18
Moving-average family consistency on HD: sma, avg and mean
Confirm that aliases agree and that weighted and exponential averages order the way the strategy assumes.
- StateHD
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"HD"} The server fills in the latest completed session.
Questions
sma | rule | C > sma(C, 50)close above sma(C, 50) |
avg | rule | C > avg(C, 50)close above avg(C, 50) |
mean | rule | C > mean(C, 50)close above mean(C, 50) |
fast_slow | rule | ema(C, 12) > wma(C, 26)12-day EMA above the 26-day weighted average |
Answers
| Question | Answer | Reading |
|---|---|---|
smaclose above sma(C, 50) | 0.8804 | true |
avgclose above avg(C, 50) | 0.8804 | true |
meanclose above mean(C, 50) | 0.8804 | true |
fast_slow12-day EMA above the 26-day weighted average | 0.9152 | true |
What it means
For HD on the session of 2026-10-30: True now: close above sma(C, 50); close above avg(C, 50); close above mean(C, 50); 12-day EMA above the 26-day weighted average.
The first three are the same rule under three names and must agree; if they do not, the request was malformed.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "HD"
},
"questions": {
"sma": {
"type": "yes_no",
"ask": "C > sma(C, 50)"
},
"avg": {
"type": "yes_no",
"ask": "C > avg(C, 50)"
},
"mean": {
"type": "yes_no",
"ask": "C > mean(C, 50)"
},
"fast_slow": {
"type": "yes_no",
"ask": "ema(C, 12) > wma(C, 26)"
}
}
}Response JSON (HD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"sma": {
"yes_no": 0.8804,
"rule": "C > sma(C, 50)",
"basis": "rule"
},
"avg": {
"yes_no": 0.8804,
"rule": "C > avg(C, 50)",
"basis": "rule"
},
"mean": {
"yes_no": 0.8804,
"rule": "C > mean(C, 50)",
"basis": "rule"
},
"fast_slow": {
"yes_no": 0.9152,
"rule": "ema(C, 12) > wma(C, 26)",
"basis": "rule"
}
},
"context": {
"symbol": "HD",
"as_of": "2026-10-30"
}
}Quant developer · example 19
Volume percentile and OBV trend features for MU
Rank today's volume within its recent history and check accumulation, as inputs to a breakout classifier.
- StateMU
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"MU"} The server fills in the latest completed session.
Questions
vol_rank | rule | percentrank(V, 50) > 90Volume in the top tenth of 50 sessions |
obv | rule | obv() > sma(obv(), 20)On-balance volume above its 20-day average |
obv_en | English → rule | Is on-balance volume higher than 20 sessions ago? |
dry | rule | V < 0.6 * avg(V, 20)Volume under 60% of normal |
vol_spike | forecast | Will volume spike tomorrow? A volume spike tomorrow |
Answers
| Question | Answer | Reading |
|---|---|---|
vol_rankVolume in the top tenth of 50 sessions | 0.362 | false |
obvOn-balance volume above its 20-day average | 0.4012 | on the line (false) |
obv_enIs on-balance volume higher than 20 sessions ago compiled to obv() > ref(obv(), -20) | 0.1444 | false |
dryVolume under 60% of normal | 0.0585 | false |
vol_spikeA volume spike tomorrow | 0.035 | 4% · unlikely |
What it means
For MU on the session of 2026-10-30: Not true: Volume in the top tenth of 50 sessions; Is on-balance volume higher than 20 sessions ago; Volume under 60% of normal. On the line: On-balance volume above its 20-day average. Forecasts: A volume spike tomorrow 4%.
A high volume rank with rising OBV is participation; the next-day volume forecast is a separate, probabilistic column.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "MU"
},
"questions": {
"vol_rank": {
"type": "yes_no",
"ask": "percentrank(V, 50) > 90"
},
"obv": {
"type": "yes_no",
"ask": "obv() > sma(obv(), 20)"
},
"obv_en": {
"type": "yes_no",
"instructions": "Is on-balance volume higher than 20 sessions ago?"
},
"dry": {
"type": "yes_no",
"ask": "V < 0.6 * avg(V, 20)"
},
"vol_spike": {
"type": "yes_no",
"instructions": "Will volume spike tomorrow?"
}
}
}Response JSON (MU, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"vol_rank": {
"yes_no": 0.362,
"rule": "percentrank(V, 50) > 90",
"basis": "rule"
},
"obv": {
"yes_no": 0.4012,
"rule": "obv() > sma(obv(), 20)",
"basis": "rule"
},
"obv_en": {
"yes_no": 0.1444,
"rule": "obv() > ref(obv(), -20)",
"basis": "pattern"
},
"dry": {
"yes_no": 0.0585,
"rule": "V < 0.6 * avg(V, 20)",
"basis": "rule"
},
"vol_spike": {
"yes_no": 0.035
}
},
"context": {
"symbol": "MU",
"as_of": "2026-10-30"
}
}Quant developer · example 20
Pre-open sanity email for a pairs book: XLE and XOM
Before the open, check both legs of a pair for gaps and wide days and email the developer if a leg looks broken.
- ScheduleMon–Fri at 08:45 ET
- State2 symbols
- Questions4 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"XLE"} then XOM, one request each. The server fills in the latest completed session.
Questions
gap | rule | abs(O - C[-1]) > 0.5 * ref(atr(14), -1)Gap bigger than half an ATR |
wide | rule | (H - L) > 2 * avg(H - L, 20)Range more than twice the 20-day average range |
big_move | English → rule | Was today's move bigger than 1.5 ATR? |
gap_dn | forecast | Will it gap down tomorrow? A gap down tomorrow |
Answers
| Symbol | gaprule | widerule | big_moverule | gap_dnforecast | Fired |
|---|---|---|---|---|---|
XLE | 0.7136 | 0.0537 | 0.0975 | 0.062 | check_leg |
XOM | 0.8398 | 0.054 | 0.1131 | 0.094 | check_leg |
true false not known for rules; forecasts are odds. Hover a column for its question.
Actions
Rules on the answers decide what to send. Each symbol runs its own request, so each one can fire.
gap >= 0.6 or wide >= 0.6→Emailme{
"subject": "Pair leg XLE moved hard (2026-10-30)",
"text": "XLE: gap over half an ATR 71%, wide range 5%. Check the hedge ratio before the pair trades."
}{
"subject": "Pair leg XOM moved hard (2026-10-30)",
"text": "XOM: gap over half an ATR 84%, wide range 5%. Check the hedge ratio before the pair trades."
}What it means
Session of 2026-10-30, 2 symbols: Gap bigger than half an ATR: true for XLE, XOM of 2. Range more than twice the 20-day average range: true for none of 2. Was today's move bigger than 1.5 ATR: true for none of 2. Highest odds for “A gap down tomorrow”: XOM at 9%. check_leg fired for XLE, XOM.
Each leg is checked on its own; one email means the pair's spread logic should be reviewed before orders go out.
As a scheduled workflow (Mon–Fri at 08:45 ET)
Create it under Workflows in the console: it runs these questions for every symbol on the schedule and fires the actions per symbol. The answers above are what one run returned.
{
"name": "Pre-open sanity email for a pairs book: XLE and XOM",
"symbols": "XLE XOM",
"days": [
1,
2,
3,
4,
5
],
"at_time": "08:45",
"model": "ora-fin-0.1.1",
"questions": {
"gap": {
"type": "yes_no",
"ask": "abs(O - C[-1]) > 0.5 * ref(atr(14), -1)"
},
"wide": {
"type": "yes_no",
"ask": "(H - L) > 2 * avg(H - L, 20)"
},
"big_move": {
"type": "yes_no",
"instructions": "Was today's move bigger than 1.5 ATR?"
},
"gap_dn": {
"type": "yes_no",
"instructions": "Will it gap down tomorrow?"
}
},
"actions": [
{
"id": "check_leg",
"when": "gap >= 0.6 or wide >= 0.6",
"do": "email",
"connection": "me",
"subject": "Pair leg {{symbol}} moved hard ({{as_of}})",
"message": "{{symbol}}: gap over half an ATR {{gap|pct}}, wide range {{wide|pct}}. Check the hedge ratio before the pair trades."
}
]
}Request JSON (XLE; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "XLE"
},
"questions": {
"gap": {
"type": "yes_no",
"ask": "abs(O - C[-1]) > 0.5 * ref(atr(14), -1)"
},
"wide": {
"type": "yes_no",
"ask": "(H - L) > 2 * avg(H - L, 20)"
},
"big_move": {
"type": "yes_no",
"instructions": "Was today's move bigger than 1.5 ATR?"
},
"gap_dn": {
"type": "yes_no",
"instructions": "Will it gap down tomorrow?"
}
},
"actions": [
{
"id": "check_leg",
"when": "gap >= 0.6 or wide >= 0.6",
"do": "email",
"connection": "me",
"subject": "Pair leg {{symbol}} moved hard ({{as_of}})",
"message": "{{symbol}}: gap over half an ATR {{gap|pct}}, wide range {{wide|pct}}. Check the hedge ratio before the pair trades."
}
],
"dry_run": true
}Response JSON (XLE, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"gap": {
"yes_no": 0.7136,
"rule": "abs(O - C[-1]) > 0.5 * ref(atr(14), -1)",
"basis": "rule"
},
"wide": {
"yes_no": 0.0537,
"rule": "(H - L) > 2 * avg(H - L, 20)",
"basis": "rule"
},
"big_move": {
"yes_no": 0.0975,
"rule": "abs(C - C[-1]) > 1.5 * atr(14)",
"basis": "pattern"
},
"gap_dn": {
"yes_no": 0.062
}
},
"context": {
"symbol": "XLE",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "check_leg",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "me",
"preview": {
"subject": "Pair leg XLE moved hard (2026-10-30)",
"text": "XLE: gap over half an ATR 71%, wide range 5%. Check the hedge ratio before the pair trades."
}
}
]
}Information, not investment advice. Rules answer from the latest completed daily session; forecasts are probabilities. Actions ran as dry runs: nothing was sent. More in Builders: Fintech app builder, Robo-advisor, Broker app, Algo / bot developer, Data vendor / platform, Trading educator / newsletter.