G-Labs Trade Manager v4.0

The Ultimate MT5 Trade Management Panel

Pure UI — No BMP Dependencies — Zero DLL

8 Trail Modes 4 Risk Modes Stealth SL/TP OCO Breakout Stats + Equity Curve News Calendar Currency Strength Grid Orders 7 Tabs 15+ Hotkeys CSV Export Close at Time Daily P/L Tracker

1Installation & Setup

  1. Copy G-Labs Trade Manager v3.0.mq5 into your MQL5/Experts/ folder inside the MetaTrader 5 data directory.
  2. Restart MetaTrader 5 or press Ctrl+Shift+N to refresh the Navigator.
  3. Drag the Expert Advisor onto any chart.
  4. In the Inputs tab, configure your preferred settings (Magic Number, risk %, hotkeys, etc.).
  5. Click OK. The panel will appear in the top-left corner of your chart.
  6. Make sure AutoTrading is enabled (green play button on the toolbar).
The panel position is saved automatically. Drag the header bar to reposition it anywhere on your chart.

2Panel Overview

The panel is divided into 7 tabs, a header bar, and a status bar.

Header Bar

Tab Bar

Seven tabs across the top: Trade, Pos, Tools, News, Alerts, Stats, Config. Click to switch, or press 17.

Status Bar

The bottom bar shows live data at a glance:

ElementDescription
SymbolCurrent chart symbol in amber
Sp:Spread in points. Amber > 30pts Red > Max Spread
ML:Margin Level %. Color-coded: red < 200%, amber < 500%, normal otherwise
P/LFloating profit/loss across all positions
CountdownTime remaining until current candle closes (M:SS)
P:Number of open positions managed by this EA
SessionActive market session: TKY, LDN, NY (or overlap)
TimeServer clock time (HH:MM:SS)

3Trade Tab

The main tab for setting up and executing trades.

Account Info

Displays your Balance, Equity, P/L, and Free Margin in a compact two-column layout.

Risk Mode Selector

Four risk calculation modes are available as toggle buttons:

% Bal

Risk a percentage of your account balance per trade.

% Eq

Risk a percentage of current equity per trade.

Fixed $

Risk a fixed dollar amount per trade.

Lots

Use a fixed lot size regardless of SL distance.

Use the +/− buttons or type directly in the risk value field. Quick presets are available below (e.g., 0.5%, 1%, 2%).

RR Presets

Quick buttons to set the Risk:Reward ratio to 1R, 2R, or 3R.

SL / TP / RR Controls

Set your Stop Loss and Take Profit in pips, and the RR ratio. Each has +/− buttons for fine adjustment. The calculated Lot size, Risk $, and Reward $ are displayed live.

Live Trade Metrics

MetricDescription
ATR14-period Average True Range in pips (current timeframe)
PipVPip value in $ for the calculated lot size
MargEstimated margin required. Turns red if it exceeds free margin.

Breakeven & Trailing

Toggle BE and Trail on/off. Set the trigger value and choose between Pips or % of TP units. When trailing is ON, a row of 8 trail-mode buttons appears for quick switching.

RR Lock

When RR Lock is active, moving the SL (via +/− buttons or dragging the chart line) automatically adjusts the TP to maintain your R:R ratio. This keeps your risk/reward ratio consistent as you fine-tune your entry.

Partial Close (PC) Levels

Up to 4 partial-close levels (PC1–PC4) with adjustable percentages. Toggle PC on/off, or press Reset to restore defaults (25/50/75/100%).

Trade Controls Row

ButtonFunction
LinesToggle draggable Entry/SL/TP/BE/PC lines on the chart
Order TypeCycle: Market → Buy Limit → Sell Limit → Buy Stop → Sell Stop
FLIPSwap Buy/Sell direction while keeping SL/TP distances
VSL / Stealth SLVirtual SL hidden from broker
VTP / Stealth TPVirtual TP hidden from broker

Execution Helpers

Trade State Indicator

● READY TO TRADE — All checks pass. You can execute.

● BLOCKED: Spread 45 > 30 — One or more pre-trade checks have failed. The reason is shown.

Live BID / ASK / Spread

Displayed directly above the BUY/SELL buttons. The spread turns red when it exceeds your configured max spread.

BUY / SELL Buttons

Large, color-coded execution buttons. Labels change based on order type (e.g., "BUY LIMIT"). When Confirm mode is on, the first click arms the button ("CONFIRM BUY"), the second click executes.

CLOSE ALL

One-click button to close all open positions managed by this EA.

4Risk Management

💰

% of Balance

Calculates lot size so that if your SL is hit, you lose X% of your account balance.

📈

% of Equity

Same as above but uses current equity instead of balance, accounting for floating P/L.

💵

Fixed Dollar

Risk a fixed dollar amount per trade regardless of account size.

📦

Fixed Lots

Use a specific lot size. Useful for scalping or when you want direct control.

The lot size is always clamped to the broker's min/max lot and step size. The panel will never exceed your configured maximum lot.

5Chart Trade Lines

When Lines is toggled ON, draggable horizontal lines appear on the chart:

LineColorPurpose
EntryAmberThe price where your order will be placed. For market orders, this is informational.
SLRedStop Loss price. Drag to adjust; the panel recalculates lot size in real-time.
TPGreenTake Profit price. When RR Lock is on, this moves automatically with SL.
BEBlueBreakeven trigger level (when BE is enabled).
PC1–PC4Lime shadesPartial close trigger levels.

A shaded zone between SL and TP visually shows the trade's risk/reward area. A TRADE button appears on the entry line for one-click execution, and a FLIP button lets you reverse direction.

Drag the SL line and the panel instantly recalculates your lot size, risk in dollars, and (with RR Lock) your TP level.

6Stealth SL/TP

Stealth mode hides your Stop Loss and/or Take Profit from the broker. Instead of placing a real SL/TP with the order, the EA monitors price locally and closes the position when the level is reached.

Why use Stealth mode?

  • Prevents broker stop-hunting on your exact SL price.
  • Hides your trade management strategy from the broker's book.
  • Useful when trading with brokers you suspect may widen spreads at SL clusters.

How it works

  1. Toggle VSL (Stealth SL) or VTP (Stealth TP) before placing a trade.
  2. The order is sent with SL=0 and/or TP=0 to the broker.
  3. The EA stores the virtual levels internally and monitors every tick.
  4. When price reaches the virtual level, the EA closes the position via a market order.
Stealth SL/TP requires the EA to be running. If MetaTrader is closed or the EA is removed, your positions will have no protection. Always have a backup plan.

78 Trailing Stop Modes

When trailing is enabled and the position moves into profit beyond the trail trigger, the SL is progressively moved to lock in gains. Choose from 8 modes:

ModeCodeDescription
FixedFixTrail by a fixed number of pips behind the current price.
ATRATRTrail by ATR value × multiplier. Adapts to volatility.
Moving AverageMATrail SL to the Moving Average price (e.g., 20 MA).
CandleCndlTrail to the previous candle's high (sells) or low (buys).
Parabolic SARPSARTrail to the Parabolic SAR indicator value.
FractalFracTrail to the most recent fractal high/low.
RR-BasedRRMove SL in increments as position reaches 1R, 2R, 3R of profit.
Profit %P%Lock a percentage of unrealized profit by adjusting SL.
When Trail:ON, the trail mode selector appears directly on the Trade Tab for quick switching. No need to visit Settings.

8Positions Tab

View Modes

Toggle between OPEN (live positions) and HIST (trade history).

Symbol Filter

Click the filter button (shows All or the current symbol name) to toggle between viewing positions for all symbols or only the current chart symbol. This is especially useful when trading multiple pairs simultaneously — quickly focus on just the positions relevant to the chart you're looking at. The filter setting is persisted between sessions.

Quick Action Buttons

Close All

Close all open positions instantly.

Close +

Close only positions currently in profit.

Close −

Close only positions currently in loss.

Flatten

Close-by opposing positions (hedge netting).

Position Rows

Each open position displays two rows of information:

Row 1 — Main Info & Actions

ColumnDescription
#Last 5 digits of the ticket number
SymSymbol name
TypeBUY (teal) or SELL (red)
LotsVolume
P/LProfit/loss including swap & commission
PipsDistance in pips from entry
MManage — load position onto chart lines
BEMove SL to breakeven + offset
1/2Close 50% of the position
CLOSEClose the entire position

Row 2 — Details

P/L Progress Bar

A thin color bar beneath each position shows where the current price sits between SL and TP. Green when in profit territory, red when closer to SL.

Pending Orders

Listed below positions with symbol, type, price, volume, and a Delete button for each.

Summary

At the bottom: total open P/L, position count, win rate, profit factor, average win, and average loss for currently open positions.

History View

Switch to HIST to see closed trades over the last 7, 30, or 90 days with pagination.

9Tools Tab

Quick Actions

Close Buys

Close all buy positions.

Close Sells

Close all sell positions.

Close Profit

Close all profitable positions.

Close Loss

Close all losing positions.

Delete Pending

Delete all pending orders.

Reverse All

Reverse all open positions (close and reopen opposite).

Scale Out (2-Click Confirm)

Basket Management

Emergency (2-Click Confirm)

These are destructive actions. The first click arms the button (turns amber with "CONFIRM"), the second click executes.

Grid Orders

Configure Distance (pips), Count, and Multiplier (lot scaling). Then click Grid Buy or Grid Sell to place a ladder of limit orders.

Close at Time

Automatically close all open positions at a specific server time. Ideal for end-of-day or pre-news flat strategies.

When the set time arrives, all positions are closed, a toast notification is shown, and a sound alert plays. The timer automatically disables after triggering. The time setting persists between sessions.

10News Calendar Tab

Displays upcoming economic events from the built-in MetaTrader 5 calendar.

Filters

Event Table

Shows day, time, remaining time, currency, event name, and previous/forecast/actual values. Actual values are color-coded vs. forecast.

Chart Integration

Toggle On Chart to display news markers directly on the chart as vertical lines.

Time Modes

Switch between Local, Server, and GMT time display.

11Alerts & Scheduler Tab

Price Alerts

Click Add Alert to place an alert line at the current price. When price crosses the line, a notification fires. Up to 5 active alerts.

Task Scheduler

Schedule automated actions at specific times:

Tasks can be one-time or recurring (weekly).

Over-Trading Monitor

Displays today's trade count vs. max, weekly count vs. max, and daily loss vs. limit.

12Stats Dashboard Tab

A comprehensive performance analytics dashboard calculated from your trade history.

P/L Summary Cards

Today

Profit/loss for trades closed today.

Week

Profit/loss for the last 7 days.

Month

Profit/loss for the last 30 days.

Trades

Total number of closed trades.

Win Rate Bar

A visual progress bar showing your win percentage. Green if ≥ 50%, red if below.

Key Metrics

MetricDescription
Profit FactorGross profit / gross loss. Above 1.0 is profitable.
ExpectancyAverage profit per trade. Positive means your edge is profitable.
Avg RRRealized average risk:reward ratio.
Avg Win / Avg LossAverage dollar amounts for winning and losing trades.
Max DrawdownLargest peak-to-trough equity decline.
Best / Worst TradeLargest single win and largest single loss.
Gross ProfitTotal profit from all winning trades.

Streaks

Maximum consecutive wins and maximum consecutive losses.

Equity Curve

A visual mini equity curve rendered directly in the panel using colored bars. Each bar represents a closed trade, plotted as cumulative P/L. Green bars indicate cumulative profit, red bars indicate cumulative loss. A zero line is shown when the curve crosses from profit to loss territory. Start and end values are labeled. This provides an at-a-glance view of your trading trajectory without leaving the panel.

CSV Export

Click the Export CSV button in the top-right corner of the Stats tab to export the last 90 days of trade history to a CSV file. The file is saved to the MT5 Files/ directory and includes:

Perfect for importing into Excel, Google Sheets, or journaling tools like Edgewonk and TraderVue.

Account Summary

Balance, Equity, Free Margin, and Margin Level % at the bottom of the tab.

13Settings Tab

General

News Filter

Trade Filters

Save / Load Settings

Save all current panel settings to a file, or load them back. Settings persist across restarts automatically.

14OCO Breakout System

OCO (One-Cancels-Other) lets you place a breakout setup where you anticipate a move in either direction but don't know which way.

  1. Click Box to draw a Hedge Box on the chart.
  2. Drag the top and bottom lines to define your breakout range.
  3. Click OCO to place a Buy Stop at the top and a Sell Stop at the bottom.
  4. SL for each order is placed on the opposite side of the range.
  5. When one order triggers, the other pending order is automatically cancelled.

Use Cancel to remove the OCO pending orders at any time.

15Grid Orders

Place a ladder of limit or stop orders with configurable parameters:

ParameterDescription
DistDistance between grid levels in pips.
CntNumber of orders in the grid.
MulLot multiplier for each subsequent level (e.g., 1.5x martingale or 1.0 for flat).

Click Grid Buy or Grid Sell to deploy. All orders use your current risk settings as the base lot.

16Basket Management

17Currency Strength Meter

Click CS on the header to open the Currency Strength Meter heatmap.

  • Displays relative strength (0–10) for 8 major currencies: USD, EUR, GBP, JPY, AUD, CAD, CHF, NZD.
  • Calculation uses a weighted average of RSI values across M15 and H1 timeframes.
  • Scores > 7 = Strong (Green)
  • Scores < 3 = Weak (Red)
  • The heatmap window moves with the main panel.
Use the CSM to identify the strongest and weakest currencies, then trade pairs where you're buying strength and selling weakness.

18Hotkeys

Hotkeys are enabled via the InpHotkeys input. Press keys when the chart is focused:

KeyAction
17Switch to tab 1–7 (Trade, Pos, Tools, News, Alerts, Stats, Config)
BMarket Buy
SMarket Sell
CClose All Positions
EBreakeven All Positions
LToggle Trade Lines on chart
FFlip trade direction (Buy ↔ Sell)
DDelete all pending orders
RReverse all positions
HOpen hedge position
Shift+BPlace Buy Limit order
Shift+SPlace Sell Limit order
Shift+MMinimize / restore panel
Hotkeys only work when the chart window is focused. You can customize the Buy, Sell, Close All, and Breakeven keys in the EA inputs.

19Safety Features

Multiple layers of protection prevent accidental losses:

🛡

Margin Check

Blocks trade execution if required margin exceeds free margin.

Spread Gate

Blocks trades when current spread exceeds your max spread setting.

📰

News Filter

Blocks trading X minutes before and after high-impact news events.

📉

Drawdown Protection

Locks trading and optionally closes all positions when daily drawdown exceeds your limit.

🎯

Profit Target

Locks trading when daily profit target is reached, preventing over-trading.

🔒

Trade Confirmation

Two-click confirmation prevents accidental trade execution.

Over-Trading Protection

Limits trades per day, per week, and maximum daily loss.

🛑

Emergency Panic

Two-click panic buttons to instantly flatten everything.

20Notifications

TypeInputDescription
PushInpPushNotifySend push notifications to the MetaTrader mobile app.
EmailInpEmailNotifySend email alerts on trade events.
ScreenshotInpScreenshotAuto-capture a chart screenshot on trade execution.
SoundInpSoundAlertsPlay sound alerts for trades, breakeven, partial closes, and price alerts.
ToastBuilt-inOn-screen popup messages that appear above the status bar for 2.5 seconds.

21Profiles & Persistence

Quick Profiles (Trade Tab)

Three profile slots are available on the Trade tab:

Each profile stores: risk mode, risk %, lot size, SL/TP, RR ratio, virtual SL/TP, breakeven, trailing, and partial close settings.

Settings Persistence

All panel settings are automatically saved to an INI file when you close the chart or remove the EA. They are restored when you re-attach the EA. You can also manually save/load via the Settings tab.

Position State

Per-position state (breakeven status, trailing type, partial close levels) is persisted via MetaTrader's Global Variables, surviving EA restarts and terminal restarts.

22Input Parameters Reference

Panel

ParameterDefaultDescription
InpPanelX20Initial panel X position
InpPanelY40Initial panel Y position
InpMagic123456Magic number for order identification

Risk Management

ParameterDefaultDescription
InpRiskPercent1.0Default risk percentage
InpDefaultLots0.01Default lot size
InpMaxLots10.0Maximum allowed lot size

Trade Management

ParameterDefaultDescription
InpAutoBreakevenfalseEnable auto breakeven
InpBETrigger20.0Breakeven trigger distance
InpBEOffset2.0Breakeven offset (pips above entry)
InpAutoTrailingfalseEnable auto trailing stop
InpTrailStart20.0Trail activation distance
InpTrailStep5.0Trailing step size

Grid Orders

ParameterDefaultDescription
InpGridDistance20Distance between grid levels (pips)
InpGridOrders5Number of grid orders
InpGridMultiplier1.0Lot multiplier per level

Hotkeys

ParameterDefaultDescription
InpHotkeystrueEnable keyboard shortcuts
InpHK_BuyBBuy hotkey
InpHK_SellSSell hotkey
InpHK_CloseAllCClose All hotkey
InpHK_BEEBreakeven hotkey

Sessions

ParameterDefaultDescription
InpShowSessionstrueShow session boxes on chart
InpLondonStart/End7/16London session hours (GMT)
InpNewYorkStart/End12/21New York session hours (GMT)
InpTokyoStart/End0/9Tokyo session hours (GMT)

Notifications

ParameterDefaultDescription
InpPushNotifyfalseSend push notifications
InpEmailNotifyfalseSend email notifications
InpScreenshotfalseScreenshot on trade
InpSoundAlertstruePlay sound alerts

Equity Protection

ParameterDefaultDescription
InpUseMaxDDfalseEnable daily drawdown protection
InpMaxDD5.0Maximum daily drawdown (%)
InpUseProfitTargetfalseEnable profit target
InpProfitTarget3.0Daily profit target (%)
↑ Back to top