CORE AUTOMATION & METATRADER ARCHITECTURE
Foundational file formats, execution primitives, and market pricing terms used across MT4 and MT5.
- Expert Advisor (EA)
- An automated trading program built for MetaTrader 4 or MetaTrader 5 that monitors incoming price ticks, evaluates technical or quantitative rules, and executes or manages orders automatically without manual confirmation.
- EX4 / EX5 Files
- Compiled binary executable files generated from MQL4 (.ex4 for MetaTrader 4) or MQL5 (.ex5 for MetaTrader 5) source code. EX4 and EX5 files are platform-specific and cannot be executed across different MetaTrader major versions.
- MQL4 / MQL5
- MetaQuotes Language 4 and MetaQuotes Language 5—the C++-like proprietary programming languages used to code Expert Advisors, custom indicators, scripts, and library modules for MetaTrader terminals.
- Technical Indicator
- A mathematical calculation derived from historical price, tick volume, or open interest (such as ATR, RSI, or Moving Averages) plotted on charts or read programmatically by an EA via handles or iCustom calls without placing trades directly.
- Magic Number
- An integer identifier stamped onto every order submitted by an Expert Advisor so the robot can distinguish its own positions and pending orders from manual trades or other EAs running on the same account.
- Slippage
- The price difference between the quote visible when a market or stop order is sent and the actual fill price returned by the broker matching engine, most noticeable during macroeconomic releases or thin liquidity rollovers.
- Spread (Bid-Ask Spread)
- The difference between the Ask price (to buy) and the Bid price (to sell) quoted by a broker. Spread acts as an immediate transaction cost and fluctuates dynamically on variable-spread accounts.
- Raw / ECN Account
- A brokerage execution account that passes interbank or liquidity-provider spreads (often starting near 0.0 pips on major pairs) directly to the terminal while charging a transparent per-lot round-turn commission.
- Forex Market
- The decentralized global over-the-counter market where national currencies trade 24 hours a day across Sydney, Tokyo, London, and New York sessions, generating $7.5+ trillion in daily turnover according to the BIS Triennial Central Bank Survey.
- Pip & Point (Pipette)
- A pip is the standard price increment for currency pairs—0.0001 on most five-decimal pairs and 0.01 on JPY pairs—while a MetaTrader Point represents the smallest quoted fractional digit (one-tenth of a pip on 5-digit feeds).
- Lot Size (Standard, Mini, Micro)
- The standardized contract volume unit in MetaTrader: 1.00 standard lot equals 100,000 units of the base currency, 0.10 (mini lot) equals 10,000 units, and 0.01 (micro lot) equals 1,000 units.
STRATEGY MECHANICS & RISK METRICS
Execution styles, position sizing methodologies, and quantitative performance measures.
- Scalping
- A high-frequency intraday approach targeting small price movements over seconds or minutes. Automated scalpers depend heavily on raw spreads, low commission, minimal slippage, and low-latency broker connectivity.
- Grid Trading
- An algorithmic framework that places buy or sell orders at fixed pip or ATR intervals above and below a reference level to capture mean-reverting oscillations. Unhedged grids accumulate substantial floating drawdown during sustained one-way trends.
- Martingale Sizing
- A progressive position-sizing rule that multiplies lot size (e.g., 1.5x or 2.0x) after losing trades so a single reversal recovers cumulative losses. Martingale sizing carries exponential margin exhaustion risk during extended adverse runs.
- Hedging (vs. Netting)
- An account accounting mode—standard on MT4 and optional on MT5—that permits holding simultaneous opposing Buy and Sell positions on the same symbol, whereas Netting mode aggregates all fills on a symbol into one net position.
- Drawdown (Balance vs. Equity Drawdown)
- The peak-to-trough decline in account value over a measured period. Balance drawdown measures closed realized losses, whereas Equity (floating) drawdown captures live unrealized losses on open positions and governs margin survival.
- Profit Factor
- The ratio of gross profits across winning trades divided by gross losses across losing trades. A profit factor below 1.0 indicates net loss, while values between 1.3 and 2.5 over large out-of-sample trade counts suggest viable expectancy.
- Sharpe Ratio
- A risk-adjusted return metric comparing excess portfolio return above the risk-free rate against the standard deviation of returns. Higher Sharpe ratios indicate smoother equity growth relative to return volatility.
- Stop Loss (SL)
- A protective order instruction stored on the broker server that closes an open position if price reaches a predefined adverse threshold, capping downside even if your trading terminal or VPS disconnects.
- Take Profit (TP)
- A server-side limit target attached to an open order that automatically liquidates the position to realize gains once the market trades at or beyond the specified price level.
- Trailing Stop
- A dynamic stop-loss mechanism that shifts the stop level toward break-even and into locked profit as favorable price movement exceeds a defined pip or ATR step. Standard MetaTrader trailing stops require the terminal to remain online.
- Position Sizing
- The calculation of order lot volume from account equity, stop-loss distance in pips, and maximum acceptable percentage risk per trade (commonly 0.25% to 1.5%), ensuring single trade losses remain bounded.
- Leverage & Margin
- Leverage (e.g., 1:30 or 1:100) determines how much notional position size can be controlled per unit of required collateral (Margin). Free Margin buffers open drawdown before a broker Margin Call or Stop Out triggers.
- Swap (Rollover Interest)
- The overnight financing credit or debit applied at the daily 17:00 EST market rollover based on the interest rate differential between the base and quote currencies plus broker markup, with triple swap commonly charged on Wednesdays.
TESTING, VALIDATION & VPS INFRASTRUCTURE
Statistical verification standards, robustness workflows, and continuous server hosting.
- Tick Data
- Granular historical market quotes capturing every bid/ask price change and timestamp rather than interpolated 1-minute OHLC bars. High-resolution tick data with real variable spreads is essential for testing scalping and intra-bar stop logic.
- Modeling Quality
- A MetaTrader Strategy Tester indicator showing how faithfully simulated intra-bar price movement matches underlying tick history—ranging up to 99.9% on real tick feeds in MT5 or external tick suites in MT4, compared against interpolated 25%-90% estimates.
- Backtesting
- Simulating an Expert Advisor's historical rules against past price data inside MetaTrader's Strategy Tester to verify order logic, trade frequency, and historical drawdown behavior before forward testing.
- Forward Testing
- Running an Expert Advisor in live market conditions on a demo account or micro-lot live account over weeks or months to measure actual spread behavior, slippage, swap impact, and broker fill quality.
- Walk-Forward Analysis
- An out-of-sample validation method that optimizes EA parameters on a rolling historical window and evaluates the chosen parameter set on the subsequent unseen period, revealing whether performance holds without look-ahead bias.
- Overfitting (Curve-Fitting)
- Excessively tuning EA parameters, filters, or indicator periods to fit historical noise so equity curves look smooth in backtests while failing rapidly in live unseen market regimes.
- Forex VPS (Virtual Private Server)
- An isolated virtual Windows Server hosted inside a commercial financial data center that runs MT4/MT5 terminals continuously 24/5 with redundant power, dual network uplinks, and close physical proximity to broker servers.
- Network Latency
- The round-trip network travel time in milliseconds (ms) between your trading terminal and your broker's trade server. Co-locating a VPS in hubs like Equinix NY4, LD4, or TY3 typically reduces residential latency from 100+ ms down to low single digits.
- Execution Speed & Fill Model
- The operational method a broker uses to match terminal orders—Market Execution fills immediately at the best available liquidity price (allowing positive or negative slippage), whereas Instant Execution requires exact-price fills or issues requotes.
PROP FIRM RULES & EVALUATION CONSTRAINTS
Risk guardrails and operational compliance rules enforced by modern proprietary trading firms.
- Daily Drawdown Limit
- A strict intraday loss cap (typically 4% to 5%) calculated from either daily starting balance or starting equity—whichever is higher—at the firm's daily reset timestamp. Breaching this threshold immediately invalidates an evaluation or funded account.
- Trailing Drawdown
- A maximum loss floor that rises dynamically with closed balance or peak intraday equity (Equity Trailing) rather than staying anchored to initial starting capital. EAs with wide floating swings can breach an equity-trailing limit even on trades that later recover.
- Consistency Rule
- A payout or evaluation condition requiring that no single trading day or trade accounts for more than a capped share (such as 20%-40%) of total realized profits, preventing single high-leverage news gambles from passing evaluations.
- News Trading Filter
- A built-in EA calendar control that halts new entries or closes open positions within a configured blackout window (e.g., 2-15 minutes before and after high-impact CPI, NFP, or central-bank rate releases) to comply with prop firm rules and avoid extreme spread spikes.
- Equity Stop (Hard Equity Protection)
- An account-level EA circuit breaker that automatically closes all open orders and suspends AutoTrading when total floating account equity drops to a user-defined currency or percentage threshold below daily limits.
APPLY THESE CONCEPTS IN PRACTICE
Explore verified MT4 and MT5 setup tutorials, backtesting frameworks, and our catalog of Expert Advisors.