Ora
All use cases All industries

Individuals

Retail investorActive day traderSwing traderOptions traderDividend investorLong-term passive investorCrypto traderFX traderCommodities traderSocial trading communityStudents and universities

Buy side

Financial advisor / RIAWealth managerFamily officeHedge fund PMQuant researcherPortfolio manager (long-only)Risk managerPrivate equityVC / growth investorFund-of-funds allocator

Sell side

Equity research analystSell-side sales traderExecution trader / deskMarket makerProp trading firmCompliance officer

Corporates

Investor relations teamCorporate treasuryCFO officeBank credit analystFinancial journalist / media

Builders

Quant developerFintech app builderRobo-advisorBroker appAlgo / bot developerData vendor / platformTrading educator / newsletter

Institutions

ETF issuerIndex providerInsurance investment officePension fundEndowmentSovereign wealth fund

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.

Answers were captured on 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.

ora-fin-0.1.1AAPL5 questions
  1. StateAAPL
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"AAPL"} The server fills in the latest completed session.

Questions

smaruleC > sma(C, 20)
Close above the 20-day simple average
emaruleC > ema(C, 20)
Close above the 20-day exponential average
wmaruleC > wma(C, 20)
Close above the 20-day weighted average
enEnglish → ruleIs the stock above its 50-day moving average?
up_weekforecastWill the stock be higher in a week?
Higher in a week

Answers

QuestionAnswerReading
sma
Close above the 20-day simple average
0.6713true
ema
Close above the 20-day exponential average
0.7079true
wma
Close above the 20-day weighted average
0.5536on the line (true)
en
Is the stock above its 50-day moving average
compiled to C > sma(C, 50)
0.9119true
up_week
Higher in a week
0.5959% · 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"
  }
}

ema sma wma

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.

ora-fin-0.1.1MSFT5 questions
  1. StateMSFT
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"MSFT"} The server fills in the latest completed session.

Questions

rsi50rulersi(C, 14) > 50
RSI above 50
obEnglish → ruleIs the stock overbought on RSI, above 70?
osEnglish → ruleIs the stock oversold on RSI, below 30?
x30English → ruleDid RSI cross above 30 today?
rsi2rulersi(C, 2) < 10
Two-day RSI under 10

Answers

QuestionAnswerReading
rsi50
RSI above 50
0.4101on the line (false)
ob
Is the stock overbought on RSI, above 70
compiled to rsi(C, 14) > 70
0.0537false
os
Is the stock oversold on RSI, below 30
compiled to rsi(C, 14) < 30
0.0557false
x30
Did RSI cross above 30 today
compiled to (rsi(C, 14) > 30) and (ref(rsi(C, 14), -1) <= 30)
0.0537false
rsi2
Two-day RSI under 10
0.5812on 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"
  }
}

ref rsi

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.

ora-fin-0.1.1SPY6 questions
  1. StateSPY
  2. Questions6 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"SPY"} The server fills in the latest completed session.

Questions

dojiruledoji()
doji candle: Body at most 10% of the day's range.
hammerrulehammer()
hammer candle: Lower wick at least twice the body, upper wick at most 10% of the range, closing below the close five bars back.
engulfruleengulfing_bull()
engulfing bull candle: A green body that engulfs yesterday's red body.
marubozurulemarubozu()
marubozu candle: Body at least 90% of the range: almost no wicks.
outsideruleoutside_bar()
outside bar candle: Today's high above yesterday's and low below it.
insideruleinside_bar()
inside bar candle: Today's high and low are inside yesterday's (equal counts).

Answers

QuestionAnswerReading
doji
doji candle: Body at most 10% of the day's range.
0.0579false
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.
0.0941false
engulf
engulfing bull candle: A green body that engulfs yesterday's red body.
0.0597false
marubozu
marubozu candle: Body at least 90% of the range: almost no wicks.
0.0537false
outside
outside bar candle: Today's high above yesterday's and low below it.
0.0614false
inside
inside bar candle: Today's high and low are inside yesterday's (equal counts).
0.0537false

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"
  }
}

doji engulfing_bull hammer inside_bar marubozu outside_bar

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).

ora-fin-0.1.1JPM5 questions
  1. StateJPM
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"JPM"} The server fills in the latest completed session.

Questions

beatEnglish → ruleDid the stock beat EPS estimates last quarter?
surpriseEnglish → ruleDid EPS beat estimates by more than 5% last quarter?
revEnglish → ruleDid revenue beat estimates last quarter?
eps_gEnglish → ruleDid EPS grow more than 10% year over year?
nextforecastWill the stock beat earnings next quarter?
Beating earnings next quarter

Answers

QuestionAnswerReading
beat
Did the stock beat EPS estimates last quarter
compiled to beat_eps_last > 0.5
0.1409false
surprise
Did EPS beat estimates by more than 5% last quarter
compiled to eps_surprise_pct > 5
0.0844false
rev
Did revenue beat estimates last quarter
compiled to beat_revenue_last > 0.5
0.1409false
eps_g
Did EPS grow more than 10% year over year
compiled to eps_growth_yoy > 10
0.6893true
next
Beating earnings next quarter
0.50651% · 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.

ora-fin-0.1.12 symbols, one request each5 questions
  1. State2 symbols
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"JNJ"} then KO, one request each. The server fills in the latest completed session.

Questions

yield3English → ruleIs the dividend yield above 3%?
grow25English → ruleHas the stock grown its dividend for 25 years in a row?
quarterlyrulediv_count_ttm >= 4
Pays at least quarterly
raisedruleraised_last > 0.5
Raised its last dividend
raise_nextforecastWill the company raise its dividend next year?
Raising the dividend next year

Answers

Symbolyield3rulegrow25rulequarterlyruleraisedruleraise_nextforecast
JNJ0.06480.94630.550.14090.495
KO0.05370.06830.550.14090.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"
  }
}

div_count_ttm div_yield_ttm raised_last years_of_growth

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.

ora-fin-0.1.12 symbols, one request each5 questions
  1. State2 symbols
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"NVDA"} then AAPL, one request each. The server fills in the latest completed session.

Questions

split3yruledays_since_split <= 1095
Split in the last three years
ratio4rulelast_split_ratio >= 4
Last split at least 4-for-1
reverseEnglish → ruleWas the last split a reverse split?
multirulesplits_5y >= 2
Two or more splits in five years
comingEnglish → ruleIs a stock split coming up?

Answers

Symbolsplit3yruleratio4rulereverserulemultirulecomingrule
NVDA0.94630.94630.14090.14090.0537
AAPL0.05370.550.14090.06830.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.

ora-fin-0.1.1TSLA5 questions
  1. StateTSLA
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"TSLA"} The server fills in the latest completed session.

Questions

atrruleatr_pct(14) > 3
A typical day moves more than 3%
hvrulestd(log(C / C[-1]), 20) * sqrt(252) > 0.5
20-day annualized volatility above 50%
trruletr() > 1.5 * ref(atr(14), -1)
True range 1.5× yesterday's ATR
compressrulestd(C, 10) < 0.5 * std(C, 50)
Swings less than half their 50-day size
vol_upforecastWill volatility be higher over the next month?
Higher volatility next month

Answers

QuestionAnswerReading
atr
A typical day moves more than 3%
0.848true
hv
20-day annualized volatility above 50%
0.1042false
tr
True range 1.5× yesterday's ATR
0.2396false
compress
Swings less than half their 50-day size
0.1204false
vol_up
Higher volatility next month
0.44645% · 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"
  }
}

atr atr_pct log offset ref sqrt std tr

Students and universities · example 8

Lesson 8: Bollinger Bands on QQQ

See where price sits against the bands and learn what a squeeze means.

ora-fin-0.1.1QQQ5 questions
  1. StateQQQ
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"QQQ"} The server fills in the latest completed session.

Questions

upperEnglish → ruleDid the stock close above the upper Bollinger Band?
lowerEnglish → ruleDid the stock close below the lower Bollinger Band?
midEnglish → ruleIs the stock above the middle Bollinger Band?
squeezerule(bbupper(C, 20, 2) - bblower(C, 20, 2)) / bbmid(C, 20) < 0.06
Bollinger bands narrower than 6% of price
pctbEnglish → ruleIs Bollinger %B below 0.2?

Answers

QuestionAnswerReading
upper
Did the stock close above the upper Bollinger Band
compiled to C > bbupper(C, 20)
0.0537false
lower
Did the stock close below the lower Bollinger Band
compiled to C < bblower(C, 20)
0.4523on the line (false)
mid
Is the stock above the middle Bollinger Band
compiled to C > bbmid(C, 20)
0.0645false
squeeze
Bollinger bands narrower than 6% of price
0.0789false
pctb
Is Bollinger %B below 0.2
compiled to (C - bblower(C, 20)) / (bbupper(C, 20) - bblower(C, 20)) < 0.2
0.7604true

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"
  }
}

bblower bbmid bbupper

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.

ora-fin-0.1.1AMD5 questions
  1. StateAMD
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"AMD"} The server fills in the latest completed session.

Questions

zeroEnglish → ruleIs MACD above zero?
signalEnglish → ruleIs the MACD line above its signal line?
histEnglish → ruleIs the MACD histogram rising?
xupEnglish → ruleDid MACD cross above its signal line today?
xdnEnglish → ruleDid MACD cross below its signal line today?

Answers

QuestionAnswerReading
zero
Is MACD above zero
compiled to macd(C) > 0
0.2479false
signal
Is the MACD line above its signal line
compiled to macd(C) > macdsignal(C)
0.2076false
hist
Is the MACD histogram rising
compiled to macdhist(C) > ref(macdhist(C), -1)
0.0938false
xup
Did MACD cross above its signal line today
compiled to (macd(C) > macdsignal(C)) and (ref(macd(C), -1) <= ref(macdsignal(C), -1))
0.2076false
xdn
Did MACD cross below its signal line today
compiled to (macd(C) < macdsignal(C)) and (ref(macd(C), -1) >= ref(macdsignal(C), -1))
0.3188false

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"
  }
}

macd macdhist macdsignal ref

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.

ora-fin-0.1.1HD5 questions
  1. StateHD
  2. Questions5 asked
  3. Answersreal, captured
  4. Actionsnone

State

{"symbol":"HD"} The server fills in the latest completed session.

Questions

hhruleswinghigh(3, 1) > swinghigh(3, 2)
Latest swing high above the one before
hlruleswinglow(3, 1) > swinglow(3, 2)
Latest swing low above the one before
above_shruleC > swinghigh(5)
Above its last confirmed swing high
near_supEnglish → ruleIs the stock within 2% above its last swing low (support)?
break_resforecastWill it break above resistance this week?
Breaking resistance this week

Answers

QuestionAnswerReading
hh
Latest swing high above the one before
0.0537false
hl
Latest swing low above the one before
0.0732false
above_sh
Above its last confirmed swing high
0.1048false
near_sup
Is the stock within 2% above its last swing low (support)
compiled to (C >= swinglow(5, 1)) and (C <= swinglow(5, 1) * 1.02)
0.0877false
break_res
Breaking resistance this week
0.46246% · 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"
  }
}

swinghigh swinglow

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.

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