RISKMANAGER · TRADE MANAGEMENT

← Dashboard

Overview

Everything the EA can do to a position or a pending order after it exists. Today it's all driven from the chart dashboard (page 1, trade-management section) — this page is the inventory we'll draw on to decide what to surface on 7r4d3 and Telegram.

Three badges to read the tables by:

MANUAL you click it, it acts once AUTO a rule the EA watches and fires on its own SYMBOL / ACCOUNT what it acts on
Unless a row says ACCOUNT, a tool touches only the current symbol's positions/orders. The one account-wide exception is Equity TP/SL.
Annotate freely. Where I was unsure what you intend (vs. what the code does), I've left a CONFIRM note. Correct anything and I'll fold it back into the EA and this page.

Closes & partials

ControlKindScopeWhat it does
30 / 50 / 70 %MANUALSYMBOL Closes that fraction of each open position on the symbol (rounded down to the lot step, min one lot).
Close SymMANUALSYMBOL Closes all positions on the symbol. If one is in profit, a 75% chance it first nudges that SL a random amount toward price — a footprint touch, not a management rule.
Close AllMANUALACCOUNT Closes every open position on the account.
Cancel AllMANUALSYMBOL Deletes pending orders on the symbol, including the hidden armed order if one is set.

Breakeven

Move BE MANUAL SYMBOL — sets the stop to the entry price on every position on the symbol (skips any already at breakeven). The automatic version is the BE matrix below.

Matrices — automatic tripwires

A "matrix" is a one-shot price/time tripwire you place on the chart. Switching one on draws three draggable lines: an upper and a lower price line (seeded ±1 SL-distance around price — where SL-distance is your SL% of the prior daily range) and, on sub-H4 charts, an end-of-day vertical line. Drag them to wherever you want the trip to sit.

It fires the instant bid ≥ the upper line, ask ≤ the lower line, or the clock reaches the time line — does its one action, then switches itself off. All four share this mechanism and differ only in the action:

MatrixOn tripScope
EXIT.MTXClose all positions on the symbol.SYMBOL
PART.MTXClose 50% of the symbol's positions.SYMBOL
BE.MTXMove the stop to entry on the symbol.SYMBOL
CNCL.MTXCancel pending + hidden armed orders on the symbol.SYMBOL

Matrices survive a restart — their on/off state and line positions are saved to terminal global variables and restored on re-init.

CONFIRM — partials matrix amount. The partials matrix closes a fixed 50%. Want that configurable (e.g. match the 30/50/70 buttons), or is 50% right?

Trailing stops

Trailing has a source and a mode. The source is which swing it follows; the mode is what it does with it.

ControlRoleWhat it does
H1 / H4Source Follow the most recent H1 or H4 swing and draw a dotted line there. Visual only on their own, and mutually exclusive — turning one on turns the other off.
H.T (hidden trail)Soft stop Closes all symbol positions when price touches the trail line — the broker never sees a stop there. Only ever tightens (never widens). Needs H1 or H4 selected.
TRL (auto-trail)Hard stop Physically moves the real SL up to the trail level as it advances (protective direction only). Needs H1 or H4 selected.
So: H1/H4 = show me the line. H.T = act on it myself, invisibly. TRL = put it at the broker as a real stop.

CHCH exit

CHCH EXIT AUTO SYMBOL — arm it and it closes the symbol's positions the moment the H1-swing structure changes character against your trade: long → the uptrend swing low breaks; short → the downtrend swing high breaks. It reads the same M15-thrust (H1) swings, and the same definition, as the CHCH alert — so the event that pings you and the event that exits you are the same thing.

Close cousin of Hidden Trail (H1), but locked to the alert's structural definition rather than a ratcheting price-touch. Lives on the +LOT row.

Take-profit tools

Fixed R:R

When you arm an order, its TP is placed at a reward:risk multiple of the stop distance, from your presets InpRR1 / InpRR2 / InpRR3 (defaults 1 / 2 / 3).

Smart TP — a pace advisor

An advisory read-out (it labels the chart; it does not auto-close). It scores how far ahead of schedule the trade is:

score = p² / t

t fraction of the trading day elapsed p fraction of the TP range reached (base → target)
≥ 2.5 HEAVY — way ahead ≥ 1.5 MOD — comfortably ahead ≥ 1.0 LIGHT — slightly ahead < 1.0 HOLD — on pace / behind

Scoring starts only after 10% of the day has elapsed (avoids early noise). The idea: the faster you reach a level relative to the time of day, the more aggressively it suggests banking profit.

CONFIRM — Smart TP modes. The button cycles OFF → ● → ★. Both ● and ★ run the same score; I couldn't tell from the code what distinguishes them (heavier target set? display only?). What's the intended difference?

Equity TP / SL

AUTO ACCOUNT — the only account-wide tool. You arm each with a percent; the EA snapshots your balance at arm time as the baseline, then watches equity:

The label shows the live dollar target for the current balance. Can't arm at 0%.

What we'd expose to Telegram

Candidates for the per-account buttons, once we get there — roughly in order of usefulness on a phone:

Your call. Tell me which of these you actually want on Telegram and I'll scope the buttons + commands around them.