Use cases · Individuals
Students and universities: 20 ways to use Ora
Finance classes and student funds learning indicators, events and forecasts on real data. Each example is a complete, runnable request with the real answers it returned (26 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 (63)
sma 6ref 3ema 2rsi 2atr 2log 2offset 2bblower 2swinglow 2avg 2wma 1doji 1engulfing_bull 1hammer 1inside_bar 1marubozu 1outside_bar 1beat_eps_last 1beat_revenue_last 1eps_growth_yoy 1eps_surprise_pct 1div_count_ttm 1div_yield_ttm 1raised_last 1years_of_growth 1days_since_split 1days_to_split 1last_split_ratio 1reverse_split_last 1splits_5y 1atr_pct 1sqrt 1std 1tr 1bbmid 1bbupper 1macd 1macdhist 1macdsignal 1swinghigh 1adx 1cci 1diminus 1diplus 1stochd 1stochk 1willr 1median 1obv 1percentrank 1highest 1highestbars 1max 1crossup 1zscore 1cum 1rec 1rma 1days_to_earnings 1roc 1between 1crossdown 1dark_cloud 1
Examples 11–20 of 20 · page 2 of 2
Students and universities · example 11
Lesson 11: trend strength with ADX on XLE
Learn the difference between trend strength (ADX) and trend direction (+DI and -DI).
- StateXLE
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"XLE"} The server fills in the latest completed session.
Questions
adx | rule | adx(14) > 25Trending (ADX above 25) |
up | rule | adx(14) > 20 and diplus(14) > diminus(14)Trending up (ADX over 20 and +DI over −DI) |
dn | rule | diminus(14) > diplus(14)-DI above +DI (sellers in control) |
cci | rule | cci(20) < -100CCI(20) under -100 |
up_week | forecast | Will the stock be higher in a week? Higher in a week |
Answers
| Question | Answer | Reading |
|---|---|---|
adxTrending (ADX above 25) | 0.0708 | false |
upTrending up (ADX over 20 and +DI over −DI) | 0.2133 | false |
dn-DI above +DI (sellers in control) | 0.1748 | false |
cciCCI(20) under -100 | 0.0614 | false |
up_weekHigher in a week | 0.592 | 59% · close to even |
What it means
For XLE on the session of 2026-10-30: Not true: Trending (ADX above 25); Trending up (ADX over 20 and +DI over −DI); -DI above +DI (sellers in control); CCI(20) under -100. Forecasts: Higher in a week 59%.
A high ADX with -DI on top is a strong downtrend; a low ADX means trend tools are unreliable whatever the DI lines say.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "XLE"
},
"questions": {
"adx": {
"type": "yes_no",
"ask": "adx(14) > 25"
},
"up": {
"type": "yes_no",
"ask": "adx(14) > 20 and diplus(14) > diminus(14)"
},
"dn": {
"type": "yes_no",
"ask": "diminus(14) > diplus(14)"
},
"cci": {
"type": "yes_no",
"ask": "cci(20) < -100"
},
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
}
}
}Response JSON (XLE, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"adx": {
"yes_no": 0.0708,
"rule": "adx(14) > 25",
"basis": "rule"
},
"up": {
"yes_no": 0.2133,
"rule": "adx(14) > 20 and diplus(14) > diminus(14)",
"basis": "rule"
},
"dn": {
"yes_no": 0.1748,
"rule": "diminus(14) > diplus(14)",
"basis": "rule"
},
"cci": {
"yes_no": 0.0614,
"rule": "cci(20) < -100",
"basis": "rule"
},
"up_week": {
"yes_no": 0.592
}
},
"context": {
"symbol": "XLE",
"as_of": "2026-10-30"
}
}Students and universities · example 12
Lesson 12: stochastic and Williams %R on WMT
Two oscillators that compare the close with the recent range, at their classic thresholds.
- StateWMT
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"WMT"} The server fills in the latest completed session.
Questions
k_low | rule | stochk(14) < 20Stochastic %K under 20 |
kd | English → rule | Is stochastic %K above %D? |
d_hi | rule | stochd(14) > 80Stochastic %D above 80 |
willr | rule | willr(14) > -20Williams %R above −20 |
willr_low | rule | willr(14) < -80Williams %R under -80 |
Answers
| Question | Answer | Reading |
|---|---|---|
k_lowStochastic %K under 20 | 0.0613 | false |
kdIs stochastic %K above %D compiled to stochk(14, 3, 3) > stochd(14, 3, 3) | 0.7083 | true |
d_hiStochastic %D above 80 | 0.5154 | on the line (true) |
willrWilliams %R above −20 | 0.7076 | true |
willr_lowWilliams %R under -80 | 0.0606 | false |
What it means
For WMT on the session of 2026-10-30: True now: Is stochastic %K above %D; Williams %R above −20. Not true: Stochastic %K under 20; Williams %R under -80. On the line: Stochastic %D above 80.
Both oscillators read where the close sits in its range; Williams %R runs from 0 to -100, the stochastic from 0 to 100.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "WMT"
},
"questions": {
"k_low": {
"type": "yes_no",
"ask": "stochk(14) < 20"
},
"kd": {
"type": "yes_no",
"instructions": "Is stochastic %K above %D?"
},
"d_hi": {
"type": "yes_no",
"ask": "stochd(14) > 80"
},
"willr": {
"type": "yes_no",
"ask": "willr(14) > -20"
},
"willr_low": {
"type": "yes_no",
"ask": "willr(14) < -80"
}
}
}Response JSON (WMT, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"k_low": {
"yes_no": 0.0613,
"rule": "stochk(14) < 20",
"basis": "rule"
},
"kd": {
"yes_no": 0.7083,
"rule": "stochk(14, 3, 3) > stochd(14, 3, 3)",
"basis": "comparison"
},
"d_hi": {
"yes_no": 0.5154,
"rule": "stochd(14) > 80",
"basis": "rule"
},
"willr": {
"yes_no": 0.7076,
"rule": "willr(14) > -20",
"basis": "rule"
},
"willr_low": {
"yes_no": 0.0606,
"rule": "willr(14) < -80",
"basis": "rule"
}
},
"context": {
"symbol": "WMT",
"as_of": "2026-10-30"
}
}Students and universities · example 13
Lesson 13: volume tells you who showed up (BAC)
Learn volume rules: against the average, against the median, percentile rank and on-balance volume.
- StateBAC
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"BAC"} The server fills in the latest completed session.
Questions
avg | rule | V > avg(V, 20)Volume above its 20-day average |
median | rule | V > 2 * median(V, 20)Volume more than twice its 20-day median |
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 |
spike | forecast | Will volume spike tomorrow? A volume spike tomorrow |
Answers
| Question | Answer | Reading |
|---|---|---|
avgVolume above its 20-day average | 0.5704 | on the line (true) |
medianVolume more than twice its 20-day median | 0.0741 | false |
rankVolume in the top tenth of 50 sessions | 0.2089 | false |
obvOn-balance volume above its 20-day average | 0.3948 | false |
spikeA volume spike tomorrow | 0.022 | 2% · unlikely |
What it means
For BAC on the session of 2026-10-30: Not true: Volume more than twice its 20-day median; Volume in the top tenth of 50 sessions; On-balance volume above its 20-day average. On the line: Volume above its 20-day average. Forecasts: A volume spike tomorrow 2%.
The median ignores one huge day better than the average does; percentrank() tells you how unusual today is against recent history.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "BAC"
},
"questions": {
"avg": {
"type": "yes_no",
"ask": "V > avg(V, 20)"
},
"median": {
"type": "yes_no",
"ask": "V > 2 * median(V, 20)"
},
"rank": {
"type": "yes_no",
"ask": "percentrank(V, 50) > 90"
},
"obv": {
"type": "yes_no",
"ask": "obv() > sma(obv(), 20)"
},
"spike": {
"type": "yes_no",
"instructions": "Will volume spike tomorrow?"
}
}
}Response JSON (BAC, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"avg": {
"yes_no": 0.5704,
"rule": "V > avg(V, 20)",
"basis": "rule"
},
"median": {
"yes_no": 0.0741,
"rule": "V > 2 * median(V, 20)",
"basis": "rule"
},
"rank": {
"yes_no": 0.2089,
"rule": "percentrank(V, 50) > 90",
"basis": "rule"
},
"obv": {
"yes_no": 0.3948,
"rule": "obv() > sma(obv(), 20)",
"basis": "rule"
},
"spike": {
"yes_no": 0.022
}
},
"context": {
"symbol": "BAC",
"as_of": "2026-10-30"
}
}Students and universities · example 14
Lesson 14: highest() vs max(), the breakout trap (NVDA)
Learn why C > max(C, 20) can never be true and C > highest(C, 20) is the correct breakout rule.
- StateNVDA
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"NVDA"} The server fills in the latest completed session.
Questions
right | rule | C > highest(C, 20)20-day closing breakout |
wrong | rule | C > max(C, 20)Close above max(C, 20), which includes today |
near | rule | C >= 0.98 * max(H, 20)Within 2% of the 20-day high |
bars | rule | highestbars(H, 20) <= 3The 20-day high is at most 3 bars old |
new_high | forecast | Will it make a new 20-day high in the next week? A new 20-day high next week |
Answers
| Question | Answer | Reading |
|---|---|---|
right20-day closing breakout | 0.0537 | false |
wrongClose above max(C, 20), which includes today | 0.0537 | false |
nearWithin 2% of the 20-day high | 0.0537 | false |
barsThe 20-day high is at most 3 bars old | 0.0566 | false |
new_highA new 20-day high next week | 0.027 | 3% · unlikely |
What it means
For NVDA on the session of 2026-10-30: Not true: 20-day closing breakout; Close above max(C, 20), which includes today; Within 2% of the 20-day high; The 20-day high is at most 3 bars old. Forecasts: A new 20-day high next week 3%.
max() includes the current bar, highest() looks only at the bars before; the always-false rule is the lesson.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "NVDA"
},
"questions": {
"right": {
"type": "yes_no",
"ask": "C > highest(C, 20)"
},
"wrong": {
"type": "yes_no",
"ask": "C > max(C, 20)"
},
"near": {
"type": "yes_no",
"ask": "C >= 0.98 * max(H, 20)"
},
"bars": {
"type": "yes_no",
"ask": "highestbars(H, 20) <= 3"
},
"new_high": {
"type": "yes_no",
"instructions": "Will it make a new 20-day high in the next week?"
}
}
}Response JSON (NVDA, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"right": {
"yes_no": 0.0537,
"rule": "C > highest(C, 20)",
"basis": "rule"
},
"wrong": {
"yes_no": 0.0537,
"rule": "C > max(C, 20)",
"basis": "rule"
},
"near": {
"yes_no": 0.0537,
"rule": "C >= 0.98 * max(H, 20)",
"basis": "rule"
},
"bars": {
"yes_no": 0.0566,
"rule": "highestbars(H, 20) <= 3",
"basis": "rule"
},
"new_high": {
"yes_no": 0.027
}
},
"context": {
"symbol": "NVDA",
"as_of": "2026-10-30"
}
}Students and universities · example 15
Lesson 15: z-scores and mean reversion on GLD
Measure how far price is from its mean in standard deviations, and compare with Bollinger and RSI readings.
- StateGLD
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"GLD"} The server fills in the latest completed session.
Questions
z_low | rule | zscore(C, 20) < -2Two deviations under the 20-day mean |
z_high | rule | zscore(C, 20) > 2Close more than 2 standard deviations above its 20-day mean |
band | rule | C < bblower(C, 20, 2)Closed under the lower Bollinger band |
back_in | rule | crossup(C, bblower(C, 20, 2))Crossed back above the lower band |
bounce | forecast | Will it rally at least 5% at some point in the next month? A 5% rally within a month |
Answers
| Question | Answer | Reading |
|---|---|---|
z_lowTwo deviations under the 20-day mean | 0.7743 | true |
z_highClose more than 2 standard deviations above its 20-day mean | 0.0537 | false |
bandClosed under the lower Bollinger band | 0.6655 | true |
back_inCrossed back above the lower band | 0.05 | false |
bounceA 5% rally within a month | 0.503 | 50% · close to even |
What it means
For GLD on the session of 2026-10-30: True now: Two deviations under the 20-day mean; Closed under the lower Bollinger band. Not true: Close more than 2 standard deviations above its 20-day mean; Crossed back above the lower band. Forecasts: A 5% rally within a month 50%.
A z-score beyond two is rare by construction; whether it reverts is a forecast question, not something the z-score knows.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "GLD"
},
"questions": {
"z_low": {
"type": "yes_no",
"ask": "zscore(C, 20) < -2"
},
"z_high": {
"type": "yes_no",
"ask": "zscore(C, 20) > 2"
},
"band": {
"type": "yes_no",
"ask": "C < bblower(C, 20, 2)"
},
"back_in": {
"type": "yes_no",
"ask": "crossup(C, bblower(C, 20, 2))"
},
"bounce": {
"type": "yes_no",
"instructions": "Will it rally at least 5% at some point in the next month?"
}
}
}Response JSON (GLD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"z_low": {
"yes_no": 0.7743,
"rule": "zscore(C, 20) < -2",
"basis": "rule"
},
"z_high": {
"yes_no": 0.0537,
"rule": "zscore(C, 20) > 2",
"basis": "rule"
},
"band": {
"yes_no": 0.6655,
"rule": "C < bblower(C, 20, 2)",
"basis": "rule"
},
"back_in": {
"yes_no": 0.05,
"rule": "crossup(C, bblower(C, 20, 2))",
"basis": "rule"
},
"bounce": {
"yes_no": 0.503
}
},
"context": {
"symbol": "GLD",
"as_of": "2026-10-30"
}
}Students and universities · example 16
Lesson 16: build your own indicator with rec() and cum() (SPY)
Write an exponential average by hand with rec(), check it against ema(), and count up days with cum().
- StateSPY
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"SPY"} The server fills in the latest completed session.
Questions
rec | rule | C > rec(C, self + 0.1 * (C - self))Close above a hand-built smoothing (alpha 0.1) |
ema | rule | C > ema(C, 19)Close above the 19-day EMA (the same alpha) |
rma | rule | C > rma(C, 10)Close above the 10-day Wilder average (also alpha 0.1) |
cum | rule | cum(C > C[-1]) > cum(C < C[-1])More up closes than down closes over the whole history |
logret | rule | log(C / C[-20]) > 0.0220-day log return above 2% |
Answers
| Question | Answer | Reading |
|---|---|---|
recClose above a hand-built smoothing (alpha 0.1) | 0.0786 | false |
emaClose above the 19-day EMA (the same alpha) | 0.0786 | false |
rmaClose above the 10-day Wilder average (also alpha 0.1) | 0.0786 | false |
cumMore up closes than down closes over the whole history | 0.9463 | true |
logret20-day log return above 2% | 0.0665 | false |
What it means
For SPY on the session of 2026-10-30: True now: More up closes than down closes over the whole history. Not true: Close above a hand-built smoothing (alpha 0.1); Close above the 19-day EMA (the same alpha); Close above the 10-day Wilder average (also alpha 0.1); 20-day log return above 2%.
An EMA with alpha 0.1 is a 19-day EMA and a 10-day Wilder average; rec() lets you build that, or anything else, step by step.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "SPY"
},
"questions": {
"rec": {
"type": "yes_no",
"ask": "C > rec(C, self + 0.1 * (C - self))"
},
"ema": {
"type": "yes_no",
"ask": "C > ema(C, 19)"
},
"rma": {
"type": "yes_no",
"ask": "C > rma(C, 10)"
},
"cum": {
"type": "yes_no",
"ask": "cum(C > C[-1]) > cum(C < C[-1])"
},
"logret": {
"type": "yes_no",
"ask": "log(C / C[-20]) > 0.02"
}
}
}Response JSON (SPY, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"rec": {
"yes_no": 0.0786,
"rule": "C > rec(C, self + 0.1 * (C - self))",
"basis": "rule"
},
"ema": {
"yes_no": 0.0786,
"rule": "C > ema(C, 19)",
"basis": "rule"
},
"rma": {
"yes_no": 0.0786,
"rule": "C > rma(C, 10)",
"basis": "rule"
},
"cum": {
"yes_no": 0.9463,
"rule": "cum(C > C[-1]) > cum(C < C[-1])",
"basis": "rule"
},
"logret": {
"yes_no": 0.0665,
"rule": "log(C / C[-20]) > 0.02",
"basis": "rule"
}
},
"context": {
"symbol": "SPY",
"as_of": "2026-10-30"
}
}Students and universities · example 17
Student investment fund: pre-trade checklist for LLY
The fund's committee requires liquidity, trend, stop distance and an earnings check before any buy. The result is emailed to the committee.
- StateLLY
- Questions5 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"LLY"} The server fills in the latest completed session.
Questions
liquid | English → rule | Does the stock trade more than $50 million a day on average? |
trend | rule | C > sma(C, 50)Above the 50-day average |
stop | rule | C > swinglow(5) and C - swinglow(5) < 1.5 * atr(14)A stop under the last swing low is within 1.5 ATR |
earn | English → rule | Is the next earnings report more than 10 days away? |
drop5 | forecast | Will it drop at least 5% at some point in the next month? A 5% drawdown within a month |
Answers
| Question | Answer | Reading |
|---|---|---|
liquidDoes the stock trade more than $50 million a day on average compiled to avg(C * V, 20) > 50000000 | 0.9463 | true |
trendAbove the 50-day average | 0.9463 | true |
stopA stop under the last swing low is within 1.5 ATR | 0.0537 | false |
earnIs the next earnings report more than 10 days away compiled to days_to_earnings > 10 | 0.9463 | true |
drop5A 5% drawdown within a month | 0.583 | 58% · close to even |
Actions
Rules on the answers decide what to send.
liquid >= 0.6 and trend >= 0.6 and earn >= 0.6→Emailstudent-fund-committeeelse→Emailstudent-fund-committee{
"subject": "LLY passes the pre-trade checklist",
"text": "LLY (2026-10-30): liquid, above the 50-day, no earnings in 10 days. Stop near swing low 5%. Drawdown odds 58%. Committee vote can proceed."
}What it means
For LLY on the session of 2026-10-30: True now: Does the stock trade more than $50 million a day on average; Above the 50-day average; Is the next earnings report more than 10 days away. Not true: A stop under the last swing low is within 1.5 ATR. Forecasts: A 5% drawdown within a month 58%. Fired: pass (Email → student-fund-committee).
A written, rule-based checklist is what a real investment committee keeps; the email is the record of the check.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "LLY"
},
"questions": {
"liquid": {
"type": "yes_no",
"instructions": "Does the stock trade more than $50 million a day on average?"
},
"trend": {
"type": "yes_no",
"ask": "C > sma(C, 50)"
},
"stop": {
"type": "yes_no",
"ask": "C > swinglow(5) and C - swinglow(5) < 1.5 * atr(14)"
},
"earn": {
"type": "yes_no",
"instructions": "Is the next earnings report more than 10 days away?"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "pass",
"when": "liquid >= 0.6 and trend >= 0.6 and earn >= 0.6",
"do": "email",
"connection": "student-fund-committee",
"subject": "{{symbol}} passes the pre-trade checklist",
"message": "{{symbol}} ({{as_of}}): liquid, above the 50-day, no earnings in 10 days. Stop near swing low {{stop|pct}}. Drawdown odds {{drop5|pct}}. Committee vote can proceed."
},
{
"id": "fail",
"when": "else",
"do": "email",
"connection": "student-fund-committee",
"subject": "{{symbol}} fails the checklist",
"message": "{{symbol}} ({{as_of}}): trend {{trend|pct}}, earnings clear {{earn|pct}}, liquid {{liquid|pct}}. Revisit next week."
}
],
"dry_run": true
}Response JSON (LLY, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"liquid": {
"yes_no": 0.9463,
"rule": "avg(C * V, 20) > 50000000",
"basis": "pattern"
},
"trend": {
"yes_no": 0.9463,
"rule": "C > sma(C, 50)",
"basis": "rule"
},
"stop": {
"yes_no": 0.0537,
"rule": "C > swinglow(5) and C - swinglow(5) < 1.5 * atr(14)",
"basis": "rule"
},
"earn": {
"yes_no": 0.9463,
"rule": "days_to_earnings > 10",
"basis": "pattern"
},
"drop5": {
"yes_no": 0.583
}
},
"context": {
"symbol": "LLY",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "pass",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "student-fund-committee",
"preview": {
"subject": "LLY passes the pre-trade checklist",
"text": "LLY (2026-10-30): liquid, above the 50-day, no earnings in 10 days. Stop near swing low 5%. Drawdown odds 58%. Committee vote can proceed."
}
},
{
"id": "fail",
"fired": false,
"status": "skipped"
}
]
}Students and universities · example 18
Class assignment: weekly sector scan (XLK, XLF, XLE, XLV, XLU)
Every Friday the class gets one email per sector ETF with the same four answers, to write up the week's market.
- ScheduleFri at 17:00 ET
- State5 symbols
- Questions4 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"XLK"} then XLF, XLE, XLV, XLU, one request each. The server fills in the latest completed session.
Questions
trend | English → rule | Is the stock above its 200-day moving average? |
momentum | rule | roc(C, 20) > 5Up more than 5% in 20 sessions |
rsi50 | rule | rsi(C, 14) > 50RSI above 50 |
beat_spy | forecast | Will it beat SPY over the next month? Beating SPY over a month |
Answers
| Symbol | trendrule | momentumrule | rsi50rule | beat_spyforecast | Fired |
|---|---|---|---|---|---|
XLK | 0.92 | 0.0537 | 0.0957 | 0.498 | report |
XLF | 0.919 | 0.606 | 0.7929 | 0.448 | report |
XLE | 0.9463 | 0.897 | 0.9318 | 0.55 | report |
XLV | 0.9463 | 0.9157 | 0.9415 | 0.534 | report |
XLU | 0.2572 | 0.8282 | 0.8929 | 0.445 | report |
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.
else→Emailclass-list{
"subject": "Weekly scan: XLK (2026-10-30)",
"text": "XLK: above 200-day 92%, 20-day ROC over 5% 5%, RSI over 50 10%. Model: beats SPY next month 50%."
}{
"subject": "Weekly scan: XLF (2026-10-30)",
"text": "XLF: above 200-day 92%, 20-day ROC over 5% 61%, RSI over 50 79%. Model: beats SPY next month 45%."
}{
"subject": "Weekly scan: XLE (2026-10-30)",
"text": "XLE: above 200-day 95%, 20-day ROC over 5% 90%, RSI over 50 93%. Model: beats SPY next month 55%."
}{
"subject": "Weekly scan: XLV (2026-10-30)",
"text": "XLV: above 200-day 95%, 20-day ROC over 5% 92%, RSI over 50 94%. Model: beats SPY next month 53%."
}{
"subject": "Weekly scan: XLU (2026-10-30)",
"text": "XLU: above 200-day 26%, 20-day ROC over 5% 83%, RSI over 50 89%. Model: beats SPY next month 44%."
}What it means
Session of 2026-10-30, 5 symbols: Is the stock above its 200-day moving average: true for XLK, XLF, XLE, XLV of 5. Up more than 5% in 20 sessions: true for XLF, XLE, XLV, XLU of 5. RSI above 50: true for XLF, XLE, XLV, XLU of 5. Highest odds for “Beating SPY over a month”: XLE at 55%. report fired for XLK, XLF, XLE, XLV, XLU.
Students compare the rule answers with what they saw in the news, and track the forecasts against what happens next week.
As a scheduled workflow (Fri at 17:00 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": "Class assignment: weekly sector scan (XLK, XLF, XLE, XLV, XLU)",
"symbols": "XLK XLF XLE XLV XLU",
"days": [
5
],
"at_time": "17:00",
"model": "ora-fin-0.1.1",
"questions": {
"trend": {
"type": "yes_no",
"instructions": "Is the stock above its 200-day moving average?"
},
"momentum": {
"type": "yes_no",
"ask": "roc(C, 20) > 5"
},
"rsi50": {
"type": "yes_no",
"ask": "rsi(C, 14) > 50"
},
"beat_spy": {
"type": "yes_no",
"instructions": "Will it beat SPY over the next month?"
}
},
"actions": [
{
"id": "report",
"when": "else",
"do": "email",
"connection": "class-list",
"subject": "Weekly scan: {{symbol}} ({{as_of}})",
"message": "{{symbol}}: above 200-day {{trend|pct}}, 20-day ROC over 5% {{momentum|pct}}, RSI over 50 {{rsi50|pct}}. Model: beats SPY next month {{beat_spy|pct}}."
}
]
}Request JSON (XLK; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "XLK"
},
"questions": {
"trend": {
"type": "yes_no",
"instructions": "Is the stock above its 200-day moving average?"
},
"momentum": {
"type": "yes_no",
"ask": "roc(C, 20) > 5"
},
"rsi50": {
"type": "yes_no",
"ask": "rsi(C, 14) > 50"
},
"beat_spy": {
"type": "yes_no",
"instructions": "Will it beat SPY over the next month?"
}
},
"actions": [
{
"id": "report",
"when": "else",
"do": "email",
"connection": "class-list",
"subject": "Weekly scan: {{symbol}} ({{as_of}})",
"message": "{{symbol}}: above 200-day {{trend|pct}}, 20-day ROC over 5% {{momentum|pct}}, RSI over 50 {{rsi50|pct}}. Model: beats SPY next month {{beat_spy|pct}}."
}
],
"dry_run": true
}Response JSON (XLK, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"trend": {
"yes_no": 0.92,
"rule": "C > sma(C, 200)",
"basis": "comparison"
},
"momentum": {
"yes_no": 0.0537,
"rule": "roc(C, 20) > 5",
"basis": "rule"
},
"rsi50": {
"yes_no": 0.0957,
"rule": "rsi(C, 14) > 50",
"basis": "rule"
},
"beat_spy": {
"yes_no": 0.498
}
},
"context": {
"symbol": "XLK",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "report",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "class-list",
"preview": {
"subject": "Weekly scan: XLK (2026-10-30)",
"text": "XLK: above 200-day 92%, 20-day ROC over 5% 5%, RSI over 50 10%. Model: beats SPY next month 50%."
}
}
]
}Students and universities · example 19
Lesson 17: what a probability means (IWM forecasts)
Ask several forecast questions about the same fund and learn to read them as odds, not predictions.
- StateIWM
- Questions6 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"IWM"} The server fills in the latest completed session.
Questions
up_week | forecast | Will the stock be higher in a week? Higher in a week |
down_week | forecast | Will the stock be lower in a week? Lower in a week |
rally5 | forecast | Will it rally at least 5% at some point in the next month? A 5% rally within a month |
drop5 | forecast | Will it drop at least 5% at some point in the next month? A 5% drawdown within a month |
big_move | forecast | Will there be a big move in either direction in the next 5 days? A big move either way in 5 days |
trend | rule | C > sma(C, 50)Above the 50-day average |
Answers
| Question | Answer | Reading |
|---|---|---|
up_weekHigher in a week | 0.526 | 53% · close to even |
down_weekLower in a week | 0.483 | 48% · close to even |
rally5A 5% rally within a month | 0.285 | 28% · unlikely |
drop5A 5% drawdown within a month | 0.234 | 23% · unlikely |
big_moveA big move either way in 5 days | 0.342 | 34% · unlikely |
trendAbove the 50-day average | 0.2176 | false |
What it means
For IWM on the session of 2026-10-30: Not true: Above the 50-day average. Forecasts: Higher in a week 53%; Lower in a week 48%; A 5% rally within a month 28%; A 5% drawdown within a month 23%; A big move either way in 5 days 34%.
Higher and lower in a week are separate questions, so they need not add up to one; a calibrated model is right about as often as its odds say.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "IWM"
},
"questions": {
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
},
"down_week": {
"type": "yes_no",
"instructions": "Will the stock be lower in a week?"
},
"rally5": {
"type": "yes_no",
"instructions": "Will it rally at least 5% at some point in the next month?"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
},
"big_move": {
"type": "yes_no",
"instructions": "Will there be a big move in either direction in the next 5 days?"
},
"trend": {
"type": "yes_no",
"ask": "C > sma(C, 50)"
}
}
}Response JSON (IWM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"up_week": {
"yes_no": 0.526
},
"down_week": {
"yes_no": 0.483
},
"rally5": {
"yes_no": 0.285
},
"drop5": {
"yes_no": 0.234
},
"big_move": {
"yes_no": 0.342
},
"trend": {
"yes_no": 0.2176,
"rule": "C > sma(C, 50)",
"basis": "rule"
}
},
"context": {
"symbol": "IWM",
"as_of": "2026-10-30"
}
}Students and universities · example 20
Lesson 18: send a signal to your own notebook server (ABBV)
Wire a rule to a webhook that a class notebook collects, to build a dataset of signals and outcomes over the term.
- StateABBV
- Questions5 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"ABBV"} The server fills in the latest completed session.
Questions
golden | rule | sma(C, 50) > sma(C, 200)50-day above the 200-day |
cross | rule | crossdown(C, sma(C, 50))Close crossed below the 50-day today |
dark | rule | dark_cloud()dark cloud candle: After a green day, opens above its close and closes below the middle of its body (but above its open). |
between | rule | between(C / sma(C, 50) - 1, -0.02, 0.02)Within 2% of the 50-day average |
up_week | forecast | Will the stock be higher in a week? Higher in a week |
Answers
| Question | Answer | Reading |
|---|---|---|
golden50-day above the 200-day | 0.9463 | true |
crossClose crossed below the 50-day today | 0.05 | false |
darkdark cloud candle: After a green day, opens above its close and closes below the middle of its body (but above its open). | 0.1286 | false |
betweenWithin 2% of the 50-day average | 0.05 | false |
up_weekHigher in a week | 0.533 | 53% · close to even |
Actions
Rules on the answers decide what to send.
else→Webhookclass-notebook{
"symbol": "ABBV",
"as_of": "2026-10-30",
"golden": 0.9463,
"cross_down_50": 0.05,
"dark_cloud": 0.1286,
"near_50d": 0.05,
"p_up_week": 0.533
}What it means
For ABBV on the session of 2026-10-30: True now: 50-day above the 200-day. Not true: Close crossed below the 50-day today; dark cloud candle: After a green day, opens above its close and closes below the middle of its body (but above its open).; Within 2% of the 50-day average. Forecasts: Higher in a week 53%. Fired: log (Webhook → class-notebook).
Logging every answer, not just the alerts, lets the class later check how often each rule and forecast was right.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "ABBV"
},
"questions": {
"golden": {
"type": "yes_no",
"ask": "sma(C, 50) > sma(C, 200)"
},
"cross": {
"type": "yes_no",
"ask": "crossdown(C, sma(C, 50))"
},
"dark": {
"type": "yes_no",
"ask": "dark_cloud()"
},
"between": {
"type": "yes_no",
"ask": "between(C / sma(C, 50) - 1, -0.02, 0.02)"
},
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
}
},
"actions": [
{
"id": "log",
"when": "else",
"do": "webhook",
"connection": "class-notebook",
"body": {
"symbol": "{{symbol}}",
"as_of": "{{as_of}}",
"golden": "{{golden}}",
"cross_down_50": "{{cross}}",
"dark_cloud": "{{dark}}",
"near_50d": "{{between}}",
"p_up_week": "{{up_week}}"
}
}
],
"dry_run": true
}Response JSON (ABBV, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"golden": {
"yes_no": 0.9463,
"rule": "sma(C, 50) > sma(C, 200)",
"basis": "rule"
},
"cross": {
"yes_no": 0.05,
"rule": "crossdown(C, sma(C, 50))",
"basis": "rule"
},
"dark": {
"yes_no": 0.1286,
"rule": "dark_cloud()",
"basis": "rule"
},
"between": {
"yes_no": 0.05,
"rule": "between(C / sma(C, 50) - 1, -0.02, 0.02)",
"basis": "rule"
},
"up_week": {
"yes_no": 0.533
}
},
"context": {
"symbol": "ABBV",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "log",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "class-notebook",
"preview": {
"body": {
"symbol": "ABBV",
"as_of": "2026-10-30",
"golden": 0.9463,
"cross_down_50": 0.05,
"dark_cloud": 0.1286,
"near_50d": 0.05,
"p_up_week": 0.533
}
}
}
]
}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 Individuals: Retail investor, Active day trader, Swing trader, Options trader, Dividend investor, Long-term passive investor, Crypto trader, FX trader, Commodities trader, Social trading community.