Complete reference for all MT4/MT5 Expert Advisor parameters
| Variable | Value |
|---|---|
| =====> SYMBOL MAPPING | |
| SymbolPrefix | Some brokers have prefixes with their pair names. For example, if your broker shows 'oct.GBPJPY', you need to type 'oct.' in this field. Leave empty if not needed. |
| SymbolSuffix | Some brokers have suffixes with their pair names. For example, if your broker shows 'GBPJPY.m' or 'EURUSD.pro', you need to type '.m' or '.pro' in this field. Leave empty if not needed. |
| SkipPrefixSuffixPairs | If you want to skip adding prefix/suffix for specific symbols, list them here separated by commas. Example: BTCUSD,ETHUSD,XAUUSD.Cash |
| ExcludedSymbols | Symbols that you never want to trade, regardless of signals received. Comma-separated list. Example: XAUUSD,NAS100,BTCUSD |
| SymbolsToTrade | Whitelist of symbols you want to trade. If empty, all symbols are allowed (except excluded ones). Example: EURUSD,GBPUSD,USDJPY |
| =====> RISK MANAGEMENT | |
| RiskMode | Select your risk calculation mode. Three modes available: RISK_FIXED - Trade a fixed lot size every time. Simple and straightforward. RISK_PERCENT - Risk a percentage of your account balance. Automatically calculates lot size based on SL distance. Recommended for most traders. RISK_AMOUNT - Risk a fixed dollar amount per trade. Automatically calculates lot size based on SL distance. |
| FixedLotSize | When using RISK_FIXED mode, this is the lot size that will be used for every trade. Default: 0.01 (micro lot). Example: 0.1 = 10,000 units |
| RiskPercent | When using RISK_PERCENT mode, this is the percentage of your account balance you want to risk per trade. Default: 2.0%. The EA calculates lot size automatically based on SL distance. Example: With $10,000 balance and 2% risk, you risk $200 per trade. |
| RiskAmount | When using RISK_AMOUNT mode, this is the fixed dollar amount you want to risk per trade. The EA calculates lot size automatically based on SL distance. Example: 100.0 means you risk $100 on every trade regardless of account size. |
| RiskTP1 / RiskTP2 / RiskTP3 / RiskTP4 / RiskTP5 | When a signal has multiple TPs, the EA creates separate orders for each TP level. Use these parameters to set individual risk for each TP trade: • RISK_FIXED mode: RiskTP1=0.01, RiskTP2=0.01, RiskTP3=0.02 • RISK_PERCENT mode: RiskTP1=1.0, RiskTP2=1.0, RiskTP3=2.0 • RISK_AMOUNT mode: RiskTP1=50, RiskTP2=50, RiskTP3=100 Set to -1 to skip that TP level entirely. |
| =====> SIGNAL MODIFICATION | |
| ReverseSignal | Flip all signals: BUY becomes SELL, SELL becomes BUY. Also reverses STOP/LIMIT orders. Use this if you want to trade opposite to your signal provider. Default: false |
| EntryModificationPips | Adjust the entry price by X pips. Positive number adds pips for BUY (higher entry) and subtracts for SELL (lower entry). Negative number does the opposite. Example: +5 means BUY at 5 pips above signal price. Default: 0 |
| SlModificationPips | Adjust the stop loss by X pips. Positive number moves SL further away (more risk), negative moves it closer (less risk). Example: +10 gives you 10 extra pips of breathing room. Default: 0 |
| TpModificationPips | Adjust ALL take profit levels by X pips. Positive number moves TPs further away (higher targets), negative moves them closer (quicker exits). Example: +20 adds 20 pips to each TP level. Default: 0 |
| =====> SL/TP OVERRIDE | |
| PredefinedSL | Override the signal's stop loss with your own fixed SL in pips. Useful when your provider's SL is too wide or too tight. Set to 0 to use signal's SL. Example: 50 = always use 50 pips SL regardless of signal |
| PredefinedTP1 / PredefinedTP2 / PredefinedTP3 / PredefinedTP4 / PredefinedTP5 | Override each TP level with your own fixed TP in pips. Useful for standardizing targets across all signals. Set to 0 to use signal's TP. Example: TP1=30, TP2=60, TP3=100 |
| EnableRRMode | Enable Risk:Reward ratio mode to automatically calculate TP levels based on SL distance. When enabled, TPs are calculated as: TP = SL distance × RR ratio. Example: If SL is 50 pips and RRRatioTP1=2.0, then TP1=100 pips. Default: false |
| RRRatioTP1 / RRRatioTP2 / RRRatioTP3 / RRRatioTP4 / RRRatioTP5 | Risk:Reward ratios for each TP level when EnableRRMode=true. Each TP is calculated as: TP distance = SL distance × ratio Example conservative setup: • RRRatioTP1 = 1.5 (1.5:1) • RRRatioTP2 = 2.5 (2.5:1) • RRRatioTP3 = 4.0 (4:1) If signal has SL=50 pips: TP1=75, TP2=125, TP3=200 pips |
| =====> TRADE FILTERS | |
| MaxRetries | If OrderSend fails (due to broker errors, requotes, etc.), the EA will retry this many times before giving up. Useful for poor connections or busy markets. Default: 3. Set to 0 to disable retries. |
| ForceMarketExecution | Force all orders to execute at current market price, even if the signal specifies a pending order (LIMIT/STOP). Useful if you always want immediate execution. Default: false |
| IgnoreWithoutSL | Skip signals that don't include a stop loss. Safety feature to ensure all trades have protection. Recommended: true. Default: false |
| IgnoreWithoutTP | Skip signals that don't include any take profit levels. Ensures all trades have exit targets. Default: false |
| CheckAlreadyOpenedOrder | Prevent opening duplicate trades on the same symbol if you already have an open position. Helps avoid overexposure to one pair. Default: false |
| PipsTolerance | Price tolerance in pips for determining if a pending order should become a market order. If signal entry price is within X pips of current market, execute as market order. Default: 7 pips |
| MaxSpread | Maximum allowed spread in points before placing a trade. If current spread exceeds this, the trade is skipped. Helps avoid trading during high volatility. Default: 9000 (essentially disabled). Example: 30 = 3 pips max spread for 5-digit broker |
| Slippage | Maximum allowed slippage in points when placing market orders. Order will fail if slippage exceeds this. Default: 9000 (essentially disabled). Example: 50 = 5 pips max slippage |
| =====> BREAKEVEN AUTOMATION | |
| EnableBreakeven | Automatically move stop loss to breakeven (entry price + BreakevenPips) when profit reaches MoveSlAfterXPips. Protects your capital once trade is in profit. Default: false |
| MoveSlAfterXPips | When profit reaches this many pips, move SL to breakeven (entry + BreakevenPips). Only works if EnableBreakeven=true. Example: 20 = move to BE after 20 pips profit. Default: 0 |
| BreakevenPips | Buffer pips to add when moving SL to breakeven. Protects against spread and commission. Example: Entry at 1.1000, BreakevenPips=2, SL moved to 1.1002 (for BUY). Default: 0 pips |
| MoveSlAfterTPHit | Move all remaining orders' SL to breakeven when ANY TP hits. Works for both partial closes and multi-order groups. Example with multi-order execution: • 3 orders opened: TP1, TP2, TP3 • When TP1 hits and closes, TP2 and TP3 SLs move to their entry price • Remaining trades are now risk-free! Includes smart retry logic: 10 attempts, 2-pip tolerance, detects manual intervention |
| =====> PARTIAL CLOSE SETTINGS | |
| ClosePercentAtTP1 / ClosePercentAtTP2 / ClosePercentAtTP3 / ClosePercentAtTP4 / ClosePercentAtTP5 | Close X% of your position when each TP level is hit. Allows you to scale out of trades gradually. Example scaling strategy: • ClosePercentAtTP1 = 25% (take 1/4 profit early) • ClosePercentAtTP2 = 25% (take another 1/4) • ClosePercentAtTP3 = 50% (close remaining half) MT5 ONLY: MT4 doesn't support partial closes - it will just update TP to next level instead Set to 0 to disable partial close for that TP level. Set to 100 to close full position. |
| =====> TRAILING STOP SETTINGS | |
| UseTrailingStop | Enable trailing stop to automatically move SL as price moves in your favor. Locks in profits while letting winners run. Default: false |
| TrailingStartPips | Minimum profit in pips before trailing starts. Once trade reaches this profit, trailing activates. Example: 20 = start trailing after 20 pips profit. Default: 5 |
| TrailingStepPips | Move SL every X pips of profit. Smaller values = more frequent updates, larger values = less frequent. Example: 5 = update SL every 5 pips. Default: 1 |
| TrailingDistancePips | Distance in pips to keep SL from current price when trailing. Protects against small retracements. Example with default settings: • TrailingStartPips = 20 (start after 20 pips profit) • TrailingStepPips = 5 (update every 5 pips) • TrailingDistancePips = 10 (keep SL 10 pips away) Result: At +20 pips profit, SL moves to +10. At +25, SL moves to +15, etc. |
| =====> TIME FILTER | |
| EnableTimeFilter | Restrict trading to specific hours and days of the week. Useful for avoiding low-liquidity periods or news events. Default: false |
| StartTime | Start time for trading window in HH:MM format (24-hour). Only accepts signals after this time. Example: '08:00' = start trading at 8 AM. Default: '01:00' |
| EndTime | End time for trading window in HH:MM format (24-hour). Stops accepting signals after this time. Example: '17:00' = stop trading at 5 PM. Default: '23:00' |
| TradeOnMonday / TradeOnTuesday / TradeOnWednesday / TradeOnThursday / TradeOnFriday / TradeOnSaturday / TradeOnSunday | Enable or disable trading on specific days of the week. Set to true to allow trading on that day, false to skip. Useful for avoiding weekends or specific days. All default to true. |
| =====> NOTIFICATIONS & COMMENTS | |
| TradeComment | Custom comment to add to all trades opened by the EA. Helps identify EA trades in your history. Example: 'TSM_Signal' or 'Telegram_Copy'. Leave empty for no comment. |
| MagicNumber | Unique identifier for trades opened by this EA instance. Allows multiple EAs to run on same account without interfering. Default: 12345. Use different numbers for different EA instances. |
| =====> API CONNECTION | |
| ApiServerUrl | URL of the desktop app's API server. The EA polls this URL to receive signals. Default: http://127.0.0.1:3737/api/signals/pending MT4 Users: If you get Error 5200, some brokers block localhost. Use ngrok instead: 1. Download ngrok: https://ngrok.com/download 2. Run: ngrok http 3737 3. Copy the HTTPS URL (e.g., https://abc123.ngrok.io) 4. Set ApiServerUrl to: https://abc123.ngrok.io/api/signals/pending MT5 Users: Works with localhost out of the box |
| PollIntervalSeconds | How often (in seconds) the EA checks for new signals from the desktop app. Lower = more responsive but more server load. Default: 2 seconds. Minimum: 1 second. |
For more information, check the EA README file included with your download.
Trading involves substantial risk. Use at your own discretion.