Part 1 of 2. Part 2 covers automatic protection, several charts, how MetaTrader 4 handles your trades, what RCP writes to disk, the inputs and what to do if something looks wrong.
A risk-management panel for MetaTrader 4. It does not predict the market and it does not trade on its own: it sizes the position you are about to take, refuses the ones that would break your own limits, protects what is open, and tells you where you stand.
PLAN → EXECUTE → PROTECT → MONITOR
1. Installing
- Bought or rented on the MQL5 Market: MetaTrader installs it for you; it appears in the Navigator under Expert Advisors › Market. Installing by hand: copy RiskControlPanel.ex4 into MQL4\Experts\ inside your terminal's data folder (File → Open Data Folder in MetaTrader), then right-click Navigator → Refresh.
- Drag RiskControlPanel onto a chart.
- On the Common tab of the dialog, tick Allow live trading, and make sure the AutoTrading button on the MetaTrader 4 toolbar is on.
- In the terminal's Account History tab, right-click and choose a period of at least Last 3 Months (or All History). MetaTrader 4 lets an Expert Advisor see only the history loaded in that tab: the day's closed figures need a period that includes today, and the commission estimate reads the last 30 days of closed trades. Section 6 explains why.
The panel appears in the top-left corner of the chart. Drag its title bar to move it; where you leave it is where it comes back.
Minimising. The control at the right end of the title bar — a dash while the panel is maximised — minimises it to a small strip reading RCP (Risk Control Panel), and hides the plan lines, so the chart is clear for analysis. With RCP on more than one chart of the account, the strip reads RCP (primary) on the chart that manages it and RCP (secondary) on the others (section 5). While the panel is minimised the control is a hollow square; click it and the panel is maximised again. Minimised, the panel keeps protecting and monitoring exactly as before — only the body of the panel goes, and the Entry, Stop Loss and Take Profit lines if they were on — and a trade or close waiting for its second click is cancelled.
Updating to a new version: a Market copy is updated by MetaTrader when a new version is published (the terminal offers it); a copy installed by hand is updated by copying the new .ex4 over the old one. Either way, remove the EA from the chart and drag it on again. (Only pressing OK in the inputs dialog restarts the EA but does not re-read the file from disk, so a new build would not take effect.) Check the startup line in the Experts journal to confirm the new build is really running:
Risk Control Panel MT4 1.00 (build 2026.11.16 18:40) started on EURUSD (refresh 250 ms)
2. The five minutes that matter
Everything else is detail; this is the loop.
- TRADE tab. Drag the Entry, Stop and Target lines on the chart, or type the distances. The panel shows the lot size that risks exactly what you asked, the money at risk, the reward-to-risk ratio and what it costs to open, between spread and commission.
- Press BUY or SELL. Press it again within the confirmation window to confirm (3 seconds by default, SETTINGS › EXEC › CONFIRM SECS). One click never sends an order.
- If the panel refuses, it says why, in words — never a greyed-out button with no explanation.
- MANAGER tab. The open positions, what each one still has at risk and its protection state; and, on its own list, the pending orders, with what each would risk and when it expires.
- RISK tab. What today has cost, what is at risk right now, and how much room is left.
3. The panel, field by field
Title bar and top bar — visible on every tab
| Item | Meaning |
|---|---|
| Risk Control Panel MT4 | The title. With RCP on more than one chart of the account it reads RCP MT4 (primary) on the chart that manages the account and RCP MT4 (secondary) on the others (see section 5). On a single chart it is just Risk Control Panel MT4. |
| LINES ON / OFF | Shows or hides the plan's Entry, Stop and Target lines. With the lines hidden, BUY and SELL are refused: you would be trading a stop loss (SL) you cannot see. |
| – (the control at the right end) | Minimises the panel to a small strip; the same control, now a hollow square, restores it. See section 1. |
| BALANCE | Account balance. |
| EQUITY | Balance plus the floating profit or loss of every open position. |
| DAY P/L | Today's result: what was closed today plus what is floating now. The trading day starts at the hour set in SETTINGS › DAILY. |
| DAILY RISK1.63% / 2.00% | What today would cost if every stop were hit — the same figure as on the RISK tab — against your MAX DAILY LOSS. The bar underneath fills towards the limit. no cap when no daily limit is set. |
| Status word | How close DAILY RISK is to MAX DAILY LOSS: SAFE below half of it, CAUTION from half, WARNING from three quarters, LIMIT when reached. NO SL: n replaces the word while n positions or orders have no stop loss — the more urgent news. |
| Status strip (bottom) | The last message: why a trade was refused, what a click did, what to do next. Every refusal is also written to the Experts journal. |
TRADE — plan and execute
Three rows plan the trade; each has a field you type in, a button that changes what the field means, and the result on the right.
| Row | Field | Button | Right-hand result |
|---|---|---|---|
| RISK | How much the trade may lose, in the unit of the button | % BAL → % EQ → MONEY → LOTS | The money this trade risks at the final lot: the loss at the stop plus commission |
| ENTRY | The entry price | MARKET (the entry follows the current price) / MANUAL (the price you type or drag stays put) | The order that will be sent: MARKET, BUY LIMIT, SELL LIMIT, BUY STOP or SELL STOP, worked out from where your entry sits against the price |
| SL | The distance to the stop loss | PTS → PIPS → PRICE | The stop price, in red |
| TP | The distance to the take profit | R → PTS → PIPS → PRICE → OFF | The target price, in green, or - when OFF |
- Risk modes.% BAL risks a percentage of the balance; % EQ a percentage of the equity, so it shrinks while open positions are losing; MONEY a fixed amount; LOTS a lot you choose, with the resulting risk shown on the right. The percentage you type is kept until you change it: between % BAL and % EQ only what it is measured on changes, so the lot and the money follow; stepping through MONEY and LOTS shows the money and the lot of the current trade, and coming back to a percentage brings back the one you chose.
- R is the distance from entry to stop. A target of 2.00 R sits twice as far from the entry as the stop.
- PIPS is only offered on symbols quoted with 3 or 5 digits, where a pip is 10 points. On indices, metals and crypto there are no pips, so SL cycles PTS → PRICE and TP cycles R → PTS → PRICE → OFF.
- TP OFF sends the trade with no take profit.
- Changing a unit never moves a line: the field just reads the same distance in the new unit.
- Dragging a line on the chart updates the fields, and typing in a field moves the line.
- Dragging the Entry line moves SL and TP with it, keeping their distances. The input Dragging Entry moves Stop and Target, on the Inputs tab, turns this off (section 8).
Below the plan, the result:
| Figure | Meaning |
|---|---|
| LOTS | The size that risks what you asked, rounded down to your broker's volume step — never up, which would risk more. It reads LOTS MAX in amber when it was cut to your maximum lot in SETTINGS › RISK › MAX LOT, or to the broker's. If even the broker's minimum lot risks more than you asked, that minimum lot is used as long as it is no more than 10% over, and RISK shows the real risk; beyond that the trade is refused with Minimum lot exceeds the requested risk. It is the only case where the panel can risk slightly more than you set. |
| R:R | Reward to risk: the distance to the target over the distance to the stop. 1:2.00 means the target is twice as far as the stop. Before costs; it only shows - with the target OFF. |
| MARGIN | The margin this position would tie up, as the broker computes it. |
| SPREAD | What the current spread costs at this lot size — paid the moment the trade opens. |
| COMM | The round-turn commission at this lot size: the value in SETTINGS › EXEC › RT COMM/LOT, or, when that is 0, estimated from the trades of the last 30 days in the Account History tab (section 6). 0.00 when none is known — a notice at startup says so. |
| EXPOSURE | The most this trade can cost if the stop is hit: the RISK figure plus the spread and, if there is one, the swap. |
| BUY / SELL | Show the lot they would send. The lines decide the side: a stop below the entry is a buy, above it a sell; the other button is dimmed and, if pressed, says how to turn the setup around. The first click turns the button into CONFIRM BUY 0.25; a second click within the confirmation window sends the order (set in SETTINGS › EXEC › CONFIRM SECS). |
| FLATTEN ALL | The panic button, below BUY and SELL: closes every position and deletes every pending order the panel manages (SETTINGS › EXEC › MANAGE decides which). The first click turns it into CONFIRM: 2 POS + 3 ORD; a second click within the confirmation window does it. It works on a locked day and on a secondary chart — it only ever takes risk away. Positions are closed oldest first (section 6). Greyed out when there is nothing to flatten. |
Every trade is its own ticket. MetaTrader 4 has no netting accounts, so BUY and SELL work on a symbol that already has a position open: the new trade is a separate position, with its own stop and its own protection. On a broker with market execution, MetaTrader 4 does not accept the stops on the opening order; the panel opens the position and attaches the stop loss and take profit straight after (section 6).
RISK — how much is at risk on the whole account
The wide strip across the top of the tab, just under the tab buttons, is the banner: the state of the trading day in one word. LOCKED stops you; REACHED only warns you.
| Banner | Meaning |
|---|---|
| TRADING OPEN, in green | No daily limit has been reached today. You can trade. |
| LOCKED: on red | The limit named beside it was reached, and new trades are refused for the rest of the trading day. It reads daily loss limit , trade count limit or losing trades limit . |
| REACHED: on amber | The same limit was reached, but LIMIT: BLOCK is off in SETTINGS › DAILY, so you can keep trading. The other two actions do not depend on it: if they are on, LIMIT: DEL PEND has deleted the panel's pending orders and, when the limit reached is MAX DAILY LOSS, LIMIT: CLOSE has closed its positions. |
On the right, resets 00:00 is the time the trading day rolls over, when the lock lifts and the day starts from zero again: TRADES and LOSERS go back to 0, and so does CLOSED in DAILY RISK. It is broker server time, the hour set by DAY STARTS (H) in SETTINGS › DAILY, and it is shown whether the day is locked or not.
A lock outlives the terminal: it is stored per account and trading day, so closing MetaTrader and opening it again does not clear it. Only the day rolling over does.
Daily risk
| Figure | Meaning |
|---|---|
| DAILY RISK1.63% / 2.00% | What today would cost if every stop of the open positions were hit and every pending order filled and hit its stop, plus the loss already closed today. Against your MAX DAILY LOSS, with a status word and a bar. This is the figure every new trade is checked against. |
Below it, the parts on the left, in % of your balance (or equity, per RISK MODE), and the rest of the day on the right:
| Figure | Meaning |
|---|---|
| CLOSED | Profit or loss closed today, with its sign. A loss counts in full. A profit is shown dimmed and counts as 0: a good morning is not room to spend in the afternoon. |
| OPEN | What the open positions would lose from their entries to their current stops. It stays still while the stops stay still. A position whose stop is at break even or beyond counts 0: it can no longer close at a loss. |
| PENDING | What the pending orders would lose if they were filled and then stopped out. |
| DAILY RISK | The three added up — the same figure as above. |
| FLOATING | Profit or loss of the open positions now, in money. It is not added: a floating loss is already inside OPEN, on its way to the stop. |
| LEFT | How much more the day can risk, in money: MAX DAILY LOSS minus DAILY RISK. The largest risk the next trade can take. Never below 0. |
| TRADES | Trades opened today, against the maximum per day: 2 / 5 , or 2 / - when no maximum is set. What remains after a partial close is not a new trade. |
| LOSERS | Losing trades closed today, against the maximum per day: 1 / 3 , or 1 / - when no maximum is set. |
| FREE MRG | Free margin on the account. |
| MRG LEVEL | Margin level: equity over used margin, as a percentage. - with nothing open. |
TRADES, LOSERS and CLOSED count the whole account, as every risk figure does: trades opened by hand or by another Expert Advisor count too, whatever MANAGE says. They are read from the closed trades in the terminal's Account History tab, which must show a period that includes today (section 6).
An example: CLOSED -0.13% , OPEN 1.00% , PENDING 0.50% — DAILY RISK is 1.63% . The closed loss of 0.13% adds 0.13%; had the day closed at +0.13% , DAILY RISK would be 1.50% .
Why the three parts sometimes do not add up to DAILY RISK. The panel works in exact amounts and rounds to two decimals only to print them. DAILY RISK is the rounded exact sum, not the sum of what you see rounded, so it can differ by 0.01:
| Exact | On screen | |
|---|---|---|
| CLOSED | 0.124% | -0.12% |
| OPEN | 1.004% | 1.00% |
| PENDING | 0.504% | 0.50% |
| DAILY RISK | 1.632% | 1.63% |
What you see adds up to 1.62%, and the panel shows 1.63%, the rounded 1.632%. It is not an error: the figure measured against MAX DAILY LOSS, and the one a trade is accepted or refused on, is always the exact one.
Why each trade adds a little less than you asked. The lot is rounded down to the broker's volume step, so each trade risks what you asked or slightly less, never more. The smaller the lot, the more it shows: at 0.20% on BTCUSD, an exact lot of 0.052 becomes 0.05 and risks 0.19%. Four trades of 0.25%, 0.25%, 0.20% and 0.20% can add up to 0.88% instead of 0.90%. Each trade's real figure is RISK on the TRADE tab, before you press BUY or SELL.
DAILY RISK blocks a trade; the loss actually taken locks the day. Two different checks:
- A new trade is refused when DAILY RISK plus that trade's risk would go past MAX DAILY LOSS. An open position counts with its full distance to the stop, not with what it has lost so far. With 1% closed and a trade open that risks 0.5% to its stop but is only 0.3% down, DAILY RISK is 1.5%: against a 2% limit the next trade may risk 0.5%, not 0.7%.
- The day locks — the banner turns to LOCKED — when the loss already taken today reaches MAX DAILY LOSS. The loss taken is what closed at a loss plus what the open positions are losing right now. If the panel manages every position and order, that only happens once every stop is hit, and by then those positions are closed by the stops themselves. The lock acts before that when there are trades opened outside the panel, a stop moved further away or removed after opening, a gap or slippage past the stop, or swap adding up.
Four examples, all on a 10,000 balance with MAX DAILY LOSS at 2%, that is 200:
| Case | What happens |
|---|---|
| A trade opened outside the panel | 120 is closed and a panel position can lose at most 80 down to its stop. You open 1 lot from the terminal with no stop. With the panel's position 50 down, the moment the stopless one passes 30 the day locks — even though the panel's position still has 30 to go to its stop, because 120 + 50 + 30 = 200 |
| A stop moved by hand | You open with 100 at risk and the guard accepts it. Then you drag the stop twice as far: that position can now lose 200, double what was approved |
| A gap or slippage | Your stop sits at a 200 loss, but the market opens below it on Monday and it fills at 260. You have lost 60 more than planned |
| Swap adding up | You hold a position for days and the negative swap adds to the loss, with no stop having moved at all |
Why the lock does not watch DAILY RISK. With a 2% limit, two trades risking 1% each put DAILY RISK at 2% the moment they open, with nothing lost at all. Were the lock measured on that, the day would close without a cent lost, and stay closed even after both positions moved to break even, when they can no longer lose anything.
The list (ON ACCOUNT) — up to five rows, then +N more . The heading counts positions, orders and any without a stop. Positions and orders without a stop come first, marked NO SL in red; the rest follow, largest risk first. Each row shows the symbol, the kind (BUY, SELL, BUY LIMIT, SELL STOP…), and what it risks from its entry as a percentage and in money. A row the panel does not manage is dimmed: it counts towards your risk, but the panel will not modify or close it.
MANAGER — the positions and orders the panel manages
Two secondary tabs at the top choose the list: POSITIONS or ORDERS, each with how many there are, so an order waiting on the other list is never out of sight. The panel remembers which one you left open. Only the positions and orders the panel manages are listed, as set in SETTINGS › EXEC; the RISK tab counts every trade on the account.
POSITIONS
On the right, the positions' profit or loss added up. Below, the newest five positions (then +N older position(s) not shown ):
| Column | Meaning |
|---|---|
| Symbol | Click a row to select it. The highlight goes with that position, not with the row: when another opens and the list reorders, or a partial close gives it a new ticket, you still have the same one selected |
| Side and volume | BUY 0.25 |
| P/L | Floating profit or loss. From 1000 on without decimals ( +20724 ), and in millions from a million on ( +1.23M ), so it fits; the exact figure is on the selected position below |
| Protection state | INITIAL (original stop), BE (at break even), TRAIL (trailing), TRAIL OFF (trailing reached but switched off for this position), NO SL (no stop loss) |
The selected position
| Figure | Meaning |
|---|---|
| SL / TP | Current stop loss and take profit; none if not set |
| RISK | What the position risked when it opened: from its entry to its original stop, at the volume it was opened with. Fixed: it does not change as the price or the stop moves, nor with a partial close. What follows the stop is AT RISK, here, and OPEN on the RISK tab |
| AT RISK | What it would lose from the current price to its current stop (see below) |
| R NOW | How far the price has gone, in R: +1.00R means one stop-distance in profit |
| TRAIL | Whether trailing is ON or OFF for this position, or n/a when trailing is not part of the protection mode |
Why AT RISK moves while the stop does not. It measures what you would lose from here, not from the entry. A buy of 1 lot at 1.1000 with the stop at 1.0980 risks 200 from the entry:
| Price now | Floating | AT RISK | Why |
|---|---|---|---|
| 1.1000 | 0 | 200 | The full distance to the stop |
| 1.1010 | +100 | 300 | The 100 you are up, plus the 200 to the stop |
| 1.0990 | −100 | 100 | 100 already lost, 100 still to go |
So AT RISK grows when the trade goes your way — there is more to give back — and shrinks when it goes against you. Once the stop is past the entry, what remains at risk is only the profit between the price and the stop. It is a figure for managing the position.
Buttons
| Button | What it does |
|---|---|
| BE | Moves the stop to break even now, without waiting for the BE TRIGGER R. The stop still has to be a legal one: behind the current price and at the broker's minimum distance. With the price too close to the entry it is refused, the status strip says why, and you can press it again later |
| TRAIL | Switch trailing on or off for this position only |
| 25% / 50% | Close that part of it. When that part cannot be split off because what remained would be below the minimum lot, the confirmation says the whole position will close. MetaTrader 4 moves what remains to a new ticket; the panel keeps it as the same position, with its R and its protection (section 6) |
| CLOSE | Close it |
| BE ALL | Break even on every managed position that allows it |
| CLOSE LAST | Close the most recently opened position. On a broker with FIFO rules it is refused while an older position on the same symbol is open (section 6) |
| CLOSE ALL | Closes every managed open position, oldest first. Pending orders are left alone: they are deleted from the ORDERS list. (To close the positions and delete the orders in one go, use FLATTEN ALL on the TRADE tab.) |
Every closing action asks for a second click: the button first turns into OK? (25%, 50%, CLOSE) or CONFIRM (CLOSE LAST, CLOSE ALL).
ORDERS
To the right of the switches, what every pending order would lose added up, if it filled and was stopped out. When any of them has no stop loss it reads n NO SL in red instead: without a stop that risk cannot be worked out, and that is the news that matters.
Below, the newest five orders, then +N older order(s) not shown . Each row:
| Column | Meaning |
|---|---|
| Symbol | Click a row to select it. The highlight goes with that order, not with the row |
| Kind | BUY LIMIT, SELL LIMIT, BUY STOP or SELL STOP — the four pending orders MetaTrader 4 has — in red when the order has no stop loss |
| Volume | The order's lots |
| Price | The price that would fill it |
The selected order
| Figure | Meaning |
|---|---|
| Title | Symbol, kind and volume; on the right what it would risk, as a %, or NO SL |
| ENTRY | The price that fills it |
| SL / TP | Its stop loss and take profit; none if not set |
| RISK | What it would lose if it filled and was stopped out, in money |
| DIST | How far the market is from the entry, in points |
| EXP | When it expires: GTC (until cancelled) or the date and time it lapses. The panel always places its own orders as GTC ; anything else comes from an order placed in the terminal, since the expiry cannot be chosen on the panel |
With ORDERS chosen, the position buttons give way to the order buttons in the same places:
| Button | What it does |
|---|---|
| DELETE | Delete the selected order |
| DELETE LAST | Delete the most recently placed order |
| DELETE ALL | Delete every managed pending order |
All three need a second click. Switching lists cancels a click still waiting for its second.
SETTINGS — four secondary tabs
Choose a secondary tab: RISK, DAILY, PROTECT or EXEC. Click a value to edit it or to step through its choices.
RISK holds the two limits a trader thinks in — per trade and per day — plus the maximum lot. DAILY holds the counts and what a reached limit does.
RISK
| Row | Meaning |
|---|---|
| RISK MODE | The default risk mode for the TRADE tab: % BALANCE, % EQUITY, MONEY or LOTS |
| RISK PER TRADE | The default risk of one trade. What the number means depends on RISK MODE, as explained just below this table |
| MAX DAILY LOSS | The most the account may lose in one trading day, as a %. A new trade is refused if it would take DAILY RISK past it; the day locks when the loss actually taken reaches it (see the RISK tab). Setting it to 0 (zero) turns it off |
| MAX LOT | Ceiling on any single trade. Setting it to 0 (zero) turns it off. The MAX LOT paragraph at the end of this section explains it |
| BLOCK IF NO SL | While any position has no stop loss, new trades are refused |
What RISK PER TRADE means in each mode. There is no fixed reference account. The panel reads your real balance and equity, and your account's currency (USD, EUR, GBP…), from your broker, and every amount it shows is in that currency. Taking a balance of 10,000 as an example:
| RISK MODE | RISK PER TRADE | The trade risks |
|---|---|---|
| % BALANCE | 1.00 | 1% of 10,000 = 100 |
| % EQUITY | 1.00 | 1% of the equity at that moment: with 200 of floating profit, 1% of 10,200 = 102 |
| MONEY | 150 | 150, whatever the balance |
| LOTS | 0.50 | 0.50 lots. What that risks depends on the stop; the TRADE tab shows it |
The percentages follow the account: when the balance grows to 12,000, that same 1% becomes 120.
What a percentage is measured against. Every percentage needs an amount to be a percentage of, and RISK MODE decides which:
- in % EQUITY, the equity — the balance plus or minus what the open positions are making or losing right now, so it moves with the market;
- in % BALANCE, MONEY and LOTS, the balance, which only changes when you close a trade.
It is the same amount for every percentage on the panel: RISK PER TRADE, MAX DAILY LOSS, and DAILY RISK with its CLOSED, OPEN and PENDING parts.
DAILY
| Row | Meaning |
|---|---|
| TRADES/DAY | Most trades opened in one trading day. Setting it to 0 (zero) turns it off |
| LOSERS/DAY | Most losing trades in one trading day. Setting it to 0 (zero) turns it off |
| DAY STARTS (H) | The server hour the trading day begins, 0–23 |
| LIMIT: BLOCK | When a limit is reached, refuse new trades for the rest of the day |
| LIMIT: DEL PEND | …and delete the panel's pending orders |
| LIMIT: CLOSE | …and close the panel's positions, but only when the limit reached is MAX DAILY LOSS; not on TRADES/DAY or LOSERS/DAY |
When LIMIT: CLOSE acts. It closes the panel's open positions at market, once, when the loss actually taken today — closed plus floating — reaches MAX DAILY LOSS. Not when TRADES/DAY (trades opened today) or LOSERS/DAY (losing trades closed today) is reached: those count trades, not money, and closing then would close the very trade that was just opened. It is off by default, because closing at market turns into a real loss what the stops might not have taken.
If every trade goes through the panel with a stop, it has nothing to do. The guard lets DAILY RISK reach MAX DAILY LOSS at most, so the day's loss only gets there when the last stop is hit, and the stops have already closed those positions. It is a safety net for losses the guard could not see coming, such as:
- a trade opened from the terminal or by another expert, which DAILY RISK counts but the guard cannot refuse;
- a stop moved further away, or removed, after the trade was opened;
- a gap or slippage past the stop, and swap and commission adding up.
An example, with a balance of 10,000 and MAX DAILY LOSS at 2% (200). 120 is already closed; the panel has a position that can lose at most 80 down to its stop, and a 1-lot trade opened from the terminal has no stop. With the panel's position 50 down, the moment the manual trade passes 30 the loss taken is 120 + 50 + 30 = 200: the day locks and LIMIT: CLOSE closes the panel's position, 30 before its stop. The manual trade is closed too only if the panel manages it — SETTINGS › EXEC › MANAGE on MANUAL or MANUAL+EA.
PROTECT
| Row | Meaning |
|---|---|
| PROTECTION | NONE, BE ONLY, TRAIL ONLY or BE+TRAIL |
| BE TRIGGER R | Profit, in R, at which the stop moves to break even |
| BE OFFSET PTS | Points past the entry the break-even stop is placed, so the trade covers its costs. It is measured in the symbol's points: 20 points are 2 pips on EURUSD but 0.20 dollars on BTCUSD. On indices, metals and crypto, raise it so it covers spread, commission and swap |
| TRAIL START R | Profit, in R, at which trailing starts. With BE+TRAIL it waits for the break-even stop to be in place, even if TRAIL START R is reached first |
| TRAIL METHOD | ATR (a multiple of the ATR) or FIXED (a distance in points) |
| ATR TIMEFRAME | The timeframe the ATR is read from. It is the ATR of the last closed bar, not of the bar still forming. ATR method only |
| ATR PERIOD | How many bars the ATR averages (14 by default). More bars give a steadier ATR that is slower to follow a change in volatility. ATR method only |
| ATR MULTIPLIER | How many ATRs behind the price the stop follows. At 1.5 with an ATR of 20 pips, the stop trails 30 pips behind the price. ATR method only |
| TRAIL STEP ATR | The stop only moves once it can move this much further, in ATR. ATR method only |
| TRAIL DIST PTS | How many points behind the price the stop follows (200 by default, that is 20 pips on a 5-digit pair). FIXED method only |
| TRAIL STEP PTS | The stop only moves once it can move at least this many points further (40 by default), so it is not modified on every tick. FIXED method only |
Break even and trailing are measured in R, so a position opened without a stop — which has no R — gets neither. See section 4.
EXEC
| Row | Meaning |
|---|---|
| MANAGE | Which trades the panel may modify and close: THIS EA, MANUAL+EA, ALL, MANUAL, MAGIC or SYMBOL. Risk always counts the whole account, whatever this says. Asks for a CONFIRM click |
| MAGIC ONLY / SYMBOL ONLY | The magic number or symbol for the MAGIC and SYMBOL modes. Shown only when MANAGE is in that mode |
| CONFIRM SECS | How long the second click of a confirmation stays valid |
| SLIPPAGE PTS | Maximum slippage accepted on a market order, in points |
| RT COMM/LOT | Commission per lot, round turn (RT). Setting it to 0 (zero) estimates it from the last 30 days of closed trades in the Account History tab |
| MAGIC NUMBER | The number the panel stamps on its own trades, and how it recognises them. On MetaTrader 4 it must fit a 32-bit integer (at most 2147483647); an order with a larger one is refused. Asks for a CONFIRM click |
Two rules govern settings:
- The panel wins over the inputs. What you set here survives restarts. The EA's inputs are only the starting point. The exception is an input you change on the Inputs tab of the EA's properties window (the one that opens when you drag it onto a chart, or with F7): that value then wins over the panel's.
- A looser limit waits for tomorrow. Raising a cap, switching one off, dropping an action on a reached limit, switching BLOCK IF NO SL off or moving DAY STARTS (H) is stored and applies from the next trading day. The row shows the new value, and beside it now … with the value that applies until then; the note at the bottom says so. A tighter limit applies at once. Raising your daily loss limit halfway through a bad day is exactly what this rule prevents.
RESET TO INPUTS puts everything back to the EA's inputs (two clicks).
MAX LOT is a ceiling on any single trade, whatever the risk asks for — a guard against a stop so tight that the lot explodes, or a fixed lot typed with a zero too many. Above it, the lot is cut to the ceiling, the figure reads LOTS MAX in amber for as long as it stays cut, and the status strip gives the risk the trade now carries:
Capped at your maximum lot, 0.30 - this trade risks 0.60%
A ceiling below the broker's minimum lot refuses the trade instead.
Whole account, not just this EA. The risk figures count every position on the account, whoever opened it. A trade you opened by hand on another chart still spends your daily budget. What the panel may modify or close is the MANAGE setting.
When a limit is reached, the trading day locks, and what that does is what the three LIMIT rows say. The lock survives a restart and releases when the trading day rolls over — not when you restart the terminal. A limit blocks a trade before it is sent, and says which figure blocked it:
BUY blocked. Daily loss limit: DAILY RISK 1.00% + this trade 0.50% > 1.30%
Continued in Part 2 of 2: automatic protection, several charts, how MetaTrader 4 handles your trades, files, inputs and troubleshooting.


