Use cases · Builders
Trading educator / newsletter: 20 ways to use Ora
Lessons and newsletters built on real setups, with the rule shown next to every claim. 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 (62)
ref 7sma 6offset 4rsi 3avg 3highest 3swinghigh 3swinglow 3atr 3std 2morning_star 2evening_star 2bbupper 2min 2cci 2iif 1dragonfly_doji 1engulfing_bull 1hammer 1harami_bull 1piercing_line 1dark_cloud 1engulfing_bear 1gravestone_doji 1hanging_man 1shooting_star 1beat_eps_last 1beat_streak 1days_to_earnings 1macd 1bblower 1bbmid 1log 1sqrt 1lowest 1days_to_ex_div 1div_count_ttm 1div_yield_ttm 1raised_last 1years_of_growth 1gap_up 1stochd 1stochk 1willr 1max 1roc 1spinning_top 1three_black_crows 1three_white_soldiers 1barssince 1highestbars 1linreg 1lowestbars 1percentrank 1adx 1diminus 1diplus 1ema 1obv 1inside_bar 1marubozu 1outside_bar 1
Examples 11–20 of 20 · page 2 of 2
Trading educator / newsletter · example 11
Lesson: building an income watchlist (JNJ, PG, PEP, O)
Teach yield, growth streaks, monthly payers and ex-dates with real dividend facts.
- State4 symbols
- Questions5 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"JNJ"} then PG, PEP, O, one request each. The server fills in the latest completed session.
Questions
yield3 | English → rule | Is the dividend yield above 3%? |
grow25 | English → rule | Has the stock grown its dividend for 25 years in a row? |
monthly | English → rule | Does the stock pay a monthly dividend? |
ex | English → rule | Is the ex-dividend date within 30 days? |
raised | English → rule | Did the stock raise its dividend last time? |
Answers
| Symbol | yield3rule | grow25rule | monthlyrule | exrule | raisedrule | Fired |
|---|---|---|---|---|---|---|
JNJ | 0.0648 | 0.9463 | 0.0537 | 0.9187 | 0.1409 | ex_note |
PG | 0.2091 | 0.9463 | 0.0537 | 0.0537 | 0.1409 | none |
PEP | 0.9463 | 0.9463 | 0.0537 | 0.0537 | 0.1409 | none |
O | 0.9463 | 0.0537 | 0.9317 | 0.0537 | 0.1409 | none |
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.
ex >= 0.6→Emailstudents{
"subject": "JNJ goes ex-dividend soon",
"text": "JNJ (2026-10-30) has a declared ex-date within 30 days. Yield over 3% 6%, 25-year grower 95%. Exercise: what does an owner need to do to receive it?"
}What it means
Session of 2026-10-30, 4 symbols: Is the dividend yield above 3%: true for PEP, O of 4. Has the stock grown its dividend for 25 years in a row: true for JNJ, PG, PEP of 4. Does the stock pay a monthly dividend: true for O of 4. Is the ex-dividend date within 30 days: true for JNJ of 4. ex_note fired for JNJ.
Each fact comes from the dividend record; students see that a high yield and a long growth streak are different things.
Request JSON (JNJ; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "JNJ"
},
"questions": {
"yield3": {
"type": "yes_no",
"instructions": "Is the dividend yield above 3%?"
},
"grow25": {
"type": "yes_no",
"instructions": "Has the stock grown its dividend for 25 years in a row?"
},
"monthly": {
"type": "yes_no",
"instructions": "Does the stock pay a monthly dividend?"
},
"ex": {
"type": "yes_no",
"instructions": "Is the ex-dividend date within 30 days?"
},
"raised": {
"type": "yes_no",
"instructions": "Did the stock raise its dividend last time?"
}
},
"actions": [
{
"id": "ex_note",
"when": "ex >= 0.6",
"do": "email",
"connection": "students",
"subject": "{{symbol}} goes ex-dividend soon",
"message": "{{symbol}} ({{as_of}}) has a declared ex-date within 30 days. Yield over 3% {{yield3|pct}}, 25-year grower {{grow25|pct}}. Exercise: what does an owner need to do to receive it?"
}
],
"dry_run": true
}Response JSON (JNJ, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"yield3": {
"yes_no": 0.0648,
"rule": "div_yield_ttm > 3",
"basis": "pattern"
},
"grow25": {
"yes_no": 0.9463,
"rule": "years_of_growth >= 25",
"basis": "pattern"
},
"monthly": {
"yes_no": 0.0537,
"rule": "div_count_ttm >= 11",
"basis": "pattern"
},
"ex": {
"yes_no": 0.9187,
"rule": "days_to_ex_div <= 30",
"basis": "pattern"
},
"raised": {
"yes_no": 0.1409,
"rule": "raised_last > 0.5",
"basis": "pattern"
}
},
"context": {
"symbol": "JNJ",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "ex_note",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "students",
"preview": {
"subject": "JNJ goes ex-dividend soon",
"text": "JNJ (2026-10-30) has a declared ex-date within 30 days. Yield over 3% 6%, 25-year grower 95%. Exercise: what does an owner need to do to receive it?"
}
}
]
}days_to_ex_div div_count_ttm div_yield_ttm raised_last years_of_growth
Trading educator / newsletter · example 12
Member alert: 'stretched' warning for NFLX, sent by email
Email paying members when a widely followed name gets stretched, as a teaching moment about chasing.
- StateNFLX
- Questions4 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"NFLX"} The server fills in the latest completed session.
Questions
stretched | English → rule | Is price extended more than 2 ATR above its 20-day average? |
upper | English → rule | Did the stock close above the upper Bollinger Band? |
cci | rule | cci(20) > 150CCI above 150 |
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 |
|---|---|---|
stretchedIs price extended more than 2 ATR above its 20-day average compiled to C - sma(C, 20) > 2 * atr(14) | 0.061 | false |
upperDid the stock close above the upper Bollinger Band compiled to C > bbupper(C, 20) | 0.057 | false |
cciCCI above 150 | 0.0603 | false |
drop5A 5% drawdown within a month | 0.627 | 63% · likely |
Actions
Rules on the answers decide what to send.
stretched >= 0.6 or upper >= 0.6→Emailmemberselse→Slackeditor-log{
"text": "NFLX (2026-10-30): not stretched today, no member email."
}What it means
For NFLX on the session of 2026-10-30: Not true: Is price extended more than 2 ATR above its 20-day average; Did the stock close above the upper Bollinger Band; CCI above 150. Forecasts: A 5% drawdown within a month 63%. Fired: none (Slack → editor-log).
The email teaches a concept with a live example and a disclaimer; the editor log records why nothing went out on quiet days.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "NFLX"
},
"questions": {
"stretched": {
"type": "yes_no",
"instructions": "Is price extended more than 2 ATR above its 20-day average?"
},
"upper": {
"type": "yes_no",
"instructions": "Did the stock close above the upper Bollinger Band?"
},
"cci": {
"type": "yes_no",
"ask": "cci(20) > 150"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "teach",
"when": "stretched >= 0.6 or upper >= 0.6",
"do": "email",
"connection": "members",
"subject": "Teaching moment: {{symbol}} is stretched",
"message": "{{symbol}} ({{as_of}}) is more than 2 ATR above its 20-day ({{stretched|pct}}) or above its upper band ({{upper|pct}}). Odds of a 5% drop within a month: {{drop5|pct}}. Lesson: stretched is not the same as overvalued. Education only."
},
{
"id": "none",
"when": "else",
"do": "slack",
"connection": "editor-log",
"message": "{{symbol}} ({{as_of}}): not stretched today, no member email."
}
],
"dry_run": true
}Response JSON (NFLX, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"stretched": {
"yes_no": 0.061,
"rule": "C - sma(C, 20) > 2 * atr(14)",
"basis": "pattern"
},
"upper": {
"yes_no": 0.057,
"rule": "C > bbupper(C, 20)",
"basis": "comparison"
},
"cci": {
"yes_no": 0.0603,
"rule": "cci(20) > 150",
"basis": "rule"
},
"drop5": {
"yes_no": 0.627
}
},
"context": {
"symbol": "NFLX",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "teach",
"fired": false,
"status": "skipped"
},
{
"id": "none",
"fired": true,
"status": "dry_run",
"do": "slack",
"connection": "editor-log",
"preview": {
"text": "NFLX (2026-10-30): not stretched today, no member email."
}
}
]
}Trading educator / newsletter · example 13
Lesson: gaps up, gaps down and gap fills on AMD
Show the gap vocabulary with real answers: gap, unfilled gap, gap fill and faded gap.
- StateAMD
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"AMD"} The server fills in the latest completed session.
Questions
open_above | English → rule | Did the stock open above yesterday's close? |
unfilled | English → rule | Did the stock gap up with today's low above yesterday's high? |
fill | English → rule | Did today's gap up fill? |
faded | rule | O > C[-1] and C < C[-1]Gapped up but closed under yesterday's close |
gap_tomorrow | forecast | Will it gap up tomorrow? A gap up tomorrow |
Answers
| Question | Answer | Reading |
|---|---|---|
open_aboveDid the stock open above yesterday's close compiled to O > C[-1] | 0.0537 | false |
unfilledDid the stock gap up with today's low above yesterday's high compiled to gap_up() | 0.0537 | false |
fillDid today's gap up fill compiled to (O > C[-1] * 1) and (L <= C[-1]) | 0.0537 | false |
fadedGapped up but closed under yesterday's close | 0.0537 | false |
gap_tomorrowA gap up tomorrow | 0.363 | 36% · unlikely |
What it means
For AMD on the session of 2026-10-30: Not true: Did the stock open above yesterday's close; Did the stock gap up with today's low above yesterday's high; Did today's gap up fill; Gapped up but closed under yesterday's close. Forecasts: A gap up tomorrow 36%.
Gap questions about yesterday are facts; whether it gaps tomorrow is a forecast, and the lesson shows both side by side.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "AMD"
},
"questions": {
"open_above": {
"type": "yes_no",
"instructions": "Did the stock open above yesterday's close?"
},
"unfilled": {
"type": "yes_no",
"instructions": "Did the stock gap up with today's low above yesterday's high?"
},
"fill": {
"type": "yes_no",
"instructions": "Did today's gap up fill?"
},
"faded": {
"type": "yes_no",
"ask": "O > C[-1] and C < C[-1]"
},
"gap_tomorrow": {
"type": "yes_no",
"instructions": "Will it gap up tomorrow?"
}
}
}Response JSON (AMD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"open_above": {
"yes_no": 0.0537,
"rule": "O > C[-1]",
"basis": "comparison"
},
"unfilled": {
"yes_no": 0.0537,
"rule": "gap_up()",
"basis": "pattern"
},
"fill": {
"yes_no": 0.0537,
"rule": "(O > C[-1] * 1) and (L <= C[-1])",
"basis": "pattern"
},
"faded": {
"yes_no": 0.0537,
"rule": "O > C[-1] and C < C[-1]",
"basis": "rule"
},
"gap_tomorrow": {
"yes_no": 0.363
}
},
"context": {
"symbol": "AMD",
"as_of": "2026-10-30"
}
}Trading educator / newsletter · example 14
Lesson: stochastic, Williams %R and CCI on DIS
Compare three range oscillators on the same stock and day.
- StateDIS
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"DIS"} The server fills in the latest completed session.
Questions
stoch_os | English → rule | Is the stock oversold on the stochastic, below 20? |
kd | rule | stochk(14) > stochd(14)stochastic %K above %D |
willr | rule | willr(14) < -80Williams %R below -80 |
cci | rule | cci(20) < -100CCI below -100 |
Answers
| Question | Answer | Reading |
|---|---|---|
stoch_osIs the stock oversold on the stochastic, below 20 compiled to stochk(14, 3, 3) < 20 | 0.1323 | false |
kdstochastic %K above %D | 0.2687 | false |
willrWilliams %R below -80 | 0.1055 | false |
cciCCI below -100 | 0.0781 | false |
What it means
For DIS on the session of 2026-10-30: Not true: Is the stock oversold on the stochastic, below 20; stochastic %K above %D; Williams %R below -80; CCI below -100.
All three measure where the close sits in a recent range; students see when they agree and how their scales differ.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "DIS"
},
"questions": {
"stoch_os": {
"type": "yes_no",
"instructions": "Is the stock oversold on the stochastic, below 20?"
},
"kd": {
"type": "yes_no",
"ask": "stochk(14) > stochd(14)"
},
"willr": {
"type": "yes_no",
"ask": "willr(14) < -80"
},
"cci": {
"type": "yes_no",
"ask": "cci(20) < -100"
}
}
}Response JSON (DIS, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"stoch_os": {
"yes_no": 0.1323,
"rule": "stochk(14, 3, 3) < 20",
"basis": "pattern"
},
"kd": {
"yes_no": 0.2687,
"rule": "stochk(14) > stochd(14)",
"basis": "rule"
},
"willr": {
"yes_no": 0.1055,
"rule": "willr(14) < -80",
"basis": "rule"
},
"cci": {
"yes_no": 0.0781,
"rule": "cci(20) < -100",
"basis": "rule"
}
},
"context": {
"symbol": "DIS",
"as_of": "2026-10-30"
}
}Trading educator / newsletter · example 15
Lesson: relative strength across sectors (XLK, XLU, XLE, XLV)
Teach relative strength with momentum rules and the beat-SPY forecast on four sectors.
- State4 symbols
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"XLK"} then XLU, XLE, XLV, one request each. The server fills in the latest completed session.
Questions
roc | rule | roc(C, 20) > 5Up more than 5% in 20 sessions |
month | English → rule | Is the stock up over the last month? |
leader | rule | roc(C, 63) > 10 and C >= 0.95 * max(H, 63)Up more than 10% in a quarter, near the high |
beat_spy | forecast | Will it beat SPY over the next month? Beating SPY over a month |
Answers
| Symbol | rocrule | monthrule | leaderrule | beat_spyforecast |
|---|---|---|---|---|
XLK | 0.0537 | 0.0654 | 0.0624 | 0.498 |
XLU | 0.8282 | 0.9259 | 0.0549 | 0.445 |
XLE | 0.897 | 0.9419 | 0.9336 | 0.55 |
XLV | 0.9157 | 0.9454 | 0.8322 | 0.534 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 4 symbols: Up more than 5% in 20 sessions: true for XLU, XLE, XLV of 4. Is the stock up over the last month: true for XLU, XLE, XLV of 4. Up more than 10% in a quarter, near the high: true for XLE, XLV of 4. Highest odds for “Beating SPY over a month”: XLE at 55%.
Students rank sectors by true momentum rules and then compare with the forecast, learning that past strength and future odds differ.
Request JSON (XLK; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "XLK"
},
"questions": {
"roc": {
"type": "yes_no",
"ask": "roc(C, 20) > 5"
},
"month": {
"type": "yes_no",
"instructions": "Is the stock up over the last month?"
},
"leader": {
"type": "yes_no",
"ask": "roc(C, 63) > 10 and C >= 0.95 * max(H, 63)"
},
"beat_spy": {
"type": "yes_no",
"instructions": "Will it beat SPY over the next month?"
}
}
}Response JSON (XLK, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"roc": {
"yes_no": 0.0537,
"rule": "roc(C, 20) > 5",
"basis": "rule"
},
"month": {
"yes_no": 0.0654,
"rule": "C > C[-21]",
"basis": "pattern"
},
"leader": {
"yes_no": 0.0624,
"rule": "roc(C, 63) > 10 and C >= 0.95 * max(H, 63)",
"basis": "rule"
},
"beat_spy": {
"yes_no": 0.498
}
},
"context": {
"symbol": "XLK",
"as_of": "2026-10-30"
}
}Trading educator / newsletter · example 16
Lesson: stops, targets and position size on HD
Walk through a trade plan with real numbers: stop distance, risk/reward and a position-size check.
- StateHD
- Questions5 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"HD"} The server fills in the latest completed session.
Questions
stop | English → rule | Is a stop below the last swing low less than 1.5 ATR away? |
rr | English → rule | Is the risk/reward at least 2:1, targeting the last swing high with a stop at the last swing low? |
size | rule | 0.01 / (2 * atr(14) / C) >= 0.25A 2-ATR stop risking 1% allows at least a 25% position |
liquid | English → rule | Does the stock trade more than $50 million a day on average? |
stop_hit | forecast | Will it drop at least 5% at some point in the next month? A 5% drawdown within a month |
Answers
| Question | Answer | Reading |
|---|---|---|
stopIs a stop below the last swing low less than 1.5 ATR away compiled to (C > swinglow(5, 1)) and (C - swinglow(5, 1) < 1.5 * atr(14)) | 0.097 | false |
rrIs the risk/reward at least 2:1, targeting the last swing high with a stop at the last swing low compiled to (C > swinglow(5, 1)) and (C < swinghigh(5, 1)) and (swinghigh(5, 1) - C >= 2 * (C - swinglow(5, 1))) | 0.1341 | false |
sizeA 2-ATR stop risking 1% allows at least a 25% position | 0.0859 | false |
liquidDoes the stock trade more than $50 million a day on average compiled to avg(C * V, 20) > 50000000 | 0.9463 | true |
stop_hitA 5% drawdown within a month | 0.457 | 46% · close to even |
Actions
Rules on the answers decide what to send.
stop >= 0.6 and rr >= 0.6 and liquid >= 0.6→Webhookcourse-platformelse→Webhookcourse-platform{
"lesson": "trade_plan",
"symbol": "HD",
"verdict": "plan_fails_a_check",
"stop_close": 0.097,
"reward_2to1": 0.1341,
"as_of": "2026-10-30"
}What it means
For HD on the session of 2026-10-30: True now: Does the stock trade more than $50 million a day on average. Not true: Is a stop below the last swing low less than 1.5 ATR away; Is the risk/reward at least 2:1, targeting the last swing high with a stop at the last swing low; A 2-ATR stop risking 1% allows at least a 25% position. Forecasts: A 5% drawdown within a month 46%. Fired: plan_fails (Webhook → course-platform).
The plan's pieces are exact checks on today's data; the drawdown forecast shows students that a good plan can still lose.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "HD"
},
"questions": {
"stop": {
"type": "yes_no",
"instructions": "Is a stop below the last swing low less than 1.5 ATR away?"
},
"rr": {
"type": "yes_no",
"instructions": "Is the risk/reward at least 2:1, targeting the last swing high with a stop at the last swing low?"
},
"size": {
"type": "yes_no",
"ask": "0.01 / (2 * atr(14) / C) >= 0.25"
},
"liquid": {
"type": "yes_no",
"instructions": "Does the stock trade more than $50 million a day on average?"
},
"stop_hit": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "plan_ok",
"when": "stop >= 0.6 and rr >= 0.6 and liquid >= 0.6",
"do": "webhook",
"connection": "course-platform",
"body": {
"lesson": "trade_plan",
"symbol": "{{symbol}}",
"verdict": "plan_meets_checks",
"p_drop5": "{{stop_hit}}",
"as_of": "{{as_of}}"
}
},
{
"id": "plan_fails",
"when": "else",
"do": "webhook",
"connection": "course-platform",
"body": {
"lesson": "trade_plan",
"symbol": "{{symbol}}",
"verdict": "plan_fails_a_check",
"stop_close": "{{stop}}",
"reward_2to1": "{{rr}}",
"as_of": "{{as_of}}"
}
}
],
"dry_run": true
}Response JSON (HD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"stop": {
"yes_no": 0.097,
"rule": "(C > swinglow(5, 1)) and (C - swinglow(5, 1) < 1.5 * atr(14))",
"basis": "pattern"
},
"rr": {
"yes_no": 0.1341,
"rule": "(C > swinglow(5, 1)) and (C < swinghigh(5, 1)) and (swinghigh(5, 1) - C >= 2 * (C - swinglow(5, 1)))",
"basis": "pattern"
},
"size": {
"yes_no": 0.0859,
"rule": "0.01 / (2 * atr(14) / C) >= 0.25",
"basis": "rule"
},
"liquid": {
"yes_no": 0.9463,
"rule": "avg(C * V, 20) > 50000000",
"basis": "pattern"
},
"stop_hit": {
"yes_no": 0.457
}
},
"context": {
"symbol": "HD",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "plan_ok",
"fired": false,
"status": "skipped"
},
{
"id": "plan_fails",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "course-platform",
"preview": {
"body": {
"lesson": "trade_plan",
"symbol": "HD",
"verdict": "plan_fails_a_check",
"stop_close": 0.097,
"reward_2to1": 0.1341,
"as_of": "2026-10-30"
}
}
}
]
}Trading educator / newsletter · example 17
Lesson: three-candle patterns on GLD
Teach three white soldiers, three black crows, morning star and evening star on a commodity fund.
- StateGLD
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"GLD"} The server fills in the latest completed session.
Questions
soldiers | English → rule | Are the last three candles three white soldiers? |
crows | English → rule | Are the last three candles three black crows? |
morning | rule | morning_star()morning star candle: A red bar, a small bar (half its body or less) that stays under its close, then a green bar closing above the middle of the first. |
evening | rule | evening_star()evening star candle: A green bar, a small bar that stays above its close, then a red bar closing below the middle of the first. |
spinning | English → rule | Is today's candle a spinning top? |
Answers
| Question | Answer | Reading |
|---|---|---|
soldiersAre the last three candles three white soldiers compiled to three_white_soldiers() | 0.064 | false |
crowsAre the last three candles three black crows compiled to three_black_crows() | 0.0907 | false |
morningmorning star candle: A red bar, a small bar (half its body or less) that stays under its close, then a green bar closing above the middle of the first. | 0.0643 | false |
eveningevening star candle: A green bar, a small bar that stays above its close, then a red bar closing below the middle of the first. | 0.1476 | false |
spinningIs today's candle a spinning top compiled to spinning_top() | 0.0625 | false |
What it means
For GLD on the session of 2026-10-30: Not true: Are the last three candles three white soldiers; Are the last three candles three black crows; morning star candle: A red bar, a small bar (half its body or less) that stays under its close, then a green bar closing above the middle of the first.; evening star candle: A green bar, a small bar that stays above its close, then a red bar closing below the middle of the first.; Is today's candle a spinning top.
Three-candle patterns need three bars to line up, which is why they are rarer than one-bar candles.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "GLD"
},
"questions": {
"soldiers": {
"type": "yes_no",
"instructions": "Are the last three candles three white soldiers?"
},
"crows": {
"type": "yes_no",
"instructions": "Are the last three candles three black crows?"
},
"morning": {
"type": "yes_no",
"ask": "morning_star()"
},
"evening": {
"type": "yes_no",
"ask": "evening_star()"
},
"spinning": {
"type": "yes_no",
"instructions": "Is today's candle a spinning top?"
}
}
}Response JSON (GLD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"soldiers": {
"yes_no": 0.064,
"rule": "three_white_soldiers()",
"basis": "pattern"
},
"crows": {
"yes_no": 0.0907,
"rule": "three_black_crows()",
"basis": "pattern"
},
"morning": {
"yes_no": 0.0643,
"rule": "morning_star()",
"basis": "rule"
},
"evening": {
"yes_no": 0.1476,
"rule": "evening_star()",
"basis": "rule"
},
"spinning": {
"yes_no": 0.0625,
"rule": "spinning_top()",
"basis": "pattern"
}
},
"context": {
"symbol": "GLD",
"as_of": "2026-10-30"
}
}evening_star morning_star spinning_top three_black_crows three_white_soldiers
Trading educator / newsletter · example 18
Advanced lesson: linear regression, percent rank and bars-since on MU
For advanced students: three functions that measure slope, rank and time, on one stock.
- StateMU
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"MU"} The server fills in the latest completed session.
Questions
slope | rule | linreg(C, 20) > ref(linreg(C, 20), -5)20-day regression line rising over a week |
rank | rule | percentrank(C, 252) > 80close in the top fifth of the last year |
since | rule | barssince(C > highest(C, 20)) <= 10a 20-day closing breakout within the last 10 sessions |
high_age | rule | highestbars(H, 60) <= 5the 60-day high set in the last 5 sessions |
low_age | rule | lowestbars(L, 60) >= 40the 60-day low at least 40 sessions old |
Answers
| Question | Answer | Reading |
|---|---|---|
slope20-day regression line rising over a week | 0.5669 | on the line (true) |
rankclose in the top fifth of the last year | 0.08 | false |
sincea 20-day closing breakout within the last 10 sessions | 0.121 | false |
high_agethe 60-day high set in the last 5 sessions | 0.1334 | false |
low_agethe 60-day low at least 40 sessions old | 0.8782 | true |
What it means
For MU on the session of 2026-10-30: True now: the 60-day low at least 40 sessions old. Not true: close in the top fifth of the last year; a 20-day closing breakout within the last 10 sessions; the 60-day high set in the last 5 sessions. On the line: 20-day regression line rising over a week.
These functions answer how steep, how high relative to history and how long ago; together they describe a trend's age.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "MU"
},
"questions": {
"slope": {
"type": "yes_no",
"ask": "linreg(C, 20) > ref(linreg(C, 20), -5)"
},
"rank": {
"type": "yes_no",
"ask": "percentrank(C, 252) > 80"
},
"since": {
"type": "yes_no",
"ask": "barssince(C > highest(C, 20)) <= 10"
},
"high_age": {
"type": "yes_no",
"ask": "highestbars(H, 60) <= 5"
},
"low_age": {
"type": "yes_no",
"ask": "lowestbars(L, 60) >= 40"
}
}
}Response JSON (MU, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"slope": {
"yes_no": 0.5669,
"rule": "linreg(C, 20) > ref(linreg(C, 20), -5)",
"basis": "rule"
},
"rank": {
"yes_no": 0.08,
"rule": "percentrank(C, 252) > 80",
"basis": "rule"
},
"since": {
"yes_no": 0.121,
"rule": "barssince(C > highest(C, 20)) <= 10",
"basis": "rule"
},
"high_age": {
"yes_no": 0.1334,
"rule": "highestbars(H, 60) <= 5",
"basis": "rule"
},
"low_age": {
"yes_no": 0.8782,
"rule": "lowestbars(L, 60) >= 40",
"basis": "rule"
}
},
"context": {
"symbol": "MU",
"as_of": "2026-10-30"
}
}barssince highest highestbars linreg lowestbars percentrank ref
Trading educator / newsletter · example 19
Cohort challenge: which bank stock has the cleanest uptrend?
A weekly challenge where students rank four banks; the answers are posted after submissions close.
- State4 symbols
- Questions4 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"JPM"} then BAC, WFC, C, one request each. The server fills in the latest completed session.
Questions
stacked | rule | C > ema(C, 20) and ema(C, 20) > sma(C, 50) and sma(C, 50) > sma(C, 200)Stacked averages: close > 20 EMA > 50 > 200 |
adx | rule | adx(14) > 20 and diplus(14) > diminus(14)Trending up (ADX over 20 and +DI over −DI) |
obv | rule | obv() > sma(obv(), 20)On-balance volume above its 20-day average |
beat_spy | forecast | Will it beat SPY over the next month? Beating SPY over a month |
Answers
| Symbol | stackedrule | adxrule | obvrule | beat_spyforecast | Fired |
|---|---|---|---|---|---|
JPM | 0.2309 | 0.1012 | 0.8817 | 0.488 | reveal |
BAC | 0.0899 | 0.1214 | 0.3948 | 0.473 | reveal |
WFC | 0.1697 | 0.1271 | 0.9212 | 0.505 | reveal |
C | 0.057 | 0.0891 | 0.6861 | 0.476 | reveal |
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.
stacked >= 0→Slackcohort-channel{
"text": "Challenge reveal JPM (2026-10-30): stacked averages 23%, ADX uptrend 10%, OBV rising 88%, beat SPY next month 49%."
}{
"text": "Challenge reveal BAC (2026-10-30): stacked averages 9%, ADX uptrend 12%, OBV rising 39%, beat SPY next month 47%."
}{
"text": "Challenge reveal WFC (2026-10-30): stacked averages 17%, ADX uptrend 13%, OBV rising 92%, beat SPY next month 50%."
}{
"text": "Challenge reveal C (2026-10-30): stacked averages 6%, ADX uptrend 9%, OBV rising 69%, beat SPY next month 48%."
}What it means
Session of 2026-10-30, 4 symbols: Stacked averages: close > 20 EMA > 50 > 200: true for none of 4. Trending up (ADX over 20 and +DI over −DI): true for none of 4. On-balance volume above its 20-day average: true for JPM, WFC, C of 4. Highest odds for “Beating SPY over a month”: WFC at 51%. reveal fired for JPM, BAC, WFC, C.
Students compare their ranking with the rule answers; the forecast column reminds them that a clean trend is not a guarantee.
Request JSON (JPM; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "JPM"
},
"questions": {
"stacked": {
"type": "yes_no",
"ask": "C > ema(C, 20) and ema(C, 20) > sma(C, 50) and sma(C, 50) > sma(C, 200)"
},
"adx": {
"type": "yes_no",
"ask": "adx(14) > 20 and diplus(14) > diminus(14)"
},
"obv": {
"type": "yes_no",
"ask": "obv() > sma(obv(), 20)"
},
"beat_spy": {
"type": "yes_no",
"instructions": "Will it beat SPY over the next month?"
}
},
"actions": [
{
"id": "reveal",
"when": "stacked >= 0",
"do": "slack",
"connection": "cohort-channel",
"message": "Challenge reveal {{symbol}} ({{as_of}}): stacked averages {{stacked|pct}}, ADX uptrend {{adx|pct}}, OBV rising {{obv|pct}}, beat SPY next month {{beat_spy|pct}}."
}
],
"dry_run": true
}Response JSON (JPM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"stacked": {
"yes_no": 0.2309,
"rule": "C > ema(C, 20) and ema(C, 20) > sma(C, 50) and sma(C, 50) > sma(C, 200)",
"basis": "rule"
},
"adx": {
"yes_no": 0.1012,
"rule": "adx(14) > 20 and diplus(14) > diminus(14)",
"basis": "rule"
},
"obv": {
"yes_no": 0.8817,
"rule": "obv() > sma(obv(), 20)",
"basis": "rule"
},
"beat_spy": {
"yes_no": 0.488
}
},
"context": {
"symbol": "JPM",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "reveal",
"fired": true,
"status": "dry_run",
"do": "slack",
"connection": "cohort-channel",
"preview": {
"text": "Challenge reveal JPM (2026-10-30): stacked averages 23%, ADX uptrend 10%, OBV rising 88%, beat SPY next month 49%."
}
}
]
}Trading educator / newsletter · example 20
Lesson: inside bars, outside bars and NR7 on BA
Teach range contraction and expansion bars with live answers.
- StateBA
- Questions5 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"BA"} The server fills in the latest completed session.
Questions
inside | rule | inside_bar()inside bar candle: Today's high and low are inside yesterday's (equal counts). |
outside | rule | outside_bar()outside bar candle: Today's high above yesterday's and low below it. |
nr7 | English → rule | Is today an NR7 day, the narrowest range of the last 7 sessions? |
marubozu | rule | marubozu()marubozu candle: Body at least 90% of the range: almost no wicks. |
big | forecast | Will there be a big move in either direction in the next 5 days? A big move either way in 5 days |
Answers
| Question | Answer | Reading |
|---|---|---|
insideinside bar candle: Today's high and low are inside yesterday's (equal counts). | 0.6355 | true |
outsideoutside bar candle: Today's high above yesterday's and low below it. | 0.2043 | false |
nr7Is today an NR7 day, the narrowest range of the last 7 sessions compiled to (H > L) and ((H - L) <= ref(min(H - L, 6), -1)) | 0.5326 | on the line (true) |
marubozumarubozu candle: Body at least 90% of the range: almost no wicks. | 0.0655 | false |
bigA big move either way in 5 days | 0.172 | 17% · unlikely |
Actions
Rules on the answers decide what to send.
inside >= 0.6 or nr7 >= 0.6→Emailstudents{
"subject": "Homework: contraction bar on BA",
"text": "BA (2026-10-30) printed an inside bar (64%) or an NR7 (53%). Big move in 5 days: 17%. Track what happens next."
}What it means
For BA on the session of 2026-10-30: True now: inside bar candle: Today's high and low are inside yesterday's (equal counts).. Not true: outside bar candle: Today's high above yesterday's and low below it.; marubozu candle: Body at least 90% of the range: almost no wicks.. On the line: Is today an NR7 day, the narrowest range of the last 7 sessions. Forecasts: A big move either way in 5 days 17%. Fired: setup (Email → students).
Contraction bars often come before expansion; the forecast for a big move lets students test that idea on real odds.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "BA"
},
"questions": {
"inside": {
"type": "yes_no",
"ask": "inside_bar()"
},
"outside": {
"type": "yes_no",
"ask": "outside_bar()"
},
"nr7": {
"type": "yes_no",
"instructions": "Is today an NR7 day, the narrowest range of the last 7 sessions?"
},
"marubozu": {
"type": "yes_no",
"ask": "marubozu()"
},
"big": {
"type": "yes_no",
"instructions": "Will there be a big move in either direction in the next 5 days?"
}
},
"actions": [
{
"id": "setup",
"when": "inside >= 0.6 or nr7 >= 0.6",
"do": "email",
"connection": "students",
"subject": "Homework: contraction bar on {{symbol}}",
"message": "{{symbol}} ({{as_of}}) printed an inside bar ({{inside|pct}}) or an NR7 ({{nr7|pct}}). Big move in 5 days: {{big|pct}}. Track what happens next."
}
],
"dry_run": true
}Response JSON (BA, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"inside": {
"yes_no": 0.6355,
"rule": "inside_bar()",
"basis": "rule"
},
"outside": {
"yes_no": 0.2043,
"rule": "outside_bar()",
"basis": "rule"
},
"nr7": {
"yes_no": 0.5326,
"rule": "(H > L) and ((H - L) <= ref(min(H - L, 6), -1))",
"basis": "pattern"
},
"marubozu": {
"yes_no": 0.0655,
"rule": "marubozu()",
"basis": "rule"
},
"big": {
"yes_no": 0.172
}
},
"context": {
"symbol": "BA",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "setup",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "students",
"preview": {
"subject": "Homework: contraction bar on BA",
"text": "BA (2026-10-30) printed an inside bar (64%) or an NR7 (53%). Big move in 5 days: 17%. Track what happens next."
}
}
]
}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: Quant developer, Fintech app builder, Robo-advisor, Broker app, Algo / bot developer, Data vendor / platform.