Mean reversion (RSI) — learning guide
Purpose of this trading process
The Mean reversion (RSI) template implements a fade-the-extreme style rule set: when RSI is very low, the flow may signal buy; when RSI is very high, it may signal sell; otherwise it holds. It is suited to range-bound or pullback environments where price tends to snap back toward a local mean. In strong one-way trends, the same logic can produce premature counter-trend signals, which is why the template layers filters and risk rules before the RSI conditions run.
JayBot expresses this as a J-Trading flow diagram: sequential filter nodes (session, spread, volatility), then risk_rule nodes (open trades, drawdown), then a trend gate condition, then RSI threshold conditions, then actions. The visual layout mirrors execution order: anything that fails a gate stops progress down the “happy path” and typically routes toward hold or an early exit from the chain depending on edge wiring.
Node-by-node intuition
filter_session uses session_is with a default list such as london and new_york. That means the strategy may ignore signals outside those sessions (exact behaviour depends on how your context supplies session). Tightening or broadening the session list changes when the rest of the stack is even considered.
filter_spread enforces spread_below with max_spread. A smaller number is stricter: you only proceed when the market is “cheap” to trade in spread terms. Raising max_spread allows more marginal liquidity conditions—sometimes necessary on exotic pairs, sometimes harmful on majors if execution quality drops.
filter_volatility uses volatility_above with min_volatility. This tries to skip dead markets where mean-reversion edges are tiny relative to costs. Lowering min_volatility lets quieter markets through; raising it demands more movement before the RSI logic engages.
risk_trades (open_trades_below) caps concurrent exposure. risk_drawdown (drawdown_below) blocks new risk when account drawdown exceeds max_pct. These are protective rails; tuning them changes how aggressively the process can stack positions or trade through a losing streak.
trend_gate applies price_vs_ema with a long period (default 200). In the stock template this is a coarse “only fade when price context agrees” idea—exactly how you interpret it should match your research. Changing period or op alters how often that gate opens.
rsi_oversold and rsi_overbought use rsi_threshold with period (default 14), op (lt vs gt), and value (defaults near 30 and 70). Narrowing the band (e.g. 25 / 75) means fewer but more extreme signals; widening (e.g. 35 / 65) generates more trades but weaker extremes.
Editing in the playground vs changing the system template
The built-in template JSON in JayBot is read-only for users. The playground lets you change configuration fields on existing nodes only—edges and node types stay fixed. When you save a preset version, JayBot stores both the merged rules and the overrides map. When you apply, a user-owned strategy row is created or updated under Trading strategies; that row is what autotrade and evaluation can use. The sidebar label Trading processes groups those user flows separately from the cyan system template entries.
Version control mental model
Think of a preset as a named experiment line (“RSI strict spread”, “RSI London only v2”). Each Save version is an immutable snapshot you can reload. This is not Git: there are no merges or pull requests, but you can always load version n, tweak, and save n+1. Good hygiene: short notes on the preset (if you add them in the UI) or a consistent naming convention so you remember what each version tested.
AI explanations and credits
When your draft differs from the canonical template defaults, the Explain changes (AI) feature calls OpenAI and deducts credits from your balance using the same metering as other AI endpoints. The model describes configuration deltas in plain language. It does not know your account size or live positions unless you pass that elsewhere; treat output as educational.
Limitations
RSI is a single indicator; regimes change. Spread, latency, and rollover can dominate PnL on short holding periods. No template replaces paper or demo validation. Use hold-heavy designs when uncertain—they are valid outcomes.
Learning exercises
- Trace from start to buy on paper, listing each true edge.
- Raise max_spread slightly and observe the AI summary of what changed.
- Save two versions: one “tight” and one “loose” RSI band; compare explanations.
- Apply only after you can narrate the full path aloud without the diagram.
When mean reversion fails gracefully
The best mean-reversion bots often do nothing most of the time. If you find yourself increasing RSI extremes only to “get more trades,” pause and ask whether you are forcing a regime where another template (trend or breakout) would be more honest. The hold action exists so the account can sit out ambiguity. In live trading, capital preservation during the wrong regime matters as much as catching a single good fade.
Glossary quick reference
- RSI: Relative Strength Index, a bounded oscillator; JayBot supplies it under
market.indicatorsin evaluation context. - Oversold / overbought: Colloquial labels for low / high RSI; not guarantees of reversal.
- Preset version: A numbered snapshot of your tuned parameters for this template id.
- Apply: Copies merged logic into a user strategy row the engine can load when enabled.
Optional narrative: building intuition with paper traces
Print the node list and, for each condition, write a one-line English translation (“Are we in London or New York?” “Is spread below 0.0003?”). Tape that next to your monitor while you tune. Traders who can narrate their automation rarely confuse parameter noise with alpha. When something breaks in production, that same narration becomes the checklist you use to see whether a filter tightened, a gate inverted, or data stopped updating.
Finally, remember that labels on filters and risk nodes are only human-readable hints inside config; they do not change engine math unless your evaluator reads them. Renaming “Spread Filter” to “My spread” does nothing functional—but it can help teammates understand screenshots during code reviews or support tickets.
This guide is for education inside JayBot. It is not financial advice.