RISKMANAGER · DOCS

← Dashboard

Overview

RiskManager is a pre-committed game-plan trading system. The idea is to move the risk decision out of the moment of temptation: you set a plan before the session, and the system enforces it during. It has three parts that share one contract.

PartWhat it isWhere
MT5 EAThe engine and the hands — computes market structure, draws setups, sends orders, enforces the plan. The single source of truth.RiskManager.mq5 / .mq4
Web bridgeA zero-dependency Node server. Stores each EA's state, relays commands, hosts the dashboard and the journal.webapp/server.mjs7r4d3.net
Phone appThe dashboard installed as a PWA — same code, home-screen icon, push alerts.Install from 7r4d3.net

Design rule: the EA computes, the web app displays. No swing, trend or FVG is ever recalculated in the browser — every value shown was computed by the EA and shipped in its state snapshot. One source of truth.

The Daily Journal

The journal records what state each chart is in at set times through the day. You return to the charts at those moments and log an observation per symbol. Some fields AUTO the EA can compute and fill for you; others MANUAL are your judgement.

The old spreadsheet codes (T0, p, T1…) are renamed to be self-explanatory. The mapping and definitions below are the working reference — the schema file journal-schema.json is the single source, so correcting a definition there updates the table, the storage and this page's intent together.

Two stores, one table. The per-symbol columns (Prior Day, Session Gap, the analysis calls) are a property of the market — identical for every account — so they live in one shared store that a master EA fills once; every client sees the same values. Habits, Trade and Stance are personal, stored per client. The table you see is the two merged. So there is no reason for ten EAs to each report the same market data: one master EA writes the shared columns, and each client only records their own discipline.

View controls sit above the table: Compact swaps the friendly labels for the short codes (T0, x, p…) and tightens the cells; Habits / Trade collapse those groups; and a Symbols chooser shows a subset — so the few symbols you trade today fit in one view.

The day, in order

When (ET)FieldWasSrcWhat it records
daily closePrior DayT0:TypeAUTOType of yesterday's closed daily candle (G/Y/B/R).
new openFlow Callp:MANYour prediction of which way flow breaks (u/d/i/o).
00:00Stalk HitT1AUTODid price reach the daily stalk zone (t/f).
07:00Session GapT2AUTOGap between price and the 19:45 session open (t/f).
09:00Range PlayT3MANHow RTH will interact with the overnight range.
any timeHTF Breakx:AUTOWeekly / Mx high or low breached (xW / xMx).
12:00Midday CallT4MANPredicted day-type outcome (G/Y/B/R).
end of dayResultRAUTOActual realised day type.
pre-sessionStanceStanceMANThe day's strategy — home run, base hits, preserve, manage.

Prior Day (was T0) — the daily candle type

Fixed the moment yesterday's daily candle closes, classified by Period Trend (defined below):

G period-trend change — the trend flipped vs the prior period Y moved against the period trend, but did NOT flip it B with the period trend (continuation)
Period Trend is the journal's own trend concept, set by the previous closed candle: break its high → period up trend; break its low → period down trend. It is deliberately simpler than the algo's flow (below), and is the definition the journal uses for Prior Day, Midday Call and Result.
R — parked. Every R (period-trend change + algo-trend change) is also a G (period-trend change), so R is not yet a distinct category. Skipped for now; you'll zero in on what R should capture later. The active classification is G / Y / B.
Modifiers — to define later. The base letter often carries a suffix or prefix seen in the sheet: !, ?, b, c, g, and compounds like Y.G?, G!c, Yb. These apply to Prior Day, Midday Call and Result (e.g. pGc, pYb in the close codes). Parked until you define them; the cells accept them as free text in the meantime.

Flow Call (was p) — your break prediction

Made when the new daily candle opens. It predicts which way flow breaks, not where the candle closes:

u breaks the high (up) d breaks the low (down) i breaks neither (inside) o breaks both (outside) multiple letters = unsure, could be either

A candidate for a machine-learning prediction later; manual for now.

Range Play (was T3) — RTH vs the overnight range

At 09:00, before the 09:30 open: how will the day session interact with the overnight session's range? i = internal, e = external.

ii stays inside the overnight range, never exits ie into the internal range first, then breaks external ei external, then internal ee external eea one external side to the other eeb launches external and keeps going, never looking back

The other fields

Habits (Sleep, Fuel, Exercise, Discipline, 0-10) and Trade (Forced? Reacted? Overleveraged? Homerun?) round out each row.

Weekends: only BTC and ETH stay editable; the 24×5 symbols hatch out.

What MT5 Looks At

The definitions the EA computes and the journal draws on. This section is my current understanding — flag anything off and it gets corrected here. Deep detail lives in TRADING_SYSTEM.md and the Pine source ThrustStructure.pine.

Period Trend, Flow & Trend

Period Trend — the journal's trend, and the simplest: it is set by the previous closed candle. Break that candle's high and the period trend is up; break its low and it is down. Prior Day, Midday Call and Result are all classified by it. This is separate from the algo's flow below — the algo's flow is right for the algo, but the journal wanted its own definition.

Flow (tFlow) is the algo's micro directional state from the thrust engine. Starting 'up', when price breaks below the lowest low of the last 4 bars, flow flips to 'down' and the highest high since becomes a swing high; the mirror flips it back up. A flow change is this flip. It drives the engine's setups — not the journal's Period Trend.

Trend (tTrend) is bigger, set by a break of structure (BOS) — price breaking a confirmed swing. It was the algo half of the parked R definition; unused by the journal until R is pinned down.

The three engines

EngineTimeframeWhat it produces
M15 Thrust15-minutePivots, thrusts, swing high/low, flow, trend, BOS vs CHOCH, dealing-range %. The primary structure engine.
H4 Thrust4-hourThe same structure one level up, used for higher-timeframe agreement.
M5 Close-Trend5-minuteThe ctrend close-based trend; flips drive the M5 close-trend alert.

Core terms

Web App Features

Phone App (PWA)

Open 7r4d3.net in Chrome and Install app (or the Install button in the header). It lands on your home screen, opens full-screen, and can push alerts even when closed.

Web Push is implemented from node:crypto alone (RFC 8291 payload encryption + RFC 8292 VAPID), so the bridge stays zero-dependency.

Not wired yet: the EA still sends alerts only to Discord. The POST /api/alert hook that reaches the phone is live and tested; the EA needs a one-line call added next to SendDiscordAlert to use it.

The Updater

Infrastructure

Execution Footprint

Measures to keep automated trading from reading as automated. Full audit in EXECUTION-FOOTPRINT.md.

To Define / In Progress

The living list — ambiguities to resolve and work queued. This is the place to catch mis-defined things.

Prior-Day modifiers — the meaning of !, ?, b, c, g and compounds like Y.G? is still open. (You said "later".)
R value — parked. Every R is also a G, so it is not yet a distinct category. Zero in on what R should uniquely capture, then it rejoins G / Y / B.
Result (R) column — confirm the rightmost per-symbol column is today's realised day type, not something else. (Distinct from the R value above.)
Period Trend — defined. Prior Day / Midday Call / Result now use Period Trend (break the previous candle's high = up, its low = down), separate from the algo's flow.
T4 colour codespY / pG / pB and the c / ! variants seen in the sheet need mapping.
EA → push alert — add the POST /api/alert call so phone alerts fire, not just Discord.
Auto-capture — live. Prior Day, Session Gap, Stalk Hit, HTF Break (weekly) and Result all compute in the EA and fill the shared market store (6.12+ EAs).
Mx breach (xMx) — HTF Break does weekly now; the Mx (options-expiry period) high/low breach still needs the expiry-boundary logic ported from the H1 Thrust Structure Pine.
Session Gap "1 deviation" — implemented as 1× the opening-range size (price beyond ORhigh+range or ORlow−range). Confirm that is the deviation you mean.
Flow Call ML — a model to predict the daily flow break, replacing the manual call.