Guides / Rule playground
Rule playground · about 8 min
Combining conditions
Join rules with and, or and not, see what each does to the belief, and avoid the precedence trap.
Three parts on AAPL
Trend, momentum and volume, asked as separate questions and combined in several ways:
{ "model": "ora-fin1", "state": { "symbol": "AAPL" }, "questions": { "trend": { "type": "yes_no", "ask": "C > sma(C, 50)" }, "momentum": { "type": "yes_no", "ask": "rsi(C, 14) > 50" }, "volume": { "type": "yes_no", "ask": "V > 1.5 * avg(V, 20)" }, "all_three": { "type": "yes_no", "ask": "C > sma(C, 50) and rsi(C, 14) > 50 and V > 1.5 * avg(V, 20)" }, "any_of": { "type": "yes_no", "ask": "C > sma(C, 50) or rsi(C, 14) > 50 or V > 1.5 * avg(V, 20)" }, "no_parens": { "type": "yes_no", "ask": "C > sma(C, 50) or rsi(C, 14) > 50 and V > 1.5 * avg(V, 20)" }, "parens": { "type": "yes_no", "ask": "(C > sma(C, 50) or rsi(C, 14) > 50) and V > 1.5 * avg(V, 20)" }, "not_trend": { "type": "yes_no", "ask": "not C > sma(C, 50)" } } }Open this in the PlaygroundThe answers
Session of 2026-10-30:
Question Rule Belief trendC > sma(C, 50)0.9119 momentumrsi(C, 14) > 500.8179 volumeV > 1.5 * avg(V, 20)0.7437 all_threeC > sma(C, 50) and rsi(C, 14) > 50 and V > 1.5 * avg(V, 20)0.7437 any_ofC > sma(C, 50) or rsi(C, 14) > 50 or V > 1.5 * avg(V, 20)0.9119 no_parensC > sma(C, 50) or rsi(C, 14) > 50 and V > 1.5 * avg(V, 20)0.9119 parens(C > sma(C, 50) or rsi(C, 14) > 50) and V > 1.5 * avg(V, 20)0.7437 not_trendnot C > sma(C, 50)0.0881 and takes the weakest part
all_threeis 0.7437, the lowest of 0.9119, 0.8179 and 0.7437. One weak condition holds a setup down, which is the point: a setup is only as true as its least true part.or takes the strongest
any_ofis 0.9119, the highest of the three. Use it for alternatives: either of two patterns, or a regime switch.Brackets change the meaning
andbinds tighter thanor. Without brackets,a or b and cisa or (b and c): 0.9119. With them,(a or b) and cis 0.7437. Bracket every mix.not flips it
not C > sma(C, 50)is 1 − 0.9119 = 0.0881. It is the same as writingC <= sma(C, 50).Ask the parts too
Send each condition as its own question next to the combined one. It costs a few tokens and tells you which part decided the answer.
Information, not investment advice. Every number on this page is a real response for the session shown; answers change with each session.