QT Risk Guard — User Guide
Version 0.2.0 · Risk plugin for the Quantower trading platform · included with your QT Risk Manager license
QT Risk Guard is your risk officer inside Quantower. It watches every account, and when a rule is broken — daily loss, profit target, trailing drawdown, too many trades, trading outside your hours — it locks the account in Quantower: orders are then refused from every panel (chart, DOM, Order Entry, the QT Risk Manager indicator), and open positions are closed.
Contents
- Installation
- Quick start
- The panel
- Rules
- Locks and the emergency unlock
- Changing settings during the session
- Templates
- Formulas
- Settings reference
- License
- Important notes and limitations
- Troubleshooting
- Version history
1. Installation
Requirements: Windows and Quantower 1.146 or later (see the QT Risk Manager indicator guide for .NET 10).
- Download
QtRiskGuard.dllfrom Downloads in your account at qtriskmanager.com. - Close Quantower.
- Copy it into
<Quantower folder>\Settings\Scripts\plug-ins\QtRiskGuard\(create the folder). - Start Quantower. Click the Quantower logo (top left), search QT Risk Guard and open it. Click the star to pin it to the toolbar.
QT Risk Guard starts with Quantower and protects your accounts even when its panel is closed.
2. Quick start
- Open the panel settings (the ☰ menu of the panel → Settings).
- If you already entered your key in the QT Risk Manager indicator on this computer, nothing to do; otherwise type it in License key.
- Open the section of your account and set, for example, Max daily loss = 500 and Daily profit target = 1000. Click OK.
- The account row shows
Tradingand your limits. When a limit is reached the row turns red and the account is locked until the next session.
Every setting is explained, with examples, in the Settings reference.
3. The panel
Toolbar
| Button | What it does |
|---|---|
| Flatten all | Cancels all working orders and closes all positions of all accounts (click twice to confirm) |
| Lock all | Locks all accounts until the end of the session |
| Timeout Nm | Locks all accounts for N minutes (Timeout duration) |
| Lock 10m / Lock 1h / … | Locks the selected accounts for that time (durations in Lock buttons) |
| Lock session | Locks the selected accounts until the end of the session |
| No groups / By firm / … | Groups the accounts by firm and/or type, with subtotals |
| Show hidden | Shows the hidden accounts |
Buttons that lock or close need a second click within 3 seconds (Click again to confirm).
Account table — Account, Firm, Type, Balance, Day P&L (closed + open of the session), Open, Drawdown (from the peak), Trades (today / max), Max loss, Target, Trail level, Status. Optional columns are chosen in the settings. A Total row sums all visible accounts.
- Select an account with a click; Ctrl + click adds/removes one; Shift + click selects a range.
- Right-click an account: lock for a time or for the session, flatten, apply or save a template, hide/show, Details (all values and the variables usable in formulas).
- Hidden accounts are shown as
{name}when Show hidden is on. They are still protected. 300 → 500*in a limit column means a change that will apply from the next session (see section 6).⇄next to the trade count: the account uses its copy-trading leader's trades (see Copy trading leader in section 9).- On a row with Rules suspended, Resume rules turns the account's rules back on before the next session.
Status
| Status | Meaning |
|---|---|
| Trading | No lock |
Loss limit … · locked to HH:mm (red) |
A loss/profit/trailing limit was reached: locked and kept flat |
Max trades … · to HH:mm, Locked 1h · to HH:mm, Outside trading hours · to HH:mm (amber) |
Locked by a rule or by you |
| Rules suspended (emergency) | After an emergency unlock, until the next session |
| Locked (not by Risk Guard) | Locked by Quantower or another tool |
4. Rules
All rules are per account and 0 / empty = off.
Daily loss limit / profit target — the session P&L (closed trades + open positions) reaches −Max daily loss or +Daily profit target: the account is locked until the next session and flattened (orders cancelled, positions closed). A position opened later on that account (for example from your broker's web platform) is closed at once.
Max trades per day — counts your entries (orders that open or add to a position) in the session. When the count reaches the maximum the account is locked until the next session. The trade that is open keeps its stop and target and closes normally.
- Copy trading: on a follower account set Copy trading leader to the leader account. The follower then uses the leader's trade count (copies are not counted twice) and locks together with the leader. If the follower has no maximum of its own, the leader's maximum is used.
Max position size — an order that would take a position over the size (contracts per symbol) is cancelled; if a position gets over it anyway (fast fill), the excess is closed.
Trailing drawdown — like prop-firm accounts: the account is locked and flattened when equity falls to peak − trailing drawdown.
- Intraday: the peak follows live equity (open P&L included). End of day: the peak moves only with the closed balance at the start of each session.
- Trailing stops at: the level stops rising at this balance (e.g. your starting balance).
- Trailing lock: minutes to stay locked after a breach, 0 = rest of the session.
Trading hours — outside [Trading starts, Trading ends] (your computer's local time) the account is locked until the next start. Flatten at: every day at that time the account is flattened and locked until the next trading window.
Session — a new session starts every day at Session reset hour (UTC): daily counters reset and session locks end. CME futures: 22 (23 in winter). Restarting Quantower does not reset anything: the session trades are reloaded from your broker and the lock is kept by Quantower.
5. Locks and the emergency unlock
- Locks are Quantower's own account locks: they also stop DOM, Order Entry and other tools, and they are restored after a restart. If the account is unlocked in any other way, QT Risk Guard locks it again within a second.
- Closing is always possible while locked: you can still close a position or let its stop/target work.
Emergency unlock (for real emergencies, e.g. a wrong limit): on a locked row click Emergency unlock… (twice). A 15-minute cool-down starts (Unlock at HH:mm, you can cancel it). After it, click Unlock now (rules off) twice: the account is unlocked and all its rules are suspended until the next session. Resume rules turns them back on at any time. Every step is written to the Event log.
6. Changing settings during the session
- Before your first trade of the session every change applies immediately.
- After it, a change that makes a rule stricter applies immediately (lower loss limit, fewer trades, adding trading hours); a change that would allow more trading (higher or removed limit, changed hours, another copy-trading leader, changed formula) applies from the next session. The panel shows it as
300 → 500*/Trading · changes pending. - The session reset hour always changes from the next session.
This is what makes a limit binding: it cannot be lifted to keep trading after a bad start.
7. Templates
A template is a risk profile (all rules, hours and formulas; not firm, type or hidden) saved as a file.
- Save: right-click an account → Save as template (name = the account's Template name, or the account name).
- Apply: select one or more accounts → right-click → Apply template: name. The usual timing rules apply (section 6).
- Import / export: right-click → Open templates folder; templates are
.jsonfiles you can copy between computers.
8. Formulas
Formulas replace the built-in calculation of Open P&L, Closed P&L, Total P&L (used by the daily limits), Drawdown and the Trailing balance (the level that locks the account when equity falls to it). Empty = built-in.
- Variables in brackets:
[balance],[equity],[open pnl],[closed pnl],[total pnl],[peak],[peak open pnl],[day start balance],[trades],[positions],[drawdown], plus every numeric value your connection reports (right-click → Details lists them). - Operators:
+ - * /,> < >= <= == !=,&& ||, parentheses; functionsIF(condition, a, b),MAX(…),MIN(…),ABS(x). - Example (trailing that locks half of the best open profit after +1,000):
IF([peak open pnl] >= 1000, [balance] + [peak open pnl] * 0.5, [balance] - 1000) - A formula with an error is ignored (the built-in value is used); the account shows ⚠ and Details explains the error.
9. Settings reference
Open the settings from the ☰ menu of the panel → Settings. There is a General section and one section per account (closed by default: click its title to open it). Click OK to apply.
"When it applies" in the tables below: now = immediately; next session = from the next session start, if you already traded in the current session (before your first trade of the session, every change applies now — see section 6).
General
| Setting | Default | Values | When it applies |
|---|---|---|---|
| License key | empty | Your QT Risk Manager key | now |
| License in use | — | Read-only | — |
| Session reset hour (UTC) | 22 | 0–23 | always next session |
| Timeout duration (minutes) | 15 | 1–1440 | now |
| Lock buttons (minutes) | 10, 60 | Up to 5 durations, comma separated | now |
| Group accounts | No groups | No groups / By firm / By type / By firm and type | now |
| Show hidden accounts | off | on / off | now |
| Column: … | on (Connection: off) | on / off | now |
- License key — leave it empty if you already entered your key in the QT Risk Manager indicator on this computer: QT Risk Guard uses the same key. Type a key only to use a different one.
- License in use — grey, read-only: the last 4 characters of the key in use and its status, e.g.
…FW7Q · ✓ valid (beta). If you see an error here, the rules are not enforced. - Session reset hour (UTC) — the hour your trading day starts. At that moment the daily P&L and trade count go back to zero, locks "until the next session" end and pending changes become active. For CME futures use 22 while the US is on daylight saving time, 23 in winter (17:00 Chicago). For stocks you can use the hour before your market opens. Example: 22 → the day runs from 22:00 UTC to 22:00 UTC the next day.
- Timeout duration — how long the Timeout button locks all accounts. Example: 15 → a quick break after a bad trade.
- Lock buttons — one toolbar button per duration, applied to the selected accounts. Example:
5, 30, 120gives Lock 5m, Lock 30m, Lock 2h. - Group accounts / Show hidden accounts — also switchable from the toolbar.
- Column: Connection, Firm, Type, Balance, Open, Drawdown, Trades, Max loss, Target, Trail level — show or hide each column. On narrow panels only the essential columns are shown.
Per account — labels
| Setting | Default | Values | When it applies |
|---|---|---|---|
| Firm | empty | Any text | now |
| Type | empty | Any text | now |
| Hidden | off | on / off | now |
| Template name | empty | Any text | now |
- Firm — the prop firm or broker, e.g.
Topstep,Apex. Used by Group accounts. - Type — e.g.
Evaluation,Funded,Live. Used by Group accounts. - Hidden — the account is not listed (unless Show hidden is on, then it appears as
{name}). It is still protected by its rules. Also from right-click → Hide account. - Template name — the name used by right-click → Save as template. Empty = the account name.
Per account — daily limits
| Setting | Default | Values | When it applies |
|---|---|---|---|
| Max daily loss ($, 0 = off) | 0 | ≥ 0 | lower: now · higher or 0: next session |
| Daily profit target ($, 0 = off) | 0 | ≥ 0 | lower: now · higher or 0: next session |
| Max trades per day (0 = off) | 0 | 0–1000 | lower: now · higher or 0: next session |
| Copy trading leader | (this account) | Any of your accounts | first time: now · change or remove: next session |
| Max position size (contracts, 0 = off) | 0 | ≥ 0 | lower: now · higher or 0: next session |
- Max daily loss — when the session P&L (closed trades plus open positions) falls to −value, the account is locked until the next session and flattened: working orders are cancelled and positions closed. Example: 500 → at −$500.00 the day is over, even if the loss is still open.
- Daily profit target — the same at +value: the good day is protected. Example: 1000.
- Max trades per day — counts your entries of the session: every order that opens or adds to a position counts once (also if it fills in several parts); exits do not count. When the count reaches the maximum the account is locked until the next session; the trade just opened keeps its stop and target and can be closed normally. Example: 3 → you can take 3 trades, the account locks right after the third entry. The Trades column shows
2/3. - Copy trading leader — for a follower account of a copy-trading group: choose the leader. The follower then uses the leader's trade count (copies are not counted twice, partial copies do not add up) and locks together with the leader. If the follower's own Max trades per day is 0, the leader's maximum is used. The Trades column shows
⇄next to the count. Daily loss/profit and trailing still use the follower's own P&L. - Max position size — the maximum contracts in one symbol (net position). An order that would take the position over it is cancelled; if a position gets over it anyway (e.g. a fast fill), the excess is closed. Example: 5 →
Buy 3with 3 already open is cancelled (6 > 5).
Per account — trailing drawdown
| Setting | Default | Values | When it applies |
|---|---|---|---|
| Trailing drawdown ($, 0 = off) | 0 | ≥ 0 | lower: now · higher or 0: next session |
| Trailing mode | Intraday (live equity) | Intraday / End of day | to Intraday: now · to End of day: next session |
| Trailing stops at (balance, 0 = never) | 0 | ≥ 0 | higher: now · lower or 0: next session |
| Trailing lock (minutes, 0 = rest of session) | 0 | 0–1440 | longer: now · shorter: next session |
- Trailing drawdown — the account is locked and flattened when equity (balance + open P&L) falls to peak − value. The Trail level column shows that level (amber when you are close to it). Example: 2000 on a $50,000 account → the level starts at $48,000 and rises with every new peak.
- Trailing mode — Intraday: the peak follows live equity, open profits included (strictest). End of day: the peak moves only with the closed balance at each session start, as many prop firms do.
- Trailing stops at — the level stops rising at this balance. Example: 50000 → after a peak of $53,000 the level is $50,000 (not $51,000), like evaluations whose trailing drawdown stops at the starting balance.
- Trailing lock — how long the account stays locked after a trailing breach: 0 = until the next session. The rule fires again only after equity has gone back above the level.
Per account — trading hours
| Setting | Default | Values | When it applies |
|---|---|---|---|
| Trading starts (HH:mm, local) | empty | e.g. 15:30 | first time: now · change or remove: next session |
| Trading ends (HH:mm, local) | empty | e.g. 21:45 | first time: now · change or remove: next session |
| Flatten at (HH:mm, local) | empty | e.g. 21:55 | first time: now · change or remove: next session |
Times are in your computer's local time.
- Trading starts / ends — outside this window the account is locked (status
Outside trading hours) until the next start. Only a start: no trading before it. Only an end: no trading after it, until the next session. A window can cross midnight (e.g. 22:00 → 03:00). - Flatten at — every day at this time the account is flattened and locked until the next trading window (or the next session). Example: 21:55 → nothing is left open into the close.
Per account — formulas
| Setting | Default | When it applies |
|---|---|---|
| Formula: open P&L | empty (built-in) | next session |
| Formula: closed P&L | empty (built-in) | next session |
| Formula: total P&L (used by the daily limits) | empty (built-in) | next session |
| Formula: drawdown | empty (built-in) | next session |
| Formula: trailing balance (lock when equity ≤ value) | empty (built-in) | next session |
Any change to a formula waits for the next session once you have traded (a formula decides how your limits are computed). See section 8 for the syntax and the variables. The Trailing balance formula replaces the trailing drawdown settings.
Example: a $50,000 prop evaluation
Firm rules (example): daily loss $1,000, trailing drawdown $2,500 end-of-day that stops at the starting balance, no trading after 15:55 Chicago.
| Setting | Value | Why |
|---|---|---|
| Firm / Type | MyFirm / Evaluation |
Grouping |
| Max daily loss | 800 | Below the firm's $1,000: slippage never decides |
| Daily profit target | 1200 | Protect good days and the trailing drawdown |
| Max trades per day | 4 | No overtrading |
| Max position size | 5 | The evaluation's contract limit |
| Trailing drawdown | 2300 | Inside the firm's $2,500 |
| Trailing mode | End of day | Same as the firm |
| Trailing stops at | 50000 | Same as the firm |
| Flatten at | 22:50 (Italy) | 15:50 Chicago, before the firm's cut-off |
Then right-click the account → Save as template, select your other evaluation accounts → Apply template.
Example: copy trading
Leader ACC-1 and followers ACC-2, ACC-3 copying it. On ACC-1 set Max trades per day = 3. On ACC-2 and ACC-3 set Copy trading leader = ACC-1 (and leave their Max trades per day at 0). After the third trade of the leader, all three accounts lock together.
10. License
QT Risk Guard uses your QT Risk Manager license (the same key, the same computer slot as the indicator). The license line appears in the panel only for beta licenses or problems. Without a valid license the rules are not applied (locks already active stay until their end).
11. Important notes and limitations
- One computer. Rules work while Quantower is running on this computer. If you trade the same account from another computer or from your broker's platform while Quantower is closed, QT Risk Guard cannot stop it (when Quantower starts again, the session trades are counted and any limit is applied).
- Not a broker-side limit. Uninstalling the plugin or trading elsewhere bypasses it: it is a discipline tool, not a replacement for your broker's or prop firm's own risk rules.
- P&L. Net P&L when the connection reports it, otherwise gross (many demo accounts). Use formulas to match your firm's rules.
- Trading hours use your computer's local time.
12. Troubleshooting
| Symptom | What to do |
|---|---|
Red banner License: … |
Enter your key in the settings, or check your license in your account |
A limit is shown as 300 → 500* |
The change applies from the next session (section 6) |
| ⚠ next to an account | A formula has an error: right-click → Details |
| The account is locked and you do not know why | The Status column and the Quantower Event log ([QT Risk Guard]) show every lock with its reason |
| The panel is not in the list | Check the file is in Settings\Scripts\plug-ins\QtRiskGuard\ and Quantower is 1.146 or later |
13. Version history
| Version | Changes |
|---|---|
| 0.2.0 | First release: multi-account dashboard, daily loss/profit target, max trades per day (copy-trading leader), max position size, trailing drawdown, trading hours and scheduled flatten, timed locks, templates, formulas, emergency unlock, license (bundle with QT Risk Manager) |