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 1–10 of 20 · page 1 of 2
Students and universities · example 1
Lesson 1: moving averages on AAPL (SMA, EMA, WMA)
Learn how three kinds of moving average weigh recent prices differently, by asking the same question with each one.
- StateAAPL
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"AAPL"} The server fills in the latest completed session.
Questions
sma | rule | C > sma(C, 20)Close above the 20-day simple average |
ema | rule | C > ema(C, 20)Close above the 20-day exponential average |
wma | rule | C > wma(C, 20)Close above the 20-day weighted average |
en | English → rule | Is the stock above its 50-day moving average? |
up_week | forecast | Will the stock be higher in a week? Higher in a week |
Answers
| Question | Answer | Reading |
|---|---|---|
smaClose above the 20-day simple average | 0.6713 | true |
emaClose above the 20-day exponential average | 0.7079 | true |
wmaClose above the 20-day weighted average | 0.5536 | on the line (true) |
enIs the stock above its 50-day moving average compiled to C > sma(C, 50) | 0.9119 | true |
up_weekHigher in a week | 0.59 | 59% · close to even |
What it means
For AAPL on the session of 2026-10-30: True now: Close above the 20-day simple average; Close above the 20-day exponential average; Is the stock above its 50-day moving average. On the line: Close above the 20-day weighted average. Forecasts: Higher in a week 59%.
The lesson: EMA and WMA react faster than SMA, so after a sharp move they can disagree; the English question shows the same idea compiled for you.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "AAPL"
},
"questions": {
"sma": {
"type": "yes_no",
"ask": "C > sma(C, 20)"
},
"ema": {
"type": "yes_no",
"ask": "C > ema(C, 20)"
},
"wma": {
"type": "yes_no",
"ask": "C > wma(C, 20)"
},
"en": {
"type": "yes_no",
"instructions": "Is the stock above its 50-day moving average?"
},
"up_week": {
"type": "yes_no",
"instructions": "Will the stock be higher in a week?"
}
}
}Response JSON (AAPL, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"sma": {
"yes_no": 0.6713,
"rule": "C > sma(C, 20)",
"basis": "rule"
},
"ema": {
"yes_no": 0.7079,
"rule": "C > ema(C, 20)",
"basis": "rule"
},
"wma": {
"yes_no": 0.5536,
"rule": "C > wma(C, 20)",
"basis": "rule"
},
"en": {
"yes_no": 0.9119,
"rule": "C > sma(C, 50)",
"basis": "comparison"
},
"up_week": {
"yes_no": 0.59
}
},
"context": {
"symbol": "AAPL",
"as_of": "2026-10-30"
}
}Students and universities · example 2
Lesson 2: RSI, overbought and oversold, on MSFT
Read RSI at three thresholds and see a crossing event, which is true on far fewer days than a level.
- StateMSFT
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"MSFT"} The server fills in the latest completed session.
Questions
rsi50 | rule | rsi(C, 14) > 50RSI above 50 |
ob | English → rule | Is the stock overbought on RSI, above 70? |
os | English → rule | Is the stock oversold on RSI, below 30? |
x30 | English → rule | Did RSI cross above 30 today? |
rsi2 | rule | rsi(C, 2) < 10Two-day RSI under 10 |
Answers
| Question | Answer | Reading |
|---|---|---|
rsi50RSI above 50 | 0.4101 | on the line (false) |
obIs the stock overbought on RSI, above 70 compiled to rsi(C, 14) > 70 | 0.0537 | false |
osIs the stock oversold on RSI, below 30 compiled to rsi(C, 14) < 30 | 0.0557 | false |
x30Did RSI cross above 30 today compiled to (rsi(C, 14) > 30) and (ref(rsi(C, 14), -1) <= 30) | 0.0537 | false |
rsi2Two-day RSI under 10 | 0.5812 | on the line (true) |
What it means
For MSFT on the session of 2026-10-30: Not true: Is the stock overbought on RSI, above 70; Is the stock oversold on RSI, below 30; Did RSI cross above 30 today. On the line: RSI above 50; Two-day RSI under 10.
Levels describe a state that can last for weeks; crossings are one-day events. Compare RSI(14) with the much faster RSI(2).
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "MSFT"
},
"questions": {
"rsi50": {
"type": "yes_no",
"ask": "rsi(C, 14) > 50"
},
"ob": {
"type": "yes_no",
"instructions": "Is the stock overbought on RSI, above 70?"
},
"os": {
"type": "yes_no",
"instructions": "Is the stock oversold on RSI, below 30?"
},
"x30": {
"type": "yes_no",
"instructions": "Did RSI cross above 30 today?"
},
"rsi2": {
"type": "yes_no",
"ask": "rsi(C, 2) < 10"
}
}
}Response JSON (MSFT, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"rsi50": {
"yes_no": 0.4101,
"rule": "rsi(C, 14) > 50",
"basis": "rule"
},
"ob": {
"yes_no": 0.0537,
"rule": "rsi(C, 14) > 70",
"basis": "pattern"
},
"os": {
"yes_no": 0.0557,
"rule": "rsi(C, 14) < 30",
"basis": "pattern"
},
"x30": {
"yes_no": 0.0537,
"rule": "(rsi(C, 14) > 30) and (ref(rsi(C, 14), -1) <= 30)",
"basis": "comparison"
},
"rsi2": {
"yes_no": 0.5812,
"rule": "rsi(C, 2) < 10",
"basis": "rule"
}
},
"context": {
"symbol": "MSFT",
"as_of": "2026-10-30"
}
}Students and universities · example 3
Lesson 3: candlestick patterns on SPY
Test a set of candle definitions on today's SPY bar and learn what each one requires.
- StateSPY
- Questions6 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"SPY"} The server fills in the latest completed session.
Questions
doji | rule | doji()doji candle: Body at most 10% of the day's range. |
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. |
engulf | rule | engulfing_bull()engulfing bull candle: A green body that engulfs yesterday's red body. |
marubozu | rule | marubozu()marubozu candle: Body at least 90% of the range: almost no wicks. |
outside | rule | outside_bar()outside bar candle: Today's high above yesterday's and low below it. |
inside | rule | inside_bar()inside bar candle: Today's high and low are inside yesterday's (equal counts). |
Answers
| Question | Answer | Reading |
|---|---|---|
dojidoji candle: Body at most 10% of the day's range. | 0.0579 | 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.0941 | false |
engulfengulfing bull candle: A green body that engulfs yesterday's red body. | 0.0597 | false |
marubozumarubozu candle: Body at least 90% of the range: almost no wicks. | 0.0537 | false |
outsideoutside bar candle: Today's high above yesterday's and low below it. | 0.0614 | false |
insideinside bar candle: Today's high and low are inside yesterday's (equal counts). | 0.0537 | false |
What it means
For SPY on the session of 2026-10-30: Not true: doji candle: Body at most 10% of the day's range.; hammer candle: Lower wick at least twice the body, upper wick at most 10% of the range, closing below the close five bars back.; engulfing bull candle: A green body that engulfs yesterday's red body.; marubozu candle: Body at least 90% of the range: almost no wicks.; outside bar candle: Today's high above yesterday's and low below it.; inside bar candle: Today's high and low are inside yesterday's (equal counts)..
Most candles are false on most days; that rarity is why they get names. Look up each definition in the function reference.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "SPY"
},
"questions": {
"doji": {
"type": "yes_no",
"ask": "doji()"
},
"hammer": {
"type": "yes_no",
"ask": "hammer()"
},
"engulf": {
"type": "yes_no",
"ask": "engulfing_bull()"
},
"marubozu": {
"type": "yes_no",
"ask": "marubozu()"
},
"outside": {
"type": "yes_no",
"ask": "outside_bar()"
},
"inside": {
"type": "yes_no",
"ask": "inside_bar()"
}
}
}Response JSON (SPY, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"doji": {
"yes_no": 0.0579,
"rule": "doji()",
"basis": "rule"
},
"hammer": {
"yes_no": 0.0941,
"rule": "hammer()",
"basis": "rule"
},
"engulf": {
"yes_no": 0.0597,
"rule": "engulfing_bull()",
"basis": "rule"
},
"marubozu": {
"yes_no": 0.0537,
"rule": "marubozu()",
"basis": "rule"
},
"outside": {
"yes_no": 0.0614,
"rule": "outside_bar()",
"basis": "rule"
},
"inside": {
"yes_no": 0.0537,
"rule": "inside_bar()",
"basis": "rule"
}
},
"context": {
"symbol": "SPY",
"as_of": "2026-10-30"
}
}Students and universities · example 4
Lesson 4: earnings facts for JPM
Learn the difference between a fact (did the bank beat last quarter) and a forecast (will it beat next quarter).
- StateJPM
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"JPM"} The server fills in the latest completed session.
Questions
beat | English → rule | Did the stock beat EPS estimates last quarter? |
surprise | English → rule | Did EPS beat estimates by more than 5% last quarter? |
rev | English → rule | Did revenue beat estimates last quarter? |
eps_g | English → rule | Did EPS grow more than 10% year over year? |
next | forecast | Will the stock beat earnings next quarter? Beating earnings next quarter |
Answers
| Question | Answer | Reading |
|---|---|---|
beatDid the stock beat EPS estimates last quarter compiled to beat_eps_last > 0.5 | 0.1409 | false |
surpriseDid EPS beat estimates by more than 5% last quarter compiled to eps_surprise_pct > 5 | 0.0844 | false |
revDid revenue beat estimates last quarter compiled to beat_revenue_last > 0.5 | 0.1409 | false |
eps_gDid EPS grow more than 10% year over year compiled to eps_growth_yoy > 10 | 0.6893 | true |
nextBeating earnings next quarter | 0.506 | 51% · close to even |
What it means
For JPM on the session of 2026-10-30: True now: Did EPS grow more than 10% year over year. Not true: Did the stock beat EPS estimates last quarter; Did EPS beat estimates by more than 5% last quarter; Did revenue beat estimates last quarter. Forecasts: Beating earnings next quarter 51%.
Answers with a rule come from the report record; the next-quarter answer has no rule because it is a forecast.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "JPM"
},
"questions": {
"beat": {
"type": "yes_no",
"instructions": "Did the stock beat EPS estimates last quarter?"
},
"surprise": {
"type": "yes_no",
"instructions": "Did EPS beat estimates by more than 5% last quarter?"
},
"rev": {
"type": "yes_no",
"instructions": "Did revenue beat estimates last quarter?"
},
"eps_g": {
"type": "yes_no",
"instructions": "Did EPS grow more than 10% year over year?"
},
"next": {
"type": "yes_no",
"instructions": "Will the stock beat earnings next quarter?"
}
}
}Response JSON (JPM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"beat": {
"yes_no": 0.1409,
"rule": "beat_eps_last > 0.5",
"basis": "pattern"
},
"surprise": {
"yes_no": 0.0844,
"rule": "eps_surprise_pct > 5",
"basis": "pattern"
},
"rev": {
"yes_no": 0.1409,
"rule": "beat_revenue_last > 0.5",
"basis": "pattern"
},
"eps_g": {
"yes_no": 0.6893,
"rule": "eps_growth_yoy > 10",
"basis": "pattern"
},
"next": {
"yes_no": 0.506
}
},
"context": {
"symbol": "JPM",
"as_of": "2026-10-30"
}
}beat_eps_last beat_revenue_last eps_growth_yoy eps_surprise_pct
Students and universities · example 5
Lesson 5: dividend facts on JNJ and KO
Compare two famous dividend payers on yield, growth streak and payment frequency.
- State2 symbols
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"JNJ"} then KO, 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? |
quarterly | rule | div_count_ttm >= 4Pays at least quarterly |
raised | rule | raised_last > 0.5Raised its last dividend |
raise_next | forecast | Will the company raise its dividend next year? Raising the dividend next year |
Answers
| Symbol | yield3rule | grow25rule | quarterlyrule | raisedrule | raise_nextforecast |
|---|---|---|---|---|---|
JNJ | 0.0648 | 0.9463 | 0.55 | 0.1409 | 0.495 |
KO | 0.0537 | 0.0683 | 0.55 | 0.1409 | 0.517 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 2 symbols: Is the dividend yield above 3%: true for none of 2. Has the stock grown its dividend for 25 years in a row: true for JNJ of 2. Pays at least quarterly: true for none of 2. Raised its last dividend: true for none of 2. Highest odds for “Raising the dividend next year”: KO at 52%.
The growth streak counts calendar years of higher totals, so an extra or missing payment in a year can break it: read the definition.
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?"
},
"quarterly": {
"type": "yes_no",
"ask": "div_count_ttm >= 4"
},
"raised": {
"type": "yes_no",
"ask": "raised_last > 0.5"
},
"raise_next": {
"type": "yes_no",
"instructions": "Will the company raise its dividend next year?"
}
}
}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"
},
"quarterly": {
"yes_no": 0.55,
"rule": "div_count_ttm >= 4",
"basis": "rule"
},
"raised": {
"yes_no": 0.1409,
"rule": "raised_last > 0.5",
"basis": "rule"
},
"raise_next": {
"yes_no": 0.495
}
},
"context": {
"symbol": "JNJ",
"as_of": "2026-10-30"
}
}Students and universities · example 6
Lesson 6: stock splits and adjusted prices (NVDA, AAPL)
Learn why charts are split-adjusted, and check each company's split record.
- State2 symbols
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"NVDA"} then AAPL, one request each. The server fills in the latest completed session.
Questions
split3y | rule | days_since_split <= 1095Split in the last three years |
ratio4 | rule | last_split_ratio >= 4Last split at least 4-for-1 |
reverse | English → rule | Was the last split a reverse split? |
multi | rule | splits_5y >= 2Two or more splits in five years |
coming | English → rule | Is a stock split coming up? |
Answers
| Symbol | split3yrule | ratio4rule | reverserule | multirule | comingrule |
|---|---|---|---|---|---|
NVDA | 0.9463 | 0.9463 | 0.1409 | 0.1409 | 0.0537 |
AAPL | 0.0537 | 0.55 | 0.1409 | 0.0683 | 0.0537 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 2 symbols: Split in the last three years: true for NVDA of 2. Last split at least 4-for-1: true for NVDA of 2. Was the last split a reverse split: true for none of 2. Two or more splits in five years: true for none of 2.
A split changes the share count, not the value; prices in the engine are adjusted so a 4-for-1 split does not look like a crash.
Request JSON (NVDA; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "NVDA"
},
"questions": {
"split3y": {
"type": "yes_no",
"ask": "days_since_split <= 1095"
},
"ratio4": {
"type": "yes_no",
"ask": "last_split_ratio >= 4"
},
"reverse": {
"type": "yes_no",
"instructions": "Was the last split a reverse split?"
},
"multi": {
"type": "yes_no",
"ask": "splits_5y >= 2"
},
"coming": {
"type": "yes_no",
"instructions": "Is a stock split coming up?"
}
}
}Response JSON (NVDA, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"split3y": {
"yes_no": 0.9463,
"rule": "days_since_split <= 1095",
"basis": "rule"
},
"ratio4": {
"yes_no": 0.9463,
"rule": "last_split_ratio >= 4",
"basis": "rule"
},
"reverse": {
"yes_no": 0.1409,
"rule": "reverse_split_last > 0.5",
"basis": "pattern"
},
"multi": {
"yes_no": 0.1409,
"rule": "splits_5y >= 2",
"basis": "rule"
},
"coming": {
"yes_no": 0.0537,
"rule": "days_to_split <= 365",
"basis": "pattern"
}
},
"context": {
"symbol": "NVDA",
"as_of": "2026-10-30"
}
}days_since_split days_to_split last_split_ratio reverse_split_last splits_5y
Students and universities · example 7
Lesson 7: measuring volatility on TSLA
Three ways to measure volatility: ATR, standard deviation of returns, and the true range of one bar.
- StateTSLA
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"TSLA"} The server fills in the latest completed session.
Questions
atr | rule | atr_pct(14) > 3A typical day moves more than 3% |
hv | rule | std(log(C / C[-1]), 20) * sqrt(252) > 0.520-day annualized volatility above 50% |
tr | rule | tr() > 1.5 * ref(atr(14), -1)True range 1.5× yesterday's ATR |
compress | rule | std(C, 10) < 0.5 * std(C, 50)Swings less than half their 50-day size |
vol_up | forecast | Will volatility be higher over the next month? Higher volatility next month |
Answers
| Question | Answer | Reading |
|---|---|---|
atrA typical day moves more than 3% | 0.848 | true |
hv20-day annualized volatility above 50% | 0.1042 | false |
trTrue range 1.5× yesterday's ATR | 0.2396 | false |
compressSwings less than half their 50-day size | 0.1204 | false |
vol_upHigher volatility next month | 0.446 | 45% · close to even |
What it means
For TSLA on the session of 2026-10-30: True now: A typical day moves more than 3%. Not true: 20-day annualized volatility above 50%; True range 1.5× yesterday's ATR; Swings less than half their 50-day size. Forecasts: Higher volatility next month 45%.
ATR is in price units, historical volatility in annual percent; the forecast asks about future volatility, which no rule can know.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "TSLA"
},
"questions": {
"atr": {
"type": "yes_no",
"ask": "atr_pct(14) > 3"
},
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.5"
},
"tr": {
"type": "yes_no",
"ask": "tr() > 1.5 * ref(atr(14), -1)"
},
"compress": {
"type": "yes_no",
"ask": "std(C, 10) < 0.5 * std(C, 50)"
},
"vol_up": {
"type": "yes_no",
"instructions": "Will volatility be higher over the next month?"
}
}
}Response JSON (TSLA, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"atr": {
"yes_no": 0.848,
"rule": "atr_pct(14) > 3",
"basis": "rule"
},
"hv": {
"yes_no": 0.1042,
"rule": "std(log(C / C[-1]), 20) * sqrt(252) > 0.5",
"basis": "rule"
},
"tr": {
"yes_no": 0.2396,
"rule": "tr() > 1.5 * ref(atr(14), -1)",
"basis": "rule"
},
"compress": {
"yes_no": 0.1204,
"rule": "std(C, 10) < 0.5 * std(C, 50)",
"basis": "rule"
},
"vol_up": {
"yes_no": 0.446
}
},
"context": {
"symbol": "TSLA",
"as_of": "2026-10-30"
}
}Students and universities · example 8
Lesson 8: Bollinger Bands on QQQ
See where price sits against the bands and learn what a squeeze means.
- StateQQQ
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"QQQ"} The server fills in the latest completed session.
Questions
upper | English → rule | Did the stock close above the upper Bollinger Band? |
lower | English → rule | Did the stock close below the lower Bollinger Band? |
mid | English → rule | Is the stock above the middle Bollinger Band? |
squeeze | rule | (bbupper(C, 20, 2) - bblower(C, 20, 2)) / bbmid(C, 20) < 0.06Bollinger bands narrower than 6% of price |
pctb | English → rule | Is Bollinger %B below 0.2? |
Answers
| Question | Answer | Reading |
|---|---|---|
upperDid the stock close above the upper Bollinger Band compiled to C > bbupper(C, 20) | 0.0537 | false |
lowerDid the stock close below the lower Bollinger Band compiled to C < bblower(C, 20) | 0.4523 | on the line (false) |
midIs the stock above the middle Bollinger Band compiled to C > bbmid(C, 20) | 0.0645 | false |
squeezeBollinger bands narrower than 6% of price | 0.0789 | false |
pctbIs Bollinger %B below 0.2 compiled to (C - bblower(C, 20)) / (bbupper(C, 20) - bblower(C, 20)) < 0.2 | 0.7604 | true |
What it means
For QQQ on the session of 2026-10-30: True now: Is Bollinger %B below 0.2. Not true: Did the stock close above the upper Bollinger Band; Is the stock above the middle Bollinger Band; Bollinger bands narrower than 6% of price. On the line: Did the stock close below the lower Bollinger Band.
The bands are a moving average plus and minus two standard deviations; a squeeze is narrow bands, not a direction.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "QQQ"
},
"questions": {
"upper": {
"type": "yes_no",
"instructions": "Did the stock close above the upper Bollinger Band?"
},
"lower": {
"type": "yes_no",
"instructions": "Did the stock close below the lower Bollinger Band?"
},
"mid": {
"type": "yes_no",
"instructions": "Is the stock above the middle Bollinger Band?"
},
"squeeze": {
"type": "yes_no",
"ask": "(bbupper(C, 20, 2) - bblower(C, 20, 2)) / bbmid(C, 20) < 0.06"
},
"pctb": {
"type": "yes_no",
"instructions": "Is Bollinger %B below 0.2?"
}
}
}Response JSON (QQQ, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"upper": {
"yes_no": 0.0537,
"rule": "C > bbupper(C, 20)",
"basis": "comparison"
},
"lower": {
"yes_no": 0.4523,
"rule": "C < bblower(C, 20)",
"basis": "comparison"
},
"mid": {
"yes_no": 0.0645,
"rule": "C > bbmid(C, 20)",
"basis": "comparison"
},
"squeeze": {
"yes_no": 0.0789,
"rule": "(bbupper(C, 20, 2) - bblower(C, 20, 2)) / bbmid(C, 20) < 0.06",
"basis": "rule"
},
"pctb": {
"yes_no": 0.7604,
"rule": "(C - bblower(C, 20)) / (bbupper(C, 20) - bblower(C, 20)) < 0.2",
"basis": "pattern"
}
},
"context": {
"symbol": "QQQ",
"as_of": "2026-10-30"
}
}Students and universities · example 9
Lesson 9: MACD line, signal and histogram on AMD
Learn the three parts of MACD and which question each one answers.
- StateAMD
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"AMD"} The server fills in the latest completed session.
Questions
zero | English → rule | Is MACD above zero? |
signal | English → rule | Is the MACD line above its signal line? |
hist | English → rule | Is the MACD histogram rising? |
xup | English → rule | Did MACD cross above its signal line today? |
xdn | English → rule | Did MACD cross below its signal line today? |
Answers
| Question | Answer | Reading |
|---|---|---|
zeroIs MACD above zero compiled to macd(C) > 0 | 0.2479 | false |
signalIs the MACD line above its signal line compiled to macd(C) > macdsignal(C) | 0.2076 | false |
histIs the MACD histogram rising compiled to macdhist(C) > ref(macdhist(C), -1) | 0.0938 | false |
xupDid MACD cross above its signal line today compiled to (macd(C) > macdsignal(C)) and (ref(macd(C), -1) <= ref(macdsignal(C), -1)) | 0.2076 | false |
xdnDid MACD cross below its signal line today compiled to (macd(C) < macdsignal(C)) and (ref(macd(C), -1) >= ref(macdsignal(C), -1)) | 0.3188 | false |
What it means
For AMD on the session of 2026-10-30: Not true: Is MACD above zero; Is the MACD line above its signal line; Is the MACD histogram rising; Did MACD cross above its signal line today; Did MACD cross below its signal line today.
Above zero says the short average is above the long one; above signal says momentum is improving; the histogram is the gap between them.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "AMD"
},
"questions": {
"zero": {
"type": "yes_no",
"instructions": "Is MACD above zero?"
},
"signal": {
"type": "yes_no",
"instructions": "Is the MACD line above its signal line?"
},
"hist": {
"type": "yes_no",
"instructions": "Is the MACD histogram rising?"
},
"xup": {
"type": "yes_no",
"instructions": "Did MACD cross above its signal line today?"
},
"xdn": {
"type": "yes_no",
"instructions": "Did MACD cross below its signal line today?"
}
}
}Response JSON (AMD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"zero": {
"yes_no": 0.2479,
"rule": "macd(C) > 0",
"basis": "pattern"
},
"signal": {
"yes_no": 0.2076,
"rule": "macd(C) > macdsignal(C)",
"basis": "comparison"
},
"hist": {
"yes_no": 0.0938,
"rule": "macdhist(C) > ref(macdhist(C), -1)",
"basis": "pattern"
},
"xup": {
"yes_no": 0.2076,
"rule": "(macd(C) > macdsignal(C)) and (ref(macd(C), -1) <= ref(macdsignal(C), -1))",
"basis": "comparison"
},
"xdn": {
"yes_no": 0.3188,
"rule": "(macd(C) < macdsignal(C)) and (ref(macd(C), -1) >= ref(macdsignal(C), -1))",
"basis": "comparison"
}
},
"context": {
"symbol": "AMD",
"as_of": "2026-10-30"
}
}Students and universities · example 10
Lesson 10: swing highs and lows on HD
Learn how swing points are confirmed (only n bars later, so no look-ahead) and how higher lows define an uptrend.
- StateHD
- Questions5 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"HD"} The server fills in the latest completed session.
Questions
hh | rule | swinghigh(3, 1) > swinghigh(3, 2)Latest swing high above the one before |
hl | rule | swinglow(3, 1) > swinglow(3, 2)Latest swing low above the one before |
above_sh | rule | C > swinghigh(5)Above its last confirmed swing high |
near_sup | English → rule | Is the stock within 2% above its last swing low (support)? |
break_res | forecast | Will it break above resistance this week? Breaking resistance this week |
Answers
| Question | Answer | Reading |
|---|---|---|
hhLatest swing high above the one before | 0.0537 | false |
hlLatest swing low above the one before | 0.0732 | false |
above_shAbove its last confirmed swing high | 0.1048 | false |
near_supIs the stock within 2% above its last swing low (support) compiled to (C >= swinglow(5, 1)) and (C <= swinglow(5, 1) * 1.02) | 0.0877 | false |
break_resBreaking resistance this week | 0.462 | 46% · close to even |
What it means
For HD on the session of 2026-10-30: Not true: Latest swing high above the one before; Latest swing low above the one before; Above its last confirmed swing high; Is the stock within 2% above its last swing low (support). Forecasts: Breaking resistance this week 46%.
swinghigh(n, k) is the k-th most recent pivot of strength n; it is known only n bars after the pivot, which keeps backtests honest.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "HD"
},
"questions": {
"hh": {
"type": "yes_no",
"ask": "swinghigh(3, 1) > swinghigh(3, 2)"
},
"hl": {
"type": "yes_no",
"ask": "swinglow(3, 1) > swinglow(3, 2)"
},
"above_sh": {
"type": "yes_no",
"ask": "C > swinghigh(5)"
},
"near_sup": {
"type": "yes_no",
"instructions": "Is the stock within 2% above its last swing low (support)?"
},
"break_res": {
"type": "yes_no",
"instructions": "Will it break above resistance this week?"
}
}
}Response JSON (HD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"hh": {
"yes_no": 0.0537,
"rule": "swinghigh(3, 1) > swinghigh(3, 2)",
"basis": "rule"
},
"hl": {
"yes_no": 0.0732,
"rule": "swinglow(3, 1) > swinglow(3, 2)",
"basis": "rule"
},
"above_sh": {
"yes_no": 0.1048,
"rule": "C > swinghigh(5)",
"basis": "rule"
},
"near_sup": {
"yes_no": 0.0877,
"rule": "(C >= swinglow(5, 1)) and (C <= swinglow(5, 1) * 1.02)",
"basis": "pattern"
},
"break_res": {
"yes_no": 0.462
}
},
"context": {
"symbol": "HD",
"as_of": "2026-10-30"
}
}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.