TraderIsMe-Auto-Lots-Calculation-EA is a MetaTrader EA that automatically calculates lot size from the positions of horizontal lines (TP / EN / SL) you draw on the chart, then places orders with one click of the SELL / BUY button. It supports both MT4 and MT5 and works on Forex, CFDs, and crypto. Account currency is auto-detected.
This article is a reference for the EA’s features and input parameters. For heartbeat authentication, plan requirements, and API key setup, please also see the usage guide (coming soon in English).
Download
MT5 download
TraderIsMe-Auto-Lots-Calculation-EA-MT5.zip MT5MT4 download
TraderIsMe-Auto-Lots-Calculation-EA-MT4.zip MT4* Unzip and place the extracted .ex5 / .ex4 into MT’s data folder MQL5/Experts/ or MQL4/Experts/, then refresh the Navigator.
Overview
- Supported platforms: MetaTrader 4 / MetaTrader 5
- Licensing: heartbeat authentication tied to your TraderIsMe account (available on the FREE plan with periodic upgrade notifications)
- Markets: Forex, CFDs, crypto. Account currency is auto-detected
Main Features
- Drag the TP / Entry / SL horizontal lines to auto-calculate lot size that fits your specified loss condition
- Choose between “Fixed Loss Amount” and “Percentage of Margin (%)” calculation modes
- Toggle between market orders and pending orders
- When SL exceeds 1% of margin, the label is shown in a warning color
- Option to preserve line positions when switching timeframes
- Two-row close button layout at the bottom of the panel — “Close All” (every symbol) and “Close” (current chart symbol only), each individually toggleable
- Live readout on the close buttons showing total open Pips or PnL (1-second refresh). Font color flips automatically: blue when positive, red when negative
- Pip Size resolves on Auto (FX / CFD / crypto / indices / metals / stocks classified via price-band heuristics). Manual override available (1 / 0.1 / 0.01 / 0.001 / 0.0001)
- Auto-retry for filling modes (FOK / IOC / RETURN) on order send, absorbing broker-specific spec differences
Requirements
- MetaTrader 5 terminal
- A TraderIsMe account and an Account API key (issue it on the Settings page)
- Add
https://app.traderis.meto MT5’s WebRequest allowed URL list
Usage Flow
- Place the EA file
TraderIsMe-Auto-Lots-Calculation-EA.mq5into MT5’sMQL5/Experts/and refresh the Navigator. - Drag and drop the EA onto any symbol’s chart.
- On the “Common” tab, check “Allow Algo Trading.” On the “Inputs” tab, enter your Account API key in
InpAccountApiKey. - Three horizontal lines (blue = TP, green = EN, red = SL) are drawn on the chart automatically. Adjust them by dragging.
- Calculated lot size, PnL, and risk-reward are shown on the right-hand panel.
- Clicking the SELL / BUY button at the bottom of the panel places an order with the displayed lot size.
Input Parameters
Calculation Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
InpCalcMode | enum | Margin N% | Lot calculation mode. Fixed Amount (lot sized to match InpLossAmount loss) or Margin N% (sized to match InpLossRate percent) |
InpLossAmount | double | 100 | Allowed loss amount in “Fixed Amount” mode (account currency) |
InpLossRate | double | 1.0 | Allowed loss percent in “Margin N%” mode. 1.0 = 1% of balance |
InpOrderType | enum | Pending | Order type. Market (instant fill) or Pending (limit/stop at entry price) |
InpMagicNumber | long | 202501 | Magic number to distinguish from other EAs and manual trades |
Line Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
InpColorTP | color | DodgerBlue | Color of the TP (take-profit) line |
InpColorEN | color | LimeGreen | Color of the EN (entry) line |
InpColorSL | color | Red | Color of the SL (stop-loss) line |
InpColorSLWarn | color | Pink | Warning label color when SL exceeds 1% of margin |
InpLineWidth | int | 2 | Line width (px) |
InpInitBars | int | 50 | Reference point for placing TP / SL on EA startup. Uses the high / low of the most recent N candles |
Panel Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
InpGripColor | color | SlateGray | Color of the grip bar at the top of the panel |
InpInitPips | int | 30 | Initial SL / TP offset on EA startup (pips) |
InpOTypeFontSize | int | 8 | Font size for the order-type label in the panel |
InpOTypeFontColor | color | White | Font color for the order-type label in the panel |
Label Placement
| Parameter | Type | Default | Description |
|---|---|---|---|
InpLabelAnchor | enum | Right | Anchor for price labels (TP/EN/SL price). Right or Left |
InpLabelOffset | int | 150 | Horizontal offset from the anchor (px) |
InpShowPips | bool | true | Whether to show distance from entry (pips / points) on TP / SL labels |
Timeframe Change Behavior
| Parameter | Type | Default | Description |
|---|---|---|---|
InpKeepLinesOnTF | bool | true | Whether to preserve line positions when switching timeframes. false resets to initial positions on change |
Close Button Settings
The bottom of the panel can show two close buttons: Close All (closes every open position across all symbols) and Close (closes only positions for the current chart symbol). Each button can be independently shown or hidden to avoid accidental clicks. Each button can also display the total open Pips or PnL of its target positions in real time, with the font color switching automatically between positive and negative.
| Parameter | Type | Default | Description |
|---|---|---|---|
InpShowCloseAll | bool | true | Show the Close All button (closes every open position across all symbols) |
InpShowCloseSymbol | bool | false | Show the Close button (closes only positions for the current chart symbol) |
InpCloseBtnHeight | int | 25 | Close button height (px). Panel height auto-adjusts to the number of visible buttons |
InpCloseBtnFontSize | int | MT5:8 / MT4:9 | Close button font size. Font is Meiryo Bold (supports Japanese glyphs) |
InpCloseBtnDisplay | enum | Pips | Button readout mode. Pips (total open pips) / Money (PnL in account currency) / Off (no number). Updated every second |
InpCloseBtnPipSize | enum | Auto | Pip-size resolution. Auto recommended (FX = 0.01 for JPY pairs / 0.0001 for others; non-FX classified by price band). Manual override: 1 / 0.1 / 0.01 / 0.001 / 0.0001 |
InpCloseBtnColorPlus | color | DodgerBlue | Font color when the total is positive (open profit) |
InpCloseBtnColorMinus | color | Tomato | Font color when the total is negative (open loss) |
Subscription
| Parameter | Type | Default | Description |
|---|---|---|---|
InpAccountApiKey | string | “” (empty) | TraderIsMe Account API key. Paste the UUID issued on the Settings page. Used for heartbeat authentication |
Notes
- Heartbeat authentication: the EA performs its first authentication 60 seconds after startup, then checks plan status with the TraderIsMe server every 60 seconds. On the FREE plan, a notification message appears every 15 minutes, but the EA’s functionality is not restricted.
- Available plans: usable on every plan (FREE / BASIC / PRO). On the FREE plan, periodic notifications appear in MetaTrader. Upgrading to BASIC or PRO stops the notifications (see How to use free EAs).
- WebRequest URL allowance: unless
https://app.traderis.meis allowed in MT5’s “Tools → Options → Expert Advisors,” the heartbeat will fail and lock immediately. - Supported symbols: Forex, CFDs, and crypto. Symbol specs (Tick Value / Contract Size) are auto-fetched, but broker-specific symbol definitions may cause lot sizes to differ from expectations. Verify with a small trade first.
- When SL exceeds 1% of margin: a warning label is shown in the color specified by
InpColorSLWarn(pink by default). Calculation still runs, but double-check before ordering since the risk is high. - Magic number: when running alongside other EAs or manual trades, change
InpMagicNumberto a non-conflicting value.
Related Documents
- Set Up MT4/MT5 Data Sync (Data Sync EA)
Download
MT5 download
TraderIsMe-Auto-Lots-Calculation-EA-MT5.zip MT5MT4 download
TraderIsMe-Auto-Lots-Calculation-EA-MT4.zip MT4* Unzip and place the extracted .ex5 / .ex4 into MT’s data folder MQL5/Experts/ or MQL4/Experts/, then refresh the Navigator.