Risk Control Pro
- Utilitaires
-
Andres Eduardo Rodriguez Fortunato
I am a software developer and independent quantitative trading researcher with a passion for understanding how markets behave beyond traditional indicators. - Version: 1.19
- Activations: 5
Overview
Risk Control Pro is a MetaTrader 5 Expert Advisor (utility) for planning and checking trade risk before you enter. It draws three draggable horizontal lines (Entry, Take Profit, Stop Loss) and a panel with direction, distances, risk/reward, lot size, money and percent of balance, spread, commission, swap, and optional order buttons.
It is a risk tool. Order buttons send trades immediately when enabled; they do not open the standard MetaTrader order ticket. Always confirm lot size, stop distance, and account permissions before clicking.
Before you start
This product is an Expert Advisor (trade utility), not an indicator. MetaTrader allows only one EA per chart. To use it with another EA such as DualVisionAI, open a second chart of the same symbol.
In the EA Common tab, enable Allow Algo Trading. Also turn on AutoTrading in the toolbar (the button must show a green smiley on this EA).
To send orders from the panel:
- Turn on AutoTrading in the MetaTrader toolbar.
- Keep input Show order buttons enabled.
- The market session for the symbol must be open. Forex is typically closed on weekends.
If AutoTrading is off or the market is closed, the panel still calculates risk. Order buttons stay disabled and the last panel line explains why.
Chart objects
Horizontal lines (drag to set prices):
- Entry (blue) — planned fill price. Starts at the Bid/Ask midpoint.
- Take Profit (green)
- Stop Loss (red)
On first load, direction is BUY: Stop Loss is about 1× ATR(14) below Entry and Take Profit about 1.5× ATR above Entry. If ATR is not ready, a pip fallback is used. Line prices can be restored between sessions when persistence is enabled.
Panel (floating box):
- Risk metrics for the current lines and lot size
- Editable lot field
- Order buttons when trading is allowed
- Status line at the bottom
Close panel hides the box and leaves a small Open chip. The three lines stay on the chart.
How to use
- Attach Risk Control Pro from Navigator → Expert Advisors (not Indicators). Allow Algo Trading, then turn on AutoTrading.
- Drag Entry, Take Profit, and Stop Loss to the prices you want to evaluate.
- Read direction, R:R, lot size, and money / percent of balance in the panel.
- Adjust lot size if needed (see Auto lots below).
- If you want to place the trade from the panel, use an enabled order button. A click sends the order at once, with the current lot, TP, and SL.
On fast symbols (for example BTCUSD), price can move away from Entry in seconds. Market buttons then turn off and a pending type (Limit or Stop) may stay on. That is expected: Market requires Entry near the current Bid or Ask.
Direction
- BUY — Take Profit above Entry and Stop Loss below Entry
- SELL — Take Profit below Entry and Stop Loss above Entry
- INVALID — Take Profit and Stop Loss on the same side of Entry, or two lines on the same price. Order buttons stay off.
Only the matching side is enabled. A BUY layout never enables SELL buttons, and the reverse.
Order buttons
Which button turns on depends on Entry versus live Bid/Ask and the broker stop level:
- BUY Market / SELL Market — Entry is close to the fill price (Ask for buy, Bid for sell). Distance must be within the spread or SYMBOL_TRADE_STOPS_LEVEL, whichever is larger. The order is sent at market; TP and SL are taken from the lines.
- Buy Limit — BUY layout and Entry below Ask (buy cheaper if price falls to Entry)
- Sell Limit — SELL layout and Entry above Bid (sell higher if price rises to Entry)
- Buy Stop — BUY layout and Entry above Ask (buy if price breaks up to Entry)
- Sell Stop — SELL layout and Entry below Bid (sell if price breaks down to Entry)
Grey buttons do not send orders. There is no extra confirmation dialog.
Pending orders use the Entry line as the order price. Market orders ignore a far Entry and require it to be near the current quote.
Auto lots
Lot size can follow account risk or a value you type.
- AUTO — lot is calculated so that Stop Loss risk equals Risk % of balance (default 1%). Moving the Stop Loss updates the lot. The panel shows Lots [AUTO] and a suggested size.
- MAN — you edited the lot field. The value is kept until you press Auto lots.
Suggested lot is clamped to the symbol volume minimum, maximum, and step. Formula:
Lot = (balance × risk percent / 100) / (SL distance in pips or ticks × pip/tick value per lot)
You can also type auto in the lot field to return to AUTO.
Panel information
- Direction — BUY, SELL, or INVALID
- Entry / TP / SL — prices of the three lines
- Dist — Take Profit and Stop Loss distance in pips (Forex) or ticks (indices, crypto, and similar)
- R:R — Take Profit distance divided by Stop Loss distance. Color: red below 1, gold from 1 to 2, green above 2
- Spread — current spread in pips or ticks, and as a percent of Stop Loss. A warning appears when that percent is at or above Warn if spread > % of SL
- Lots — AUTO or MAN, suggested lot, and editable lot field
- Size — position value in account currency (lot × price × contract). This is the dollar amount the margin formula is based on, not what is taken from the account.
- Required — margin the broker locks (debits from free margin) to open that lot. LOW means free margin is below that amount. This is not Stop Loss risk. If Required is larger than your risk budget (balance × risk %), the line turns orange and shows >N% (for example min lot on gold needs more margin than 1% of a small account). If AUTO risk % implies a lot below the symbol minimum, the minimum lot is used and SL risk will be higher than the target percent.
- TP / SL money — estimated profit and loss in account currency, each as a percent of Size (position value), not of account balance. Account-balance risk remains on the Risk line.
- Commission — round-trip commission for the current lot, from the input (not read automatically from the broker)
- Swap/night — estimated overnight swap for the inferred direction. Shown as n/a for unsupported swap modes
- Net TP — Take Profit money minus commission plus one night of swap. Negative swap is a cost and reduces Net TP; positive swap increases it.
- BE — breakeven distance in pips or ticks covering spread and commission
- ATR — Stop Loss distance compared with ATR (for example 1.20× means SL is 1.2 times ATR)
- Risk % — Stop Loss money as percent of balance
- Nights — estimated nights of negative swap before net Take Profit is consumed; n/a when swap is not negative
The last line is status: ready, market closed, turn on AutoTrading, invalid lines, high spread, or the last order result / error.
Inputs
Open Inputs from the EA properties (right-click the chart, Expert List, RiskControlPro, Properties, Inputs).
Risk
- Risk % of balance — percent of account balance used to size the AUTO lot from Stop Loss (default 1.0). Must be greater than 0 and at most 100.
- Round-trip commission per lot — commission to open and close 1.0 lot, in account currency. Default 0. If your broker charges commission, enter the round-trip amount (example: 3.5 open + 3.5 close = 7). If the symbol is spread-only, leave 0. The panel shows “set input” while this is 0 so it is clear the value is not taken from the broker.
- ATR period — period of the Average True Range used for the first TP/SL placement and the ATR comparison (default 14).
- Warn if spread > % of SL — spread warning threshold as a percent of Stop Loss distance (default 25).
- Decimals for money / ratio — decimal places for money, percent, and R:R (default 2).
Lines
- Entry / TP / SL color — line colors
- Line width — thickness of the three lines
- Save line prices between sessions — when true, Entry/TP/SL are stored in terminal GlobalVariables per symbol and timeframe and restored on the next attach
Panel
- Corner — chart corner used as the panel origin
- Offset X / Offset Y — pixel offset from that corner
- ATR, % balance, swap nights — show or hide the extra metrics row
Trading
- Show order buttons — when false, the panel is read-only (no order buttons)
- Magic number — identifier written on orders sent by this EA
- Deviation (points) — maximum price deviation for market orders
- Order comment — comment string on sent orders
Pip and tick value
Monetary estimates use the symbol tick value:
Pip value per lot = SYMBOL_TRADE_TICK_VALUE × (pip size / SYMBOL_TRADE_TICK_SIZE)
Pip size:
- Forex with 3 or 5 digits — 10 × Point
- Forex with 2 or 4 digits — Point
- Other symbols (indices, crypto, and similar) — tick size; distances are labeled in ticks
These figures are estimates. Live fill, spread, commission, and swap depend on the broker and can differ from the panel.
Notes
Risk Control Pro does not guarantee profit, fill quality, or exact commission/swap. Fast markets can move between the panel update and the order. Use your own rules for risk, and check the lot field before sending an order. Removing the EA from the chart deletes its objects. Saved line prices remain in GlobalVariables only if persistence is enabled.
