Trade Panel and Risk Manager PRO is an Expert Advisor for MetaTrader 5 that puts a trading panel on the chart: one-click orders sized by the % of the account you want to risk, entry, stop loss and take profit lines you drag on the chart, buttons to close all, close half or move the stop to break-even, and automatic break-even, partial close and trailing stop for your trades. It does not trade on its own: outside the Strategy Tester, orders are sent only when you click.
What it does
- Calculates the lot of each order from the risk you choose (% of balance or equity) and the stop distance, or uses fixed lots.
- Shows, before you click, the lots, the money at risk, its % of the account and the risk/reward ratio.
- Sends market orders with stop loss and take profit already set, or limit and stop orders placed with lines on the chart.
- Manages open trades: break-even, partial close and trailing stop, each one starting at a multiple of the initial risk (R).
- Checks the broker conditions (algo trading, minimum lot and lot step, free margin, stops level, spread) before every order and explains on the panel why an order was not sent.
How to add it to the chart
- Open the Navigator (Ctrl+N), expand Expert Advisors and drag Trade Panel and Risk Manager PRO onto the chart of the symbol you want to trade.
- In the Common tab, tick Allow Algo Trading. The Algo Trading button in the toolbar must also be on, otherwise the panel shows "Algo trading is disabled" and sends nothing.
- In the Inputs tab, set the risk, the default stop and target and the automatic management (all inputs are described below), then click OK.
- The panel works on the symbol of its chart. To trade another symbol, attach it to a chart of that symbol. Removing the Expert Advisor removes the panel and its lines from the chart.
- Test it first on a demo account until you know how each button and each automatic step behaves.
The panel
The panel is drawn at the top left of the chart and follows the Windows display scale (100% to 200%). From top to bottom:
- Title: "Trade Panel PRO" and the symbol. The - button collapses the panel to the title bar; + opens it again.
- Risk % (or Lots): the risk per trade or the fixed volume. Type a new value and press Enter. The use LOTS / use RISK % button switches between the two modes.
- Stop (points): the stop loss distance for the BUY and SELL buttons. The 1.5 x ATR button (the multiple comes from the inputs) recalculates the stop from the current ATR.
- Target (R): the take profit as a multiple of the stop distance (2 = target twice as far as the stop; 0 = no take profit). The LINES button turns the lines mode on and off (LINES ON in blue when active).
- SELL and BUY: market orders, with the current Bid and Ask on the buttons. In lines mode they are replaced by a single PLACE button.
- Two information lines: Lots | Risk (money and %) | 1:R for the next order, and Spread | ATR in points | Bid.
- CLOSE ALL, CLOSE 50% and BREAK-EVEN: actions on the trades managed by the panel (see the input Trades managed).
- AUTO ON / AUTO OFF: switches the automatic management on or off and summarizes it, for example "AUTO ON: BE 1.0R | 50% @1.0R | Trail 1.5R".
- Positions | Open | Today: number of managed positions, their open profit or loss, and today's closed result on this symbol.
- Status line: the last action or the reason an order was not sent (the same text goes to the Experts tab of the terminal).
Values typed on the panel are used while the Expert Advisor stays on the chart; when it is attached again, it starts from the inputs. The panel has no keyboard shortcuts: everything is done with the mouse.
Market orders in one click
- BUY opens a buy at the Ask and SELL a sell at the Bid, with the stop loss at the distance of the Stop field and the take profit at Target (R) times that distance.
- The volume follows the Risk % or Lots field; the information line shows it before you click.
- The status line confirms the order, for example "BUY 0.25 lots opened at 1.08452", or tells why it was refused.
Lines mode: entry, stop and target by drag-and-drop
- Click LINES: three dashed lines appear, blue for the entry, red for the stop loss and green for the take profit (no green line when Target is 0). They start as a buy limit half a stop below the price.
- Drag the lines with the mouse. A stop below the entry means a buy, a stop above the entry means a sell. The order type follows the entry: close to the price it is a market order; otherwise a limit or a stop order (BUY LIMIT, BUY STOP, SELL LIMIT, SELL STOP).
- Each line has a label: the entry shows the type, lots and price ("BUY LIMIT 0.25 lots @ 1.08200"); the stop shows the money at risk and its % of the account; the target shows the money and the R multiple, or "TP on the wrong side" in orange.
- The PLACE button shows what will be sent ("PLACE BUY LIMIT 0.25"). Click it to send the order; the lines are then removed. Click LINES ON to remove the lines without sending anything.
- Pending orders are good till cancelled, or valid for the day when the broker does not accept good till cancelled.
Position size by % risk
With Risk %, the lot is chosen so that a loss at the stop costs about the % of the balance (or equity) you set, rounded down to the broker's lot step. Example on a demo account with a balance of 10,000 USD: Risk 1% means about 100 USD at the stop. With a wider stop the lot is smaller; with a tighter stop it is larger. The amount at risk and its % are shown on the panel and on the stop line before you send the order.
When the risk is too small for the minimum lot, the order is refused with "Lot size below the minimum for this risk", unless the input Risk below the minimum lot: use the minimum lot is true; in that case the minimum lot is used and the real risk is higher than the % set (check the information line). With Lots, the fixed volume is used whatever the stop.
Automatic management
R is the distance between the entry and the initial stop of each trade. With the automatic management on (AUTO ON), the panel follows each managed position and, as the price moves in its favor:
- Partial close: at 1R (default) it closes 50% of the initial volume, once. A position too small to be split stays whole.
- Break-even: at 1R (default) it moves the stop to the entry price plus 10 points (the offset), once. If the stop is already there or beyond, nothing changes.
- Trailing stop: from 1.5R (default) the stop follows the price at 2 x ATR (or at a fixed number of points). The stop only moves in the direction of the trade.
- Trades opened elsewhere (manually or by another tool) are managed only when the input Trades managed is "All trades on this symbol (manual too)". Their R is taken from the stop they have when the panel first sees them; a trade without a stop loss is not managed.
- The management works while the Expert Advisor is on the chart and the terminal is connected. It does not run with the terminal closed.
Inputs
POSITION SIZE
- Position size (default "% of account at risk"): "% of account at risk" sizes each order from the risk; "Fixed lots" always uses the same volume.
- Risk per trade (%) (1.0): the % of the account at risk at the stop. Can be changed on the panel.
- Risk calculated on (Balance): Balance or Equity as the base of the %.
- Fixed lots (0.10): the volume in Fixed lots mode. Can be changed on the panel.
- Risk below the minimum lot: use the minimum lot (false): when true, small accounts can still trade the minimum lot even if it means more risk than the % set.
- Max spread for market orders (points, 0 = off) (0): above this spread the BUY and SELL buttons refuse the order ("Spread above the limit").
DEFAULT STOP AND TARGET
- Stop loss distance (ATR multiple): the initial stop of the panel, as a multiple of the ATR or in points.
- Stop loss (x ATR) (1.5): the ATR multiple, also shown on the ATR button of the panel.
- Stop loss (points) (300): the initial stop in Points mode.
- Take profit (x risk, 0 = none) (2.0): the initial target in R.
- ATR period (14): the ATR period, on the chart timeframe.
AUTOMATIC MANAGEMENT
- Manage trades automatically (true): the initial state of the AUTO button.
- Trades managed ("Trades opened by this panel"): with "All trades on this symbol (manual too)" the automatic management and the CLOSE ALL, CLOSE 50% and BREAK-EVEN buttons also act on manual trades and trades of other Expert Advisors on this symbol.
- Break-even at (x risk, 0 = off) (1.0).
- Break-even offset (points) (10): points beyond the entry where the break-even stop is placed (also used by the BREAK-EVEN button).
- Partial close at (x risk, 0 = off) (1.0).
- Partial close (% of initial volume) (50).
- Trailing stop (ATR multiple): Off, ATR multiple or Points.
- Trailing starts at (x risk) (1.5).
- Trailing distance (x ATR) (2.0) and Trailing distance (points) (400): the distance of the trailing stop in each mode.
PANEL
- Panel X (pixels at 100% scale) (20) and Panel Y (pixels at 100% scale) (60): position of the panel.
- Font size (9): text size of the panel and of the line labels.
- Magic number (260301): identifies the trades of this panel. Use a different number on each chart if you run more than one panel on the same symbol.
Invalid values (risk or lots of 0, partial close above 100%, ATR period below 2, font below 6) stop the Expert Advisor from starting, with a message in the Experts tab.
Checks before each order
- Algo trading allowed in the terminal and on the chart; trading open on the symbol.
- Stop loss and take profit on the correct side of the entry and not closer than the broker's stops level; a pending entry not too close to the price.
- Lot not below the broker's minimum; enough free margin; pending order limit of the account not reached; spread within the limit for market orders.
- When a check fails the order is not sent and the status line shows the reason, for example "Not enough free margin for 0.50 lots" or "SL/TP closer than the broker stops level".
Strategy Tester
In the Strategy Tester (visual mode), the panel opens a sample market trade every 24 bars when flat, alternating buy and sell, so that the break-even, partial close and trailing stop can be watched. This only happens in the tester; on a chart, orders are sent only by your clicks.
Tips and frequent questions
- The buttons do nothing. Read the status line: usually Algo Trading is off, the market is closed or a broker condition was not met.
- The Stop field shows "...". The ATR has no data yet; it fills in by itself after the first bars are loaded.
- Is the risk exact? The lot is rounded down to the lot step, so the risk is the same or a little lower than the % set (except with the minimum lot option). Gaps and slippage can make the real loss larger than planned.
- Two panels on the same symbol. Give each one its own Magic number, or the second one will also see the trades of the first.
- Panel too small or too big. Change Font size; the layout follows the Windows display scale.
Download
Trade Panel and Risk Manager PRO
Questions and suggestions: send me a private message through my MQL5 profile.
Trading involves risk of loss. The tool executes and manages orders as configured; test it first on a demo account. Results are not guaranteed.


