MACD momentum — learning guide
What this process optimises for
MACD momentum is built around histogram direction: when the MACD histogram is sufficiently positive, the flow may emit buy; when sufficiently negative, sell; otherwise the path resolves to hold after additional checks. The template begins with a spread filter because momentum signals are often small relative to transaction costs—widening max_spread lets more ticks through but may erode edge; tightening it reduces trades but emphasises quality execution conditions.
In JayBot’s J-Trading flow diagram, the MACD conditions are not wrapped in a named evaluator like rsi_threshold; they use the generic left / op / right comparison shape on condition nodes. Here left points at market.indicators.macd_hist, op is gt or lt, and right is a small numeric threshold (defaults near zero). That pattern is flexible: you are comparing an indicator field to a constant. Understanding that mapping is essential when you tune right—you are changing how “strong” the histogram must be before the branch fires.
Spread gate then branching tree
From start, the flow hits spread_ok (spread_below). The true edge continues to macd_bullish; the false edge goes straight to hold—if spread is unacceptable, there is no point in reading momentum. macd_bullish tests whether histogram is above its threshold; true leads to buy. false falls through to macd_bearish, which tests the downside; true leads to sell, false to hold.
This sequencing means bullish momentum is tried first. That ordering is a design choice embedded in the template, not a universal truth about markets. If you reversed edges in a custom flow you would change priority—but in this insights playground you cannot alter topology, only configuration numbers.
Parameters you can realistically tune
- max_spread on spread_ok: Primary liquidity gate. Document your broker’s typical spreads per pair before picking a number.
- right on macd_bullish / macd_bearish: Effectively sensitivity. Larger positive right on the bullish node demands a stronger positive histogram; more negative right on the bearish node demands a stronger negative reading. Symmetry is not required—you might want stricter entries on one side if your research says so.
- op and left are usually left alone unless you know exactly how the evaluator resolves paths in the engine; changing left to a different indicator path would change the meaning entirely.
Presets and applying to your account
Presets capture your favourite numbers per template_id (macd_momentum). Each saved version is a full merged_rules_json snapshot plus overrides_json for transparency. Apply writes into your strategy row—creation asks for a name; update asks for strategy_id. Published versions (strategy_versions table) are still managed from Strategy management if you use publish/rollback there; template preset versions are a separate history focused on template tuning.
Relationship to “Trading strategies” and “Trading processes”
System templates (read-only cyan dots) teach defaults. Trading processes lists strategies you created or copied—editable green dots. After Apply, your new or updated strategy behaves like any other user flow for enable/disable and sharing, subject to permissions.
AI delta explanations
OpenAI sees only the diff of node configs versus the canonical template, not your password or broker keys. Explanations help interpret threshold tweaks. They are not backtests. Each call uses AI credits.
Caveats
MACD is lagging. Fast markets can print a signal just as spread widens. Always combine systematic rules with operational controls (kill switch, position limits) outside this diagram.
Study sequence
- Locate macd_hist in your evaluation context docs or sample JSON.
- Adjust right on one side only; read the AI summary.
- Save preset v1, revert max_spread, save v2—compare versions list.
- Apply when you can explain both branches in one sentence each.
Histogram vs signal line (conceptual)
Many traders discuss MACD as two lines and a histogram. This template keys off histogram sign and magnitude relative to thresholds, not crossovers of signal lines. If you later build a custom flow (outside this locked playground) you could branch on different indicator fields—but here the pedagogy is: momentum direction with a cost gate. When you widen max_spread, you are saying “I will accept worse execution to see more momentum attempts,” which can be valid for research and dangerous for live automation without monitoring.
Execution and timeframe reminders
The template does not embed a timeframe selector in the JSON; your runtime symbol, candle feed, and bot configuration determine what market.indicators contains. The same numeric threshold on macd_hist can mean different things on M1 vs H1. Before applying parameters tuned in isolation, confirm the evaluation context you use in JayBot matches the assumptions you had while reading this page.
Correlation with other JayBot features
If you later attach risk_json or external position limits, those layers stack on top of whatever intent this flow emits. Momentum templates can flip intent quickly; ensure downstream risk code tolerates rapid buy/sell alternation without violating max exposure. The diagram alone never sees your account leverage—it only outputs a discrete choice among buy, sell, and hold for a given evaluation tick.
If you maintain a personal changelog (spreadsheet, Notion, or plain text) alongside JayBot preset versions, note why each OpenAI summary convinced you to accept or reject a tweak. Months later, that context is more valuable than the raw JSON diff because it captures intent, not just numbers.
Momentum strategies sometimes benefit from asymmetric thresholds: bulls and bears do not owe each other mathematical symmetry. If your research shows downside moves accelerate faster in your universe, tighter bearish right values might be justified. Document that asymmetry so future-you does not “fix” it back to parity by accident.
When you teach teammates using this insights page, have them predict the AI paragraph before pressing explain—like checking answers in a textbook. The exercise builds intuition faster than passive reading because it forces explicit hypotheses about how numeric tweaks propagate through the narrative description.
Keep screenshots of the flow with annotations when you file support issues—visual context accelerates debugging more than a wall of JSON, especially when you are mid-session and stressed.
This guide is for education inside JayBot. It is not financial advice.