Risk Trade Manager MT5
- ユーティリティ
- バージョン: 1.4
- アップデート済み: 28 11月 2026
- アクティベーション: 10
Risk Trade Manager MT5 is a utility (Expert Advisor) for MetaTrader 5 that turns three chart lines into a sized order and manages the trade. You drag the entry, stop-loss and take-profit lines, read the lot for your risk and press OPEN to send a market or pending order.
It opens a trade only when you press OPEN and then CONFIRM. It has no strategy and gives no signals.
Run the free demo in the Strategy Tester on your own symbol before you decide. In the tester it opens demo trades from its own lines.
It opens a trade only when you press OPEN. It has no strategy and gives no signals.
Standalone: Everything is built in. You do not need to buy or install any other product named on this page.
In plain words
Most losses of new traders come from the wrong lot size and from stops that are moved or forgotten. This utility fixes both with chart lines.
You decide how much money you accept to lose on a trade. That is your risk. You drag a stop-loss line to where the idea is wrong. The manager gives the lot that fits.
After the order is open, it can close part of the trade at profit levels, move the stop to break-even and trail the stop. All three are optional.
R is the distance from entry to stop. A profit of 2 R is twice that distance.
It does not choose entries. It sizes and manages trades you decide on.
What it does, step by step
- You press BUY or SELL. Three lines appear: entry, stop-loss and take-profit. The stop is 1.5 x ATR(14) from the entry and the target is 2 x the stop.
- You drag the lines. The chart shows a loss zone and a profit zone behind the candles, with price, money and R on each line.
- The panel shows the lot, the money at the stop and target, and the reward:risk ratio.
- You press OPEN. The button turns into CONFIRM with the side and lot. You have 5 seconds to press it. A drag or another button cancels it.
- Before it sends, the manager checks the order (see Key facts). If something is wrong, the panel says what and nothing is sent.
- With the entry line following the price, a market order is sent. With a dragged entry line, a limit or stop order is sent, chosen from where the line is.
- Then it manages the trade as you set it: partial closes, break-even and a trailing stop.
Key facts
| Type | Utility (Expert Advisor) with a panel and chart lines, for MetaTrader 5. Paid. |
| Opens trades | Only when you press OPEN and then CONFIRM within 5 seconds. A drag never sends an order. In the Strategy Tester only, it opens demo trades from its own lines every few hours. |
| Lot size | Calculated from your risk and the stop. Rounded down to the lot step. Below the minimum lot, nothing is rounded up. The panel shows the minimum lot's risk. |
| Stop and target | Taken from your lines and sent with the order. Management moves only the stop, and only in the trade's favour. |
| What it changes | The orders it sends, and the stops and volumes of the trades it manages. By default these are its own trades (magic number 771500). You can include every trade on the chart's symbol. |
| What it never does | It opens no trade by itself on a live or demo account, has no entry rules, and never widens a stop. |
| Alerts | None. |
| Reload and restart | R is stored per trade. Moving the stop later does not change the R levels, and a restart keeps them. |
| Tested on | XAUUSD and EURUSD (September 2026); the pre-trade check also on GBPJPY and XAUUSD with a $100 deposit. Tester results are not live results. |
| Other products needed | None. Prop Rules Guard MT5 is optional. |
Quick start
- Attach it to the chart of the symbol you trade and turn Algo Trading on.
- In the inputs, set "Risk measured as" and "Risk per trade". The default is 1.0% of the balance.
- Press BUY or SELL to place the lines. Drag them. Press OPEN, then CONFIRM within 5 seconds.
- Set the partial close, break-even and trailing stop in the inputs (0 = off). Partial close 1 is on by default.
The defaults work without tuning. Test a trade on a demo account first.
Who it is for
For traders who enter by hand and want the lot sized for a risk they choose. Partial closes, break-even and a trailing stop are handled for them. It also suits traders who place orders from chart lines.
Not for you if you want an automatic strategy. It cannot make a trade profitable.
How it works under the hood
Sizing
- Size: risk as a % of the balance, a % of the equity, or a fixed amount of money. The lot is rounded down to the broker's lot step, so the money at the stop is never above the risk you set.
- Lot: floor(risk / (loss per lot + commission) / lot step) x lot step.
- Commission: on accounts that charge commission, it is added to the money at the stop and taken off the money at the target. The figure comes from your own recent deals on the symbol, or you type it in. The spread needs no extra step: a buy opens at the ask and its stop fills at the bid.
- Loss per lot: taken from the symbol's tick value and the terminal's own profit calculation, whichever is larger. It works on forex, gold, indices and crypto in any account currency.
Sending the order
- Market or pending: while the entry line follows the price, it sends a market order. Drag the line and it sends a limit or stop order.
- Checks: free margin, the broker's stop level, the spread, an open market and Algo Trading on. Then a dry run of the exact order with the terminal's own order check. Volume, freeze levels and broker order limits are checked too. An order the broker would reject is not sent.
- Confirmation: on the chart (default), in a pop-up window, or none. With none, OPEN sends at once.
Managing the trade
- Scale out: up to 3 partial closes, each at its own profit of x R. Each closes a share of the opening volume, for example 50% at 1 R, 25% at 2 R and 15% at 3 R. Each step runs once per trade. A step that would close less than the minimum lot is skipped.
- Break-even: at x R, plus a few points to cover costs.
- Trailing stop: by ATR or by points, starting at x R. A stop only moves in the trade's favour, in steps of at least a tenth of R.
- Buttons: close all, close half, break-even now.
- Lock: while Prop Rules Guard MT5 has the account locked, it refuses new orders.
On the chart
Each scale-out step shows as a dashed line with its share and R, for example "50% · 1R". Colours follow the chart background or are set by hand. A colour-blind friendly option uses blue and orange.
Inputs
| Input | Default |
|---|---|
| Risk measured as | % of balance (or % of equity, or fixed money) |
| Risk per trade | 1.0 |
| Commission (added to the risk) | from my recent deals on this symbol - or fixed per lot, or ignore |
| Commission per lot, open + close (when Fixed) | 0.0 |
| Stop distance when the lines are placed | 1.5 x ATR(14); target 2 x the stop |
| Magic number of this manager's trades | 771500 |
| Confirm an order | on the chart: OPEN, then CONFIRM within 5 seconds (or a pop-up window, or none) |
| Refuse new orders while Prop Rules Guard is locked | on |
| Manage | trades opened by this manager (or every trade on this symbol) |
| Partial close 1 | 50% of the opening volume at 1 R (0 = off) |
| Partial close 2, 3 | off (set a level in R and a %; each level above the one before, less than 100% in total) |
| Break-even | at 1 R, plus 10 points (0 = off) |
| Trailing stop | off (or ATR(14) x 2, or 300 points); starts at 1 R |
| Risk/reward box on the chart | on |
| Colours | auto, from the chart background (or dark, light); colour-blind friendly option |
| Panel | corner, margins, font size |
| Debug log for bug reports | false |
Strategy Tester
In the tester only, the manager opens demo trades from its own lines every few hours. You can watch the sizing, partial close, break-even and trailing in visual mode. On a live or demo account it never opens a trade by itself.
How it was checked
- Compiled with 0 errors and 0 warnings.
- Sizing with commission: Strategy Tester, XAUUSD and EURUSD, September 2026, demo trades, commission ignored, auto and fixed 7 per lot. 159 sized trades matched lots = floor(risk / (loss per lot + commission) / lot step) x lot step: 0 wrong. The money at the stop was never above the risk.
- Scale-out: three steps (1R 50%, 2R 25%, 3R 15%). EURUSD had 20 partial closes on 8 positions. XAUUSD had 19 on 9 positions. 11 positions went through all three steps. Order, level reached and lots were right every time: 0 wrong, 0 errors.
- Pre-trade check: runs with and without the check opened identical trades, with 0 error lines. Trades: EURUSD H1 1,038, XAUUSD D1 72, GBPJPY H1 981, XAUUSD H1 with a $100 deposit 846. In the case tests a lot under the minimum and 10,000 lots were blocked, and a minimum lot with a far stop passed.
Not covered: an account that really charges commission (the tester charges none), so the automatic commission mode was only seen returning 0.
Limits
- A trade without a stop loss has no R. It is not partially closed, moved to break-even or trailed.
- Management runs while the terminal runs. If the terminal is off, the stop and target sent with the order stay at the broker. Partial closes and trailing wait until it is back.
- The lot is rounded down, so the risk is at or slightly below the amount you set. Slippage and gaps can make a stop fill further away.
- It works on one symbol per chart.
- It does not choose entries and cannot make a trade profitable.
FAQ
Will it make my trades profitable? No. It sizes and manages trades you decide on. It does not choose entries.
Can it open a trade by mistake? A trade needs OPEN and then CONFIRM within 5 seconds. A drag or another button cancels the step. A drag never sends an order.
Is the risk exact? The lot is rounded down to the lot step, so the risk is at or slightly below the amount you set. Slippage and gaps can make a stop fill further away.
Does it work with other EAs? Yes. Set "Manage" to the trades it opened, so it leaves other EAs' trades alone.
What if the terminal is closed? The stop and target sent with the order stay at the broker. Partial closes and trailing wait until the terminal is back.
Does it work on gold, indices and crypto? Yes, in any account currency.
Can I run it on a VPS? Yes, like any Expert Advisor, with the terminal and chart running.
Try it first
Run the free demo from this page in the Strategy Tester on your own symbol. In visual mode you can watch the sizing, partial closes, break-even and trailing.
The free Risk Position Tool shows the same lines, lot size, risk and reward without sending or managing any order. You do not need it to use the manager.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Prop Rules Guard MT5 | Put the Guard on one chart of the prop account. | The manager refuses new orders while the Guard's lock is on. |
| UT Bot Signal Alerts or SuperTrend Signal Alerts | Put the indicator on the chart for the idea. Send the order from the manager. | The indicator shows where. The manager sizes and manages the order. |
Keep "Manage" on the trades it opened if other EAs trade the same symbol.
Related products
- Risk Position Tool - the same lines, lot size, risk and reward, without sending or managing any order.
- Risk Trade Manager MT4: the same Expert Advisor for MetaTrader 4.
- All my products on MQL5
Custom work
Want a custom version of this tool, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk. This utility calculates and manages orders you choose; it does not predict the market.
