Installation
-
Copy TradeAssistantX_EA.ex5 to:
<MT5 Data Folder>\MQL5\Experts\ - Open the chart for the instrument you want to trade.
- Drag the EA from the Navigator panel onto the chart or right-click the EA and select "Attach to a chart".
-
In the EA settings:
- Configure your preferred inputs
- Enable Allow Algo Trading
- Click OK
- Ensure the MT5 Algo Trading button is green.
Panel Overview
On load, Trade Assistant X draws a single movable panel in the top-left corner of the chart, with your logo and the panel title on the top bar next to minimize (-) and close (X) buttons. Below the title bar sit four tabs:
- ▲▼ Trade — place market or pending orders
- ⛔ Close — manage and close open positions, kill switch
- ⚙ Settings — trailing, breakeven, partial close, and risk configuration
- ℹ Info — account/symbol stats, OCO, hidden TP/SL
Drag the top bar to reposition the panel anywhere on the chart. Click - to collapse it down to just the title bar, and click it again (or the small reopen control) to restore it with whichever tab you were last on.
Trade Tab — Placing Orders
Step 1 — One-Click Market Orders
Press the big BUY or SELL block to send a market order immediately, using the current Entry/Risk/SL/TP fields below them and the current live price shown on each button.
Step 2 — Or Switch to Pending / Lines Mode
- Market / Pending toggle — switches order type between an instant market fill and a pending order built from your levels
- Lines button — draws draggable Entry, SL, and TP lines on the chart so you can set up a trade visually instead of typing prices
- Cancel — clears the current setup and hides the lines without placing a trade
Drag the grey Entry line, the red SL line, or the green TP line to reposition them. Moving the Entry line shifts SL and TP with it (so your distances stay fixed) unless you drag SL or TP directly, which only moves that one level.
Step 3 — Order Setup Fields
- Ent. — entry price or points offset, with a stepper to nudge it up/down
- Risk field — label and behaviour follow whatever Risk mode is chosen on the Settings > Risk tab (Risk %, Fixed Lot, or Money)
- SL — stop loss, in points or price depending on the mode toggle
- R/R — desired reward-to-risk ratio, used to auto-place TP off your SL distance
- TP — take profit, with a Points / Price toggle that switches how SL and TP are both entered and displayed
- Comment — free-text comment attached to the order (auto-trimmed to MT5's 31-character limit)
Once everything looks right, press Place Order at the bottom of the tab to send the trade. A status line above the button reports the result.
Settings Tab — Risk
Choose how the EA sizes every trade:
- Risk % — lot size is calculated from account balance and a risk percentage you set
- Fixed Lot — every order uses the same fixed lot size
- Money — lot size is calculated from a fixed cash amount you're willing to risk per trade
The mode you pick here also changes the label and behaviour of the Risk field on the Trade tab. An Est. Lot field shows the lot size the current SL distance would produce, so you can sanity-check before placing the trade.
Settings Tab — Trailing Stop
Two independent trailing engines are available, each with its own Enabled toggle, so you can run either one, both, or neither:
Points-Based Trailing
- Start — profit in points needed before trailing begins
- Step — minimum points of new profit before the stop moves again
- SL Distance — how far behind price the trailing stop is kept, in points
% of TP-Based Trailing
- Start % TP — trailing begins once profit reaches this percentage of the trade's take profit distance
- Step (pts) — minimum point move before the stop advances again
- Lock % Profit — percentage of the TP distance locked in once trailing is active
Settings Tab — Breakeven
- Enabled toggle for automatic breakeven
- Mode — trigger by a fixed points value or a percentage of the trade's TP distance
- BE Trigger — the points or percentage threshold that arms breakeven
- BE Plus — extra points added past entry so the stop locks in a small profit rather than landing exactly on breakeven
- Set BE Now — manually forces every open position on the symbol to breakeven immediately, regardless of the trigger
Settings Tab — Partial Close
Up to 5 profit-side levels (TP1–TP5) and 2 defensive stop-loss-side levels (SL1–SL2), each with its own Enabled toggle, trigger distance, and close amount:
- Enabled — master toggle for the partial close system
- Trigger mode — Points or % of TP, applied to every level's distance field
- Close mode — % Close (percentage of the position) or Lot Close (a fixed lot amount), applied to every level's close-size field
- TP1–TP5 — profit-side levels; each fires once per position as price moves in your favour
- SL1–SL2 — defensive levels that trim size if the trade moves against you before recovering
- Instant Close % — type a percentage and press Close % Now to manually close that portion of every open position immediately
Each level triggers once per position — it won't re-fire on the same trade after it's been hit.
Close Tab — Position Management & Kill Switch
Manual Close Controls
- Close Buy / Close Sell / Close All — close open positions on the symbol by direction
- Pending Buy / Pending Sell / Pending All — cancel pending orders by direction
Exposure Summary
Read-only fields show Float P/L, Equity, Buy P/L, Sell P/L, Buy/Sell position counts and lots, Swap, Commission, and Margin in use.
Kill Switch (Max Drawdown Protection)
- Enabled — arms the kill switch
- Mode — switch the Max Loss / Max Profit fields between a percentage of balance and a flat money amount
- Max Loss — closes all positions the moment floating loss crosses this threshold
- Max Profit — closes all positions the moment floating profit crosses this threshold, locking in gains
Info Tab
A live dashboard of account details (Balance, Equity, Free Margin, Margin, Margin Level, Leverage) and symbol details (Bid, Ask, Spread, Digits, Point, Contract Size, Volume Min/Max/Step), plus a live clock pinned to the top-right corner of the panel.
- Enable OCO? — turns on One-Cancels-Other: placing/filling a position automatically cancels any remaining pending orders on the symbol
- Hide TP/SL — switches on Virtual SL/TP mode
Virtual SL/TP (Hidden Stops)
Virtual SL/TP hides broker-side stop loss and take profit levels.
The EA internally monitors price and closes positions automatically when a virtual level is reached.
- Broker SL/TP removed from the order
- Internal EA monitoring while MT5 is running
- Virtual chart lines still displayed for reference
- Automatic market close on trigger
Lot Size Calculation
When Risk % or Money mode is active:
- Risk amount is calculated from account balance (Risk %) or taken directly (Money mode)
- Stop distance is measured in points from the current SL
- Point/pip value is calculated for the symbol
- Final lot size is normalised to the broker's volume min/max/step rules
Known Limitations & Notes
- Single symbol per EA instance
- Close/Settings actions apply to all positions on that symbol, not per-ticket
- Virtual SL/TP requires continuous EA operation
- Broker filling mode compatibility may vary
- Slippage/deviation setting uses points, not pips
Quick-Start Checklist
- Algo Trading enabled
- EA attached correctly
- Risk mode selected (Risk % / Fixed Lot / Money)
- Magic number configured
- Trailing and Breakeven settings reviewed
- Partial close levels reviewed
- Tested on demo before live use