Skip to content

Free MT5 Expert Advisor

One-Click Risk Panel EA

MT5 chart panel with Buy and Sell buttons that sizes lots from risk % and a stop in points or ATR, sets the take-profit by R and never trades without a stop.

Risk managementv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Stop-loss on every trade
Strategy
Opens a trade only when you press Buy or Sell on the panel; the stop is placed at the chosen distance, lots are calculated from your risk %, and the target is set as an R multiple.
Risk model
Risk % of balance per click (default 1%), stop-loss on every order, one panel position per symbol by default, no opposite positions

What it does

One-Click Risk Panel EA puts a small trading panel on the chart. You set the risk percentage, the stop distance and the reward-to-risk ratio, and the panel shows the lot size and money at risk live. Pressing Buy or Sell sends a market order with the stop-loss and take-profit already attached. It is the only EA in this collection that opens trades on request, and it never sends an order without a stop.

How it works

The panel uses the same sizing as the FXPIPS strategy EAs:

  • Stop distance = points × point size, or ATR multiple × ATR(14) of the chart timeframe.
  • Money at risk = balance × risk % ÷ 100.
  • Lots = money at risk ÷ (stop distance ÷ tick size × tick value), rounded down to the volume step and kept within the broker's limits.

If even the minimum lot would risk more than twice your budget, the order is refused. Before sending, the panel checks the spread limit, the broker stops level, free margin and whether a panel position is already open. Opposite positions are always refused, so the panel never hedges. The take-profit is entry ± R multiple × stop distance (0 = none). Optional break-even and ATR trailing manage panel trades.

Example (illustrative): with a 10,000 balance, 1% risk and a 300-point stop on EUR/USD, where one lot moves about 10 per pip, the risk is 100 and the stop is 30 pips, so the panel offers about 0.33 lots.

How to use it

Edit the three fields by clicking them, typing a value and pressing Enter; out-of-range values are rejected. Check the lots and risk line before you click. "Close panel positions" closes only positions with the panel's magic number on this symbol. Use a different magic number per chart if you run several panels.

Settings

InputDefaultWhat it changes
Stop modePointsPoints or ATR multiple
Default stop300 points / 1.5 ATRStarting stop value
Risk % / Fixed lots1.0 / 0Sizing (fixed lots override risk %)
Take-profit (R)2.0Starting target
One position onlytrueBlocks a second trade
Max spread (points)30Spread filter
Magic number26110410Identifies panel trades
Break-even / Trailingon at 1 R / offTrade management
Panel X / Y20 / 30Panel position

Limitations

Lot size relies on the tick value your broker reports, which for cross pairs changes with exchange rates. Market orders can slip, so actual risk can differ slightly. Chart buttons do not work in the Strategy Tester, so the panel can only be tried on a demo or live chart.

Before you run it live

Use it on a demo account first and compare its lot sizes with our Position Size Calculator. Confirm the stops level and spread on each symbol. Our lesson on what a lot is explains the sizing. Trading carries a substantial risk of loss.

Key inputs

Key inputs of One-Click Risk Panel EA
InputDefaultDescription
Stop modePointsStop distance in points or as an ATR multiple.
Default stop (points)300Starting stop distance in points mode.
Default stop (x ATR)1.5Starting stop distance in ATR mode.
Risk per trade (%)1.0Starting risk shown in the panel; editable on the chart.
Take-profit (R)2.0Target as a multiple of the stop; 0 for no target.
One position onlytrueBlocks a second panel trade on the same symbol.
Max spread (points)30Buttons refuse to trade when the spread is wider.

Educational tools, not advice. Automated trading can lose money quickly. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 expert advisors