Prop Firm Risk Guardian User Guide: Setup, Reading the Panel, and Every Setting (Free and PRO)

26 September 2026, 12:21
Yuki Nakayama
0
171

What Prop Firm Risk Guardian is

Prop Firm Risk Guardian is an Expert Advisor that watches the limits of a challenge or funded account: the daily loss, the maximum drawdown and the profit target. It shows how much of each is left, turns the panel amber and then red as the room runs out, and works out, from your stop distance, the largest lot its sizing rules allow now. It does not open positions on its own.

The free edition, Prop Firm Risk Guardian, only displays. Prop Firm Risk Guardian PRO adds an automatic flatten when a limit is breached, a FLATTEN button, SELL and BUY buttons that open the computed max lot (or a smaller lot you pick) with the stop attached, and an optional Auto SL/TP for orders placed outside the panel (off by default). Everything below applies to both editions unless marked Pro only. The screenshots were taken on a demo account or in the strategy tester; their numbers are examples.

Read this first if you use Pro. The flatten reacts after a limit has been reached; it cannot stop an order before it is sent. By default it closes only the positions of the chart symbol (or the symbol you set), whatever their magic number, and leaves pending orders and every other symbol alone; with Flatten closes set to the whole account it closes every symbol's positions. Other EAs and manual trading keep running; the details are under Pro only below.

Prop Firm Risk Guardian on a chart

Quick start

  1. Open a chart of the symbol you trade and drag the EA onto it from the Navigator. A chart holds one EA; if another already runs there, open a second chart of the same symbol. Pro needs Algo Trading switched on in the terminal to close or open anything; the free edition does not trade and does not need it.
  2. In the inputs, pick Language / 言語 (panel text). In the group Account challenge, Starting rules (switch live on panel) offers four types: 2-step (daily loss 5%, max drawdown 10%), 1-step (3% and 6%), instant (4% and 8%) and Custom, the default, which uses the three CUSTOM inputs (starting at 5%, 10% and 10%). The profit target is 10% for every type except Custom. The types are common examples, not the rules of any particular firm: check your firm's rules and use Custom when they differ. Set Daily reset hour (server time, 0-23) to the hour your firm starts a new day, in the broker's server time.
  3. If the challenge has already started, pick its starting balance in Account size (starting balance, account currency), or type the exact amount into Initial balance (0 = detect once per account). With Account size at Auto and Initial balance at 0, the balance when you attach the panel becomes the starting point; amounts are in the account currency.
  4. Click OK. The panel opens in the top-right corner. Check the line to the right of RISK LIMITS: it reads BASELINE, the amount everything is measured from, and when it was taken.
  5. Drag the SL bar to your stop distance. MAX LOT NOW updates as you drag. Hover over most parts of the panel for a one-line explanation at the bottom.

If something looks wrong, see the Frequently asked questions below, written as symptoms.

The baseline: what everything is measured from

Three stored values drive the three gauges: the initial balance, the peak equity and today's daily anchor. They are stored per trading account in the terminal, not per chart, so every chart of the login shows the same numbers and reopening a chart does not refill the gauges.

Initial balance. The max drawdown limit and the profit target are percentages of the initial balance. At 0 in Initial balance (0 = detect once per account) the panel takes the current balance the first time it runs on a login and keeps it; if you attach the panel partway through a challenge, type the starting balance there or pick it in Account size (starting balance, account currency) (Auto, or 5,000 to 500,000 in the account currency, not converted). A size is used, and stored like a typed initial balance, only when the current balance is above that size's max-drawdown floor and below its profit target under the rules selected at start (with 10% / 10%: between 90% and 110% of the size), so a size picked by mistake cannot by itself start the panel in breach or with the target reached; otherwise it is not used, nothing is stored and the baseline is taken as with Auto (the BASELINE line says so). On a yen account the sizes mean yen: type the amount into Initial balance. If both are set, Initial balance wins.

Peak equity. The highest equity seen since the baseline was taken. It only ever rises. The panel does not know the peak you reached before you attached it.

Daily anchor. At the first calculation after the daily reset the panel records the balance (or the equity, see Daily anchor at reset) and measures today's loss from it. On the day you attach the panel, the anchor is the balance at that moment. The initial balance and the daily anchor are written to disk as soon as they are taken, not only when the terminal closes.

The BASELINE line. To the right of RISK LIMITS the panel always shows the initial balance and where it came from:
set with the date and time it was taken;
kept when it was already stored;
input when it comes from the Initial balance or Account size input;
carried over when it was taken over from data an earlier version saved per chart.
The line is amber for ten minutes after a new or carried-over baseline. When the Account size you picked is not used, it reads size not used in amber for as long as the panel runs; the Experts log, a pop-up and the hover say why. Until the account data has arrived it reads BASELINE — in grey. Earlier-version data that does not fit the account (another account's values, for example) is not carried over; the Experts log and a pop-up say so.

Starting over. To restart a challenge on the same login, set Re-take the account baseline now (then set back to false) to true: at the next start the stored values of this account are deleted and taken again, from the current balance, or from Initial balance or Account size when one of them is set. Set it back to false afterwards, or the baseline is taken again at every start, and restart the panel on the other charts of the account so they drop the old peak too.

Deposits and withdrawals. The panel measures loss as a fall in equity. Since 1.17 it reads the account history for withdrawals (balance operations with a negative amount) and leaves those made after today's daily anchor out of today's loss; the daily limit itself does not change. Hovering over DAILY LOSS shows the amount left out, and the Experts log gets a line starting [BASE] withdrawal(s). The max drawdown and the profit target still count a withdrawal as a fall in equity, and a deposit still counts as a profit that also raises the peak (a deposit made during the day also hides that much of today's loss). A withdrawal can therefore still put the account into LOCKDOWN through the drawdown, and Pro then flattens; the drawdown part stays until the baseline is taken again. Before a withdrawal, set Close all + block on breach (Pro) to false; afterwards, take the baseline again as described above, which also recomputes the limits and the target from the new balance (or the size you set), and switch the flatten back on.

Reading the panel

Top to bottom. Hover over a part to read what it is at the bottom of the panel (the shield has no hover line).

Header row

The shield on the left takes the colour of the state; clicking it opens the About card. Next to it the product name. Buttons, from the right edge inward: collapse (a small triangle), corner (TL, TR, BR, BL) and size (S, M, L, XL). Drag the header, left of the buttons, to move the panel; it stays where you drop it until you press the corner button, cannot be dragged out of the chart, and a saved position outside it is pulled back in at load. Position, size, corner and the collapsed state are remembered per chart; once a position is saved, the inputs Start corner and Panel size are ignored and the buttons decide. If the chart is too small for the size you picked, the panel is drawn smaller and the size button shows an amber badge such as XL→L until you enlarge the chart.

Preset row

On the left, a dim LIMIT % label and four buttons switch the rules live: 5/10 (2-step), 3/6 (1-step), 4/8 (instant) and Custom. The numbers are the daily loss and max drawdown limits in percent; the hover names the type. The profit target is 10% for every type except Custom, which uses the three CUSTOM inputs. On the right, RESET counts down to the next daily reset. A type chosen here is not saved (an input or timeframe change, re-attaching or a terminal restart returns to the input), so set a permanent choice in the inputs. The type applies at the next calculation, within a second, and if the account is already past the limits of the type you switch to, the state becomes LOCKDOWN at once. Pro only: with Close all + block on breach at true, the flatten then starts, so choose the type before you trade.

Status strip

The state in bold and a short text on the right:

  • SYNCING (slate, with an hourglass), with limits start after sync: the terminal has not delivered the account data yet, for example right after a start, a connection loss or a VPS restart. The limits are not evaluated until the data arrives; the max lot, LOSS AT SL, the gauges, the BASELINE line and the equity show a dash.
  • SAFE (green, with a circled check), with the room left and the limit that sets it, for example 69% left · daily: the buffer is the smaller of the daily loss left and the drawdown left, each as a share of its limit, and the word after the dot names that smaller one (daily, max DD or both). A narrow panel shortens it (69% · DD, 69%); before anything is used it reads 100% left.
  • CAUTION (amber, with a triangle): the buffer is at or below Buffer % at/below = CAUTION (25% by default). The right side shows how much more can be lost before the stop, ¥12,000 more = stop for today or ¥12,000 to full lockdown, and the max lot is narrowed (see Max lot card).
  • CAUTION after the buffer has recovered: for 60 seconds the strip stays amber and counts down, buffer back · clears in 60s (in steps of Refresh seconds, 1 by default). Display only: the state is already SAFE and the notifications follow it; a LOCKDOWN or a sync ends the wait at once.
  • LOCKDOWN (red): the daily loss or the drawdown has reached its limit. The free edition reads limit hit · close manually: it closes nothing itself. Pro reads:
    limit hit · closing… while it closes;
    limit hit · waiting for trading while the market is closed or the connection is down;
    limit hit · flattened once no position in the flatten scope is left (not at size S: the card says the same);
    limit hit · flatten when nothing is being closed (for example with the automatic flatten off).
  • Pro only: while positions cannot be closed, the strip ends with an amber · can't close and its icon is an amber triangle, not the circled check (the reason is on the last line).

With Popup on state change on, a pop-up announces a change of state; Push on state change adds a push notification. CAUTION and SAFE are announced only after the new state has held for 30 seconds, and SAFE only once the buffer is 5 percentage points above the CAUTION level, so a reading flickering around a limit does not send a message each time; LOCKDOWN is announced at once, and the panel and the Pro flatten react at once regardless. The first reading after the start is not announced, and only one chart per account sends the state message (in Pro, a flatten result, a CANNOT CLOSE alert and an order failure come from the chart they happen on). The message is in English in both panel languages and begins with the Order/log tag, for example PFRG-v1: CAUTION (daily left 480, DD left 1200); the Experts log gets a [STATE-NOTIFY] line (a push the terminal cannot send: [PFRG SEND] push failed). Pro only: E-mail on state change / flatten result / order failure and Sound on state change / … (both off by default) add an e-mail through the terminal's e-mail settings and a sound for the same events.

Max lot card

MAX LOT NOW is the largest lot the two sizing rules allow right now on the trade symbol, with the stop shown on the right: the smaller of the lot whose loss at the stop equals Normal risk per trade (% of balance) of the balance and the lot whose loss at the stop equals a share of the remaining buffer (Cap: max % of remaining buffer per trade, 0.5 meaning half). The result is capped by Hard lot cap, rounded down to the symbol's lot step, and shown as 0.00 below the symbol's minimum volume. The terminal calculates the loss at the stop for one lot moving by the stop distance. In Pro, BUY and SELL send this lot unless you pick a smaller one. In CAUTION the lot is narrowed: it is multiplied by CAUTION: panel max lot x this (1.0 = as before) (0.5 by default, so halved), rounded down to the lot step again (0.00 below the minimum volume), and the label turns amber: MAX LOT HALVED (CAUTION: MAX LOT HALVED where there is room), or the factor, for example ×0.70. Limits, gauges, state and notifications are unchanged. For 60 seconds after CAUTION ends the big number keeps the narrowed lot as a recommendation and its label names the actual cap, HALF OF 0.32; in Pro the lot row and SELL / BUY already use the actual cap.

On the right, SL shows the stop distance in points and a bar to change it. The bar's range is computed per symbol at start: the minimum is the largest of 50 points, three times the typical spread, the broker's minimum stop distance and 0.5% of the daily range (14-day ATR); the maximum is the largest of 1000 points, 15 times the minimum and 10% of the daily range; about 100 steps. The range is widened to include the start value and the current stop, except that a stop narrower than three times the typical spread or the minimum stop distance is raised to that floor (the Experts log says [SL RANGE]). A point is the symbol's smallest price step (on a five-digit pair 250 points is 25 pips; where the point is 0.01, 2.50 in price). The value set with the bar is not saved.

LOSS AT SL is the loss you would take if the stop is hit at the lot shown in MAX LOT NOW, as a negative amount; it reads 0 when there is nothing to lose, for example with a max lot of 0.00. It follows the SL bar. Pro only: when you pick a lot smaller than the max, it is the loss at that lot, and the label shows it, for example LOSS AT SL (0.20); the max lot itself does not change. In CAUTION it is the loss at the narrowed lot; during the 60-second wait Pro shows the loss at the lot the buttons would send, with that lot in the label, LOSS AT SL (0.32).

Risk limits

DAILY LOSS: on the right the amount left (¥485 left, or ¥485 over in red past the limit); below it the day's base, the loss so far and the limit, for example From day start ¥10,000: −¥515 / limit ¥1,000 (after a withdrawal today: From day start (net of w/d)). The limit is a percentage of today's daily anchor (Pro: or of the initial balance, with Daily loss limit is % of set to the initial balance), and today's loss is the anchor minus withdrawals made since the anchor minus current equity, so floating losses count. It starts again at the daily reset.

MAX DRAWDOWN, with the switch HWM / Static: on the right the amount left; below it the base, the drawdown and the limit, for example From peak ¥38,344: −¥2,825 / limit ¥9,000 (From initial … in Static). The limit is a percentage of the initial balance. HWM measures from the peak equity, open profit included, which keeps rising with new highs and does not stop at the initial balance; Static measures from the initial balance. As with the preset, a switch made on the panel is not saved.

PROFIT TARGET: the amount to go (¥X to go), or reached, and below it the profit and the target, a percentage of the initial balance. It is display only.

The daily loss and drawdown bars turn amber at 60% used and red at 80%, and their last fifth is shaded dark red. While the state is CAUTION or LOCKDOWN, a small triangle marks the row whose limit is in effect, the one with the smaller share left: DAILY LOSS, MAX DRAWDOWN, or both when equal. Amounts carry the account currency: $, ¥, € or £ in front for USD, JPY, EUR and GBP accounts, otherwise the currency code after the number.

Bottom row and bottom line

The free edition shows Auto-guard + BUY/SELL at max lot — PRO in the bottom row and, on the last line, Display only (FREE) with the current equity. Pro shows the lot row, FLATTEN, SELL and BUY (described below) and, on the last line, Auto-guard ON (green dot) or Auto-guard OFF (amber dot) with the equity; ON means the automatic flatten is enabled in the inputs and nothing the panel can see stops it from closing. When positions cannot be closed, the line turns amber and reads Auto-guard: CANNOT CLOSE with the reason: disconnected, investor login, server blocks EAs, Algo Trading off, EA not allowed to trade or symbol not tradable (the last is not checked with Flatten closes set to the whole account; with the automatic flatten off the line reads only CANNOT CLOSE and the reason), and the status strip ends with an amber · can't close. With the automatic flatten on, a condition lasting 15 seconds is announced once through the alerts you enabled, and again when closing is possible; each change is logged as a [GUARD] line. Not checked in the strategy tester. Below that, Pro has a small grey line with what a flatten closes: Closes: this symbol, any magic, pending kept (whole account: Closes: all symbols, any magic, pending kept). While you hover over a part, the last line shows its explanation. While syncing, Pro's last line reads Auto-guard starts after sync and the equity shows a dash in both editions.

Pro only: update notice. Where an earlier version was running, the last line shows in amber Swapped: SELL left · BUY right until your first order goes through or 3 days pass (since 1.18, SELL is on the left and BUY on the right). A failure, syncing, CANNOT CLOSE or Auto-guard OFF takes its place; a new account and the strategy tester do not show it.

Collapsed strip

Collapsed, the panel is one line with the state (SAFE, CAUTION or LOCKDOWN, in English in both languages; while syncing, SYNCING on a slate strip, or 同期中 in Japanese) and MAX with the max lot (MAX — while syncing; the narrowed lot in CAUTION and for 60 seconds after it). In LOCKDOWN the right side reads resumes 07:00 or no reset instead (see The LOCKDOWN card). Only the header row works while collapsed; hidden parts do not react to clicks.

About card and rating card

The shield opens a small card with the version, the licence type, where to ask for support and a ★ Rate this product button; click the shield again to close it. A card asking for a rating can also appear by itself a few times, never in LOCKDOWN; rating, or Don't ask again, ends it for good, and Show a one-time rating reminder (after a while) set to false switches it off.

Pro only

The free demo of Pro runs in the strategy tester, where the panel, presets, gauges and lot sizing can be checked.

Prop Firm Risk Guardian PRO on a chart

What the flatten closes, and what it does not

  • By default it closes every open position on the trade symbol: the chart symbol, or the symbol in Trade symbol ("" = chart symbol). With Flatten closes: chart symbol only / whole account set to Whole account, it closes every open position on the account, on all symbols.
  • It does not look at the magic number. Positions opened by other EAs or by hand are closed too.
  • By default it does not touch other symbols. To cover several, choose Whole account or attach the panel to one chart per symbol; with the same rules on each, they share the account's baseline, reach LOCKDOWN together, and each closes its own symbol.
  • It does not delete pending orders. A pending order on the symbol can still be filled after the flatten.
  • It does not stop other EAs or manual trading. What it blocks is the panel's own BUY and SELL, while in LOCKDOWN and while closing.
  • On a netting account a symbol has one position, so the combined position is closed.

The Experts log states the scope at every start, the panel's bottom line says it in short (Closes: …) and the FLATTEN hover names the symbol. The input Close all + block on breach keeps its old name; what it closes and blocks is exactly the list above.

When a limit is breached

The LOCKDOWN card (both editions). In LOCKDOWN a card on the panel says why and what comes next. Daily limit: Done for today — today's loss −¥12,000 / limit ¥10,000 and Resumes tomorrow 07:00 (in 5h 12m) (terminal local time). Max drawdown limit: Max drawdown hit — from peak −¥30,000 / limit ¥25,000 (from initial with the initial-balance basis), Does not reset at day rollover and, in grey, Check your prop firm's rules first; this card is shown when both limits are hit. The last grey line, Loss can slightly exceed the limit while closing, is there because the panel reacts after the breach (see What it does not do). The collapsed strip shows resumes 07:00 or no reset; a narrow panel shortens the lines.

With Close all + block on breach at true (the default), the panel starts one flatten when the state becomes LOCKDOWN. Nothing is flattened while the panel reads SYNCING (see the first question below): the limits are not evaluated until the account data has arrived. The check runs on every tick of the chart symbol and on the timer (every second by default), so it reacts after the limit is reached, and the loss can grow between the breach and the fill (gaps, fast markets, slippage). If new positions appear in the flatten scope after it has finished while the account is still in breach (another EA re-entering, a pending order filling, a manual trade), the flatten is armed again and closes them too; the Experts log says auto flatten re-armed. Once the account is back inside its limits, for example after the daily reset, the next breach triggers a new flatten.

The panel does not take a close order as done. It counts the positions in the flatten scope again and repeats, in rounds:

  1. One round sends one close to each remaining position, oldest first.
  2. The panel waits Flatten: wait before each re-check / retry (ms, min 500) (2 seconds by default), counts again, and sends again to what is still there.
  3. This goes on for up to 1 plus Flatten: retries after a failed close (0 = none, max 20) rounds (6 by default).

A result that is unclear, such as a timeout, is not sent again in the same round; the next count decides. A refusal that retrying cannot fix ends the flatten at once: Algo Trading switched off, trading disabled for the symbol, not enough money or an unsupported filling mode.

Closed market or lost connection. A round in which every close sent was refused only because the market is closed or the terminal is not connected does not use up an attempt: the panel checks again at intervals of at least 5 seconds (or of the re-check wait, if that is longer) for up to 30 minutes from the first such refusal. A round with any other refusal uses up an attempt; a temporary one, such as a requote, is sent again in the next round. Longer closures, a weekend for example, end in a failure that needs the FLATTEN button once trading resumes. The flatten state lives in memory: removing the EA, restarting the terminal or switching it to another login ends it, so the new account's positions are not closed for the old account's breach.

The final result is announced once, by pop-up and, if enabled, push, e-mail and sound: flatten done with the number of attempts, a note that there were no positions to close, or FLATTEN FAILED with the lots still open, the last result code and what to do.

When the flatten fails

If positions are still open after the last attempt, the panel says so in several places until they are gone:

  • The status strip turns solid red with FLATTEN FAILED on the left and, on the right, the state and the lots still open, for example CAUTION | 0.30 lots open, or 0.30 lots still open when the state is SAFE.
  • The FLATTEN button turns solid red with a white edge; SELL and BUY keep only a coloured outline (in LOCKDOWN they are grey).
  • The last line names the next step from the last refusal: FAILED · turn Algo Trading on, then FLATTEN when Algo Trading was off; FAILED · close by hand, or retry FLATTEN when the broker refused for a reason retrying does not fix (Algo Trading disabled by the server, trading disabled for the symbol, not enough money, unsupported filling mode); FLATTEN FAILED · press FLATTEN otherwise. This line stays while you hover and from the moment the panel is drawn, without a mouse move.
  • The collapsed strip shows the same red strip.

The alerts are sent once, at the end of the flatten; after that only the panel keeps showing the failure, which clears by itself once the positions are gone (closed by hand, by a stop or take-profit or by another program).

FLATTEN, SELL and BUY: two taps

Two taps: the first arms, the second sends

The lot row. Above the buttons, LOT with − and + around the lot that SELL and BUY send, and MAX 0.23 on the right. By default the lot follows the max lot and MAX is blue. In CAUTION this is the narrowed max lot; after CAUTION it is the actual cap at once, even while the big number still shows half. − and + pick a smaller lot, each press moving it by roughly a tenth (never below the symbol's minimum lot or above the max lot); MAX, or reaching the max with +, goes back to following it. If the max lot falls, a picked lot falls with it and does not climb back; it is not saved. Pressing −, + or MAX cancels an armed SELL or BUY. While SELL and BUY are grey (see below), the lot row is grey too and does nothing.

The buttons. From the left: FLATTEN, SELL, the spread, BUY. SELL and BUY show the side, the lot and the live price (bid on SELL, ask on BUY); the spread cell turns amber when the spread blocks an order.

Two clicks. Every button needs two clicks. The first arms it: FLATTEN reads CONFIRM; SELL and BUY keep their colour, get a white outline and a question mark after the lot, for example BUY 0.23 ? (in Japanese 買い確定 0.23). Hovering over an armed button shows Click BUY again to send · cancels in 2.5 s (SELL alike; Click again to close for FLATTEN). The second click sends only when it comes between 0.35 and 2.6 seconds after the first; a faster one is ignored and the button stays armed, so a click a moment later, still inside the window, sends. A click after 2.6 seconds sends nothing and arms the button again. Collapsing the panel cancels an armed button; dragging the SL bar does not, and the order uses the lot and stop shown at the second click. The buttons react only to a click on this panel itself; clicks on another product's panel or card lying on top of it do nothing.

FLATTEN starts the same procedure as the automatic flatten, on the same scope, in any state. A press while a flatten is running is ignored. The button is grey when there is nothing to close (a press then does nothing), amber when there are positions but closing is impossible right now (hover for the reason), red when it can close, and solid red with a white edge after a failed flatten.

SELL and BUY send a market order of the lot in the lot row, with the stop at the current SL distance and, if Order TP distance (points, 0 = none) is above 0, a take-profit. The order carries Magic number and Order/log tag. SL and TP prices are rounded to the symbol's tick size, the stop toward the entry side. Every order is written to the Experts log (a line starting [FIRE]); check the terminal's trade tab after sending.

When the buttons are grey. A grey button shows its reason where the price would be: syncing, offline, Algo OFF, EAs blocked, read-only (investor login), LOCKDOWN, until 10:25 (paused after a stop-loss, see below), closing…, lot < min (also when the narrowed lot in CAUTION is below it), SL < min stop (the stop is inside the broker's minimum distance) or need SL ≥ N (the stop is narrower than three times the current spread; N points is the least that works; SL < 3× spread when N cannot be worked out). Hover over it to read what to do. The SL value turns amber when the reason is the minimum stop distance or the spread. A click on a grey button does nothing; if a button turns grey after you armed it, the second click is refused, with a pop-up when Popup on state change is true.

Pause after a stop-loss. When a position on the account is closed by its stop-loss, SELL and BUY are paused for After a stop-loss hit: pause panel BUY/SELL for N minutes (0 = off) (10 by default); Pause after a stop-loss on: any symbol / this chart's symbol only chooses whether any symbol's stop-loss counts (default) or only the chart symbol's. The buttons turn grey with until 10:25 and the strip reads SL cooldown · 7 min left. The stop-loss is found in the deal history, so re-attaching or restarting does not clear the pause. Orders placed outside the panel are not blocked: a position opened elsewhere during the pause is reported once and left open. Limits and state are unchanged, and in LOCKDOWN the LOCKDOWN reason takes precedence.

When the broker does not take the order. The last line says so in red for 15 seconds and the button you pressed is outlined in red: BUY not placed · turn Algo Trading on (or SELL) when Algo Trading is off in the terminal, otherwise Order NOT placed (retcode N) · see Experts log. A pop-up follows when Popup on state change is true, and push, e-mail and sound when those are on. A stop inside the broker's minimum stop distance, or narrower than three times the current spread, is reported the same way before sending (without a result code); the stop is not widened.

Auto SL/TP for orders placed elsewhere

Auto SL/TP adds a stop to an order placed outside the panel

Orders placed outside the panel (the order window, the mobile app, another EA) often have no stop. With Auto SL/TP on orders placed outside the panel (off = as before) set to true, the panel gives each pending order and open position without a stop loss a stop at the panel's SL distance: counted from the order price (for a position, from its open price), rounded to the tick size on the entry side, and never narrower than the broker's minimum stop distance or three times the spread. It is off by default. An order that already has a stop, and this panel's own orders, are never changed. The five settings under it (see the table) choose which orders it handles (by default the trade symbol's orders with magic number 0, placed by hand), the take-profit it adds and what happens to a pending order bigger than the max lot for its stop; a position is never closed.

If a stop cannot be set yet (the price is inside the broker's stop or freeze level, trading is blocked, the broker refuses), the panel retries at growing intervals, from 3 seconds up to 2 minutes, and tells you when the result changes; a position already past the stop level is left open, with one notice. It acts on an order only once. Each action goes to the alerts you enabled and to the Experts log as [AUTO-SL] lines, and it works only while the terminal runs with the panel on a chart. A position that fills without a stop has none for a moment, and a stop does not guarantee the exit price: a gap or slippage can take the loss beyond it.

Frequently asked questions

The panel shows SYNCING right after I attached it.
The terminal has not delivered the account data yet (the EA started before the terminal was connected: after a lost connection, right after a VPS restart). Until the data arrives, the limits are not evaluated, the numbers show a dash and, in Pro, nothing is flattened and SELL and BUY are grey; once it arrives, the baseline is taken and the normal display returns. If SYNCING stays, check that the terminal is logged in and connected.

The gauges do not match my firm's dashboard.
Check four things: the initial balance on the BASELINE line (type the challenge's starting balance into the input if the panel was attached late), Daily reset hour (server time, 0-23) in the broker's server time, Daily anchor at reset (balance or equity) and the drawdown basis (HWM or Static). Firms define these differently, and some rules (the higher of balance and equity as the daily start, a trailing drawdown that stops at the initial balance) cannot be set here; the panel also does not know what happened before you attached it.

I switched the preset or HWM/Static on the panel and it went back. The preset row shows numbers, not names.
Panel switches last until the EA restarts, a timeframe change included; set Starting rules (switch live on panel) and Starting drawdown basis (toggle on panel) in the inputs. 5/10 is the 2-step type, 3/6 the 1-step type and 4/8 the instant type (daily loss / max drawdown in percent; profit target 10%); Custom uses the three CUSTOM inputs for any other numbers.

I withdrew profit and the panel went to LOCKDOWN.
Since 1.17 a withdrawal made after today's daily anchor no longer counts in the daily loss, but it still counts in the max drawdown, which can reach its limit. See Deposits and withdrawals above for the order of steps.

I run several symbols. Which positions does Pro close?
By default only those of the trade symbol of the chart it is on: attach one panel per symbol, or set Flatten closes: chart symbol only / whole account to Whole account to close every symbol from one panel.

Pro: the last line says Auto-guard: CANNOT CLOSE.
The panel cannot close positions right now, for the reason in brackets: switch Algo Trading on, allow the EA to trade (F7, Common), log in with the trading password, or wait for the connection. The line goes back to Auto-guard ON by itself.

Pro: the status strip is red and says FLATTEN FAILED.
Follow the last line. The most common cause is Algo Trading switched off: switch it on and press FLATTEN twice. When the market is closed, press FLATTEN after it opens, or close by hand. The Experts log lists every attempt with its result code.

Pro: I pressed BUY and nothing happened.
Look at the button. If it is grey, its reason is printed where the price would be (see When the buttons are grey); a click on a grey button does nothing; until 10:25 means the pause after a stop-loss (see Pause after a stop-loss). If it reads BUY 0.23 ?, it is armed: click again between 0.35 and 2.6 seconds after the first click. If an order was refused, the last line gives the reason for 15 seconds, such as Algo Trading switched off, or the broker's result code, and the button you pressed is outlined in red. The [FIRE] line in the Experts log has the details.

All settings

The table is generated from the shipped source of both editions and lists every input as the terminal shows it, with its default, its drop-down choices and the edition that has it. Pro's seventeen extra settings are marked Pro only.

General

How the panel looks and where it sits. None of these change a limit, a gauge or the max lot.

Setting (as shown in MT5)DefaultWhat it doesEdition
Language / 言語 (panel text)LANG_ENLanguage of the panel, its hover lines, the flatten and baseline pop-ups and the rating card; LANG_JP also switches the font to Yu Gothic UI. The title, the size and corner buttons, the HWM choice, the collapsed strip's state word and MAX, the state-change pop-up and push, and every input name stay in English. Broker refusals and too-narrow stops are reported in Japanese. The currency sign follows the account currency.
Choices: LANG_EN, LANG_JP
Free and Pro
Start cornerC_TRChart corner on the first start: C_TL top-left, C_TR top-right, C_BR bottom-right, C_BL bottom-left. Once the panel has been dragged, resized, collapsed, moved to another corner or had its SL bar released on that chart, the saved position is used instead; use the corner button.
Choices: C_TL, C_TR, C_BR, C_BL
Free and Pro
Panel sizeSZ_MPanel size on the first start: SZ_S, SZ_M, SZ_L or SZ_XL (1.00x, 1.25x, 1.55x, 1.85x). Ignored once the chart has a saved panel position; use the size button.
Choices: SZ_S, SZ_M, SZ_L, SZ_XL
Free and Pro
Corner margin (px)16Gap in pixels between the panel and the chart corner it snaps to.Free and Pro
Extra right gap for the price scale (px)64Extra pixels between a right-hand corner and the panel while the price scale is shown; no effect on the left corners or with the scale hidden, and negative values count as 0. Set 0 to put the panel right next to the scale.Free and Pro
Refresh seconds1Seconds between recalculations on the timer (1 or more; smaller values count as 1). The panel also recalculates on every tick of the chart symbol, and Pro checks for a breach at both.Free and Pro
Show a one-time rating reminder (after a while)trueDespite the words one-time, the rating card can appear up to three times (Pro: twice), weeks apart: not before an hour after the first start and 45 minutes of use (Pro: three hours), only while the mouse moved over the chart in the last two minutes, never in LOCKDOWN. Rating or Don't ask again ends it; false switches it off.Free and Pro

Account challenge

The rules the three gauges measure against. The three CUSTOM percentages are used only while the Custom preset is selected.

Setting (as shown in MT5)DefaultWhat it doesEdition
Starting rules (switch live on panel)Custom: your own % belowRules selected at start; switch them live with the 5/10, 3/6, 4/8 and Custom buttons next to LIMIT %. 2-step: daily loss 5%, max drawdown 10%. 1-step: 3% and 6%. Instant: 4% and 8%. Custom: the three CUSTOM inputs below. The profit target is 10% except for Custom. (old 5 / 10) equals 2-step, kept so saved charts and .set files from earlier versions keep their limits. A panel choice is not saved: changing an input or the timeframe, re-attaching or restarting returns to this input.
Choices: Custom: your own % below, 2-step: daily 5% / max 10%, 1-step: daily 3% / max 6%, Instant: daily 4% / max 8%, (old 5 / 10) = same as 2-step
Free and Pro
Account size (starting balance, account currency)Auto (detect once per account)Starting balance of the challenge, from a list of common sizes, in the account currency (not converted). Auto: Initial balance if set, otherwise the stored value, otherwise the balance at the first run. A chosen size is stored like a typed Initial balance (which wins when above 0) only while the balance is inside that size's floor-to-target range (see Initial balance in the guide); otherwise it is not used and the baseline line shows "size not used" in amber. For an amount outside the list, or a yen account, use Initial balance.
Choices: Auto (detect once per account), 5,000, 10,000, 25,000, 50,000, 100,000, 200,000, 500,000
Free and Pro
Initial balance (0 = detect once per account)0.0Initial balance of the challenge: the max drawdown limit and the profit target are percentages of it, and Static drawdown is measured from it. 0: the balance the first time the panel runs on this login is taken once and stored per account. Above 0: used and stored for the account; use it when you attach the panel partway through a challenge.Free and Pro
CUSTOM daily loss limit (%)5.0Custom preset only. Daily loss limit as a percentage of the daily anchor, the balance (or equity) recorded at the daily reset, not of the initial balance.Free and Pro
CUSTOM max drawdown limit (%)10.0Custom preset only. Max drawdown limit as a percentage of the initial balance.Free and Pro
CUSTOM profit target (%)10.0Custom preset only. Profit target as a percentage of the initial balance. Display only: reaching it triggers nothing.Free and Pro
Starting drawdown basis (toggle on panel)DD_TRAILING_HWMDrawdown basis at start; switch it live with the HWM and Static buttons. DD_TRAILING_HWM: from the highest equity seen since the baseline was taken, which only rises and does not stop at the initial balance. DD_STATIC: from the initial balance. A panel choice is not saved, as with the preset.
Choices: DD_TRAILING_HWM, DD_STATIC
Free and Pro
Daily anchor at resetANCH_BALANCEWhat the daily loss is measured from: ANCH_BALANCE the balance, ANCH_EQUITY the equity, read at the first calculation after the daily reset and stored per account, so the first chart of the login to pass the reset sets it for all. If the terminal is off at the reset, it is read when the panel next runs that day.
Choices: ANCH_BALANCE, ANCH_EQUITY
Free and Pro
Daily reset hour (server time, 0-23)0Hour of the daily reset in server time, 0 to 23; the day is judged from the time of the last quote received, and RESET on the panel counts down to it. A value outside 0 to 23 is not corrected, so enter an hour in that range.Free and Pro
Buffer % at/below = CAUTION25.0The state turns CAUTION when the remaining buffer is at or below this percentage; the buffer is the smaller of daily loss left over its limit and drawdown left over its limit, the figure the status strip shows as % buffer left.Free and Pro

Lot sizing

How MAX LOT NOW is worked out. In Pro, BUY and SELL send the lot shown on the panel (by default the max lot, or a smaller lot you pick), with the stop set on the SL bar.

Setting (as shown in MT5)DefaultWhat it doesEdition
Trade symbol ("" = chart symbol)(empty)Symbol for the lot calculation and, in Pro, for flatten, BUY and SELL; empty means the chart symbol. Type the name exactly as the broker lists it, suffix included. If the terminal cannot select that name, the chart symbol is used without a warning on the panel (the Experts log line [INIT] shows the symbol in use).Free and Pro
Starting SL distance (points, step on panel)250Stop distance in points at start. The SL bar moves it inside a per-symbol range computed at start (its minimum and maximum are given under the panel's SL line; Experts log line [SL RANGE]). A start value outside the range widens it, except that one below 3 times the typical spread or the minimum stop distance is raised to that floor. The value on the bar is not saved. Pro's BUY and SELL attach this stop.Free and Pro
Normal risk per trade (% of balance)1.0Most one trade may lose at the stop, as a percentage of the current balance. MAX LOT NOW is the smaller of the lot allowed by this and the lot allowed by the buffer cap below.Free and Pro
Cap: max % of remaining buffer per trade0.5Share of the remaining buffer (the smaller of daily loss left and drawdown left, in money) one trade may lose at the stop, written as a fraction although the label says %: 0.5 means half. The max lot uses this amount as one of its limits.Free and Pro
Hard lot cap5.0Upper limit of MAX LOT NOW. The result is then rounded down to the symbol's lot step and capped at its maximum volume; below the minimum volume it shows 0.00.Free and Pro
>0 forces this lot (debug)0.0For testing. Above 0, MAX LOT NOW shows this lot whatever the limits say (still capped by Hard lot cap and rounded), and Pro's BUY and SELL send up to it. Leave 0.Free and Pro

PRO: auto-guard

Pro only. What happens when a limit is breached, and the take-profit of the panel's BUY and SELL.

Setting (as shown in MT5)DefaultWhat it doesEdition
Close all + block on breachtruePro only. true: once per breach, the panel closes every position in the flatten scope (the trade symbol by default, see Flatten closes), whatever its magic number or origin, and checks the result; positions that appear in the scope while the account is still past the limit are closed too. Pending orders, other EAs and manual trading are not touched. false: nothing is closed automatically, the bottom line shows Auto-guard OFF with an amber dot, and the FLATTEN button still works.Pro only
Order TP distance (points, 0 = none)0Pro only. Take-profit distance in points attached to orders from the panel's BUY and SELL. 0 sends them without a take-profit.Pro only

Identity / alerts

How the panel's own orders and messages are labelled, and which notifications are sent.

Setting (as shown in MT5)DefaultWhat it doesEdition
Magic numberFree: 30009 / Pro: 30010Magic number on the orders sent by Pro's BUY and SELL; the flatten does not look at magic numbers, and the free edition sends no orders.Free and Pro
Order/log tagFree: PFRG-v1 / Pro: PFRG-PRO-v1Text at the start of every pop-up and push message, and the order comment on Pro's BUY and SELL.Free and Pro
Popup on state changetrueTerminal pop-up when the state changes between SAFE, CAUTION and LOCKDOWN (not for the first reading after start; CAUTION and SAFE after 30 seconds in the new state; one chart per account sends it), when a baseline is taken, carried over or not, and when the Account size you picked is not used. Pro also shows each flatten's result, a refused BUY or SELL and, with the auto-guard on, CANNOT CLOSE.Free and Pro
Push on state changefalsePush notification to the MetaQuotes ID set in the terminal, on state changes (same timing as the pop-up) and, in Pro, on the final result of each flatten, a refused BUY or SELL and CANNOT CLOSE (cut to 255 characters). If the terminal cannot send it (no MetaQuotes ID, notifications off), the Experts log gets a line starting [PFRG SEND] push failed.Free and Pro

Baseline

The stored starting values of this account: initial balance, peak equity and today's daily anchor.

Setting (as shown in MT5)DefaultWhat it doesEdition
Re-take the account baseline now (then set back to false)falsetrue starts the challenge over: at the next start the account's stored initial balance, peak and daily anchor (and per-chart data from earlier versions) are deleted and taken again, from Initial balance or Account size when set and used, otherwise from the current balance. Set it back to false afterwards (or the baseline is taken again at every start) and restart the panel on the account's other charts.Free and Pro

PRO: flatten retry

Pro only. How a flatten checks its result and tries again when positions are still open.

Setting (as shown in MT5)DefaultWhat it doesEdition
Flatten: retries after a failed close (0 = none, max 20)5Pro only. Further attempts after the first if positions remain (0 to 20; larger values count as 20); 0 means one attempt, still checked and reported. Rounds refused only because the market is closed or there is no connection are not counted but waited out for up to 30 minutes from the first refusal.Pro only
Flatten: wait before each re-check / retry (ms, min 500)2000Pro only. Wait before each re-count and retry, in milliseconds (500 to 600000). While waiting for the market to open or the connection to return, the wait is at least 5000 ms.Pro only

PRO: more alerts

Pro only. More ways to be told: e-mail and a sound, in addition to the pop-up and push above. All off by default.

Setting (as shown in MT5)DefaultWhat it doesEdition
E-mail on state change / flatten result / order failurefalsePro only. E-mail through the terminal's e-mail settings (Tools > Options > Email) for the same events as the push; off by default, and a failed send is written to the Experts log.Pro only
Sound on state change / flatten result / order failurefalsePro only. Plays the sound file below for the same events as the push. Off by default.Pro only
Sound file (terminal Sounds folder)alert.wavPro only. The sound file to play, from the terminal's Sounds folder, used only when the sound alert is on; a file that cannot be played is reported in the Experts log.Pro only

PRO: flatten scope / daily base

Pro only. Which positions a flatten closes, and what the daily loss limit is a percentage of. The defaults keep the behaviour of 1.16 and earlier.

Setting (as shown in MT5)DefaultWhat it doesEdition
Flatten closes: chart symbol only / whole accountChart symbol only (as before)Pro only. What a flatten (automatic or the FLATTEN button) closes. Chart symbol only: the positions of the trade symbol, as in 1.16. Whole account: every symbol on the account. Either way any magic number, pending orders untouched; the panel's bottom line shows the choice.
Choices: Chart symbol only (as before), Whole account (all symbols)
Pro only
Daily loss limit is % of: day anchor / initial balanceDay anchor at reset (as before)Pro only. What the daily loss limit is a percentage of: Day anchor (as in 1.16) or Initial balance, for rules that set the daily limit from the starting balance. Today's loss is measured from the daily anchor either way.
Choices: Day anchor at reset (as before), Initial balance (account baseline)
Pro only

PRO: auto SL/TP for orders placed elsewhere

Pro only. Gives a stop loss, and optionally a take-profit, to orders placed outside the panel. Off by default: nothing changes for existing positions and pending orders until you turn it on.

Setting (as shown in MT5)DefaultWhat it doesEdition
Auto SL/TP on orders placed outside the panel (off = as before)falsePro only. Master switch of the automatic stop for orders and positions placed outside the panel (order window, mobile app, another EA) without a stop loss. false (default): nothing is touched. true: each gets a stop at the panel's SL distance (see Auto SL/TP in the guide); an existing stop, and the panel's own orders, are never changed. Works only while the terminal runs with the panel on a chart.Pro only
Auto SL: which symbolsChart symbol onlyPro only. Chart symbol only (default): orders on the panel's trade symbol. Whole account: every symbol, with the stop distance scaled by that symbol's daily range (14-day D1 ATR) against the chart symbol's. Used only while Auto SL/TP is on.
Choices: Chart symbol only, Whole account (all symbols)
Pro only
Auto SL: which ordersManual orders only (magic 0)Pro only. Manual orders only (default): magic number 0, placed by hand in the terminal or the mobile app. Manual + other EAs: also any other magic number except this panel's own. Used only while Auto SL/TP is on.
Choices: Manual orders only (magic 0), Manual + other EAs (any magic but this one)
Pro only
Auto TP: how to set it (only when the order has no TP)Same as panel orders (Order TP distance, 0 = none)Pro only. The take-profit added to an order that has none (an existing one is kept). Same as panel orders: the Order TP distance above (0 = none). No TP: none. R multiple of the SL distance: the SL distance times the value below. Fixed points: the value below, scaled like the stop on another symbol. A take-profit inside the broker's minimum stop distance is skipped.
Choices: Same as panel orders (Order TP distance, 0 = none), No TP, R multiple of the SL distance, Fixed points
Pro only
Auto TP value (R multiple, or points)2.0Pro only. The number for R multiple (2.0 = twice the stop distance) and Fixed points (points). The other two modes ignore it.Pro only
Pending order bigger than the max lot for its SLSet the SL and notifyPro only. A pending order whose lot is above the max lot allowed for its stop. Set the SL and notify (default): the stop is set and a warning gives that max lot. Cancel the pending order and notify: it is deleted and a notice says so. A position is never closed.
Choices: Set the SL and notify, Cancel the pending order and notify
Pro only

Caution: narrow before the stop

What the panel does while the state is CAUTION and right after a stop-loss hit, before any limit is reached: it narrows the lot and pauses its own buttons. None of these change a limit, the state or a notification.

Setting (as shown in MT5)DefaultWhat it doesEdition
CAUTION: panel max lot x this (1.0 = as before)0.5Multiplier applied to the max lot while the state is CAUTION: 0.5 (default) halves it, 1.0 leaves it as before; values outside 0.1 to 1.0 are clamped, and the result is rounded down to the lot step (0.00 below the minimum volume). Limits, gauges, state and notifications are unaffected; in Pro the buttons send the narrowed lot (see Max lot card in the guide).Free and Pro
After a stop-loss hit: pause panel BUY/SELL for N minutes (0 = off)10Pro only. After a position on this account is closed by its stop-loss, SELL and BUY are paused for this many minutes (10 by default; 0 = off; above 1440 counts as 1440): grey buttons with the resume time, minutes left on the strip, a [COOLDOWN] line in the Experts log. Read from the deal history, so re-attaching or restarting does not clear it. Orders placed outside the panel are not blocked. Limits, state and LOCKDOWN are unchanged.Pro only
Pause after a stop-loss on: any symbol / this chart's symbol onlyAny symbol on this accountPro only. Which stop-loss hits start the pause: Any symbol on this account (the default) or This chart's symbol only.
Choices: Any symbol on this account, This chart's symbol only
Pro only

What it does not do, and where it stops

  • It reacts after a limit is reached; it cannot prevent an order. Between the breach and the fill the loss can grow; the LOCKDOWN card says so in its last line.
  • Pro closes the positions of one symbol by default (or of the whole account if you choose so), of any magic number, and leaves pending orders, other EAs and manual trading alone. The free edition closes nothing.
  • Auto SL/TP (Pro, off by default) gives an order a stop after the order exists: it cannot prevent the order, a filled position has no stop for a moment, and a stop is not a guaranteed exit price, because a gap or slippage can take the loss beyond it.
  • It works only while the terminal runs, is connected and, for Pro, has Algo Trading on. Keep the terminal running on a PC or VPS. When the panel sees that it cannot close, Pro shows Auto-guard: CANNOT CLOSE; it cannot report anything while the terminal itself is not running.
  • It measures from the baseline it took, not from your firm's records. It does not know the history before it was attached, leaves withdrawals made after the daily anchor out of the daily loss only (the max drawdown and the target still count them), counts deposits as profits, and follows the broker's server time and the time of the last quote for the daily reset.
  • The max lot is a calculation from the numbers on the panel, not a promise that a trade stays inside your firm's rules.
  • Apart from its own orders (Pro) and the notifications you enable, it only reads the account's deal history (for withdrawals), writes its baseline, its panel position and a few small markers (which chart sends the messages; in Pro, which chart handles Auto SL/TP and whether the update notice is done) to the terminal's global variables, keeps the rating reminder's state in a small file in the terminals' shared Common\Files folder, and turns on mouse-move events for its chart (left on when it is removed, since another panel on the chart may need them). It uses no DLL and no web request.

Product pages: free edition, Pro.

Support

Post on the Comments tab of the product page (links above). Symbol, timeframe and what the panel showed is enough to start; for Pro, add the [FLATTEN], [FIRE], [COOLDOWN] or [AUTO-SL] lines from the Experts log if there are any.

This guide describes Prop Firm Risk Guardian 1.19 and Prop Firm Risk Guardian PRO 1.19.