AlgoWayWS-MT5 EA v2.06 — Detailed User Guide (MT5)
This guide explains how to use AlgoWayWS-MT5 EA v2.06 in MetaTrader 5: which settings exist in Inputs EA, and which fields are allowed in the webhook message (JSON). Internal implementation details are not covered.
This page does not repeat installation steps. For installation and MT5-side setup, use the dedicated setup guide: AlgoWayWS-MT5 — Setup Guide.
Download Here
Contents
- 1) What the EA does and its boundaries
- 2) Required MT5 conditions
- 3) Connecting the EA to the AlgoWay webhook
- 4) Key setting for position behavior
- 5) Trade size and execution
- 6) Symbols: how the EA knows what to trade
- 7) IMPORTANT: two different SL/TP/Trailing models
- 8) PIP type: how distances are interpreted
- 9) Webhook JSON fields
- 10) EA-based SL/TP
- 11) EA-based trailing vs JSON trailing
- 12) Position size mode (Lots / Risk% / Balance%)
- 13) Breakeven
- 14) Profit Lock
- 15) Martingale
- 16) Trade limits
- 17) Sessions (UTC) + Daily Trade Window
- 18) Auto-close (Auto-Flat)
- 19) Telegram notifications
- 20) JSON examples
- 21) Common issues
- 22) Scope (strict)
1) What the EA does and its boundaries
The EA (Expert Advisor) is an MT5 executor: it receives commands via AlgoWay and executes trade actions (open / close / modify / management actions) on your MT5 account.
The EA is not responsible for:
- strategy / indicator quality and signal logic;
- differences between brokers (spread, commission, slippage, execution rules);
- correctness of your alerts (what exactly they send).
Version 2.06 is the WS-only version of the EA.
2) Required MT5 conditions
Installation is documented on the separate setup page. Here we mention only the runtime conditions.
- Attach the EA to a chart in MT5.
- Enable algorithmic trading in the terminal and for the EA.
- Use the correct webhook UUID in the Inputs.
3) Connecting the EA to the AlgoWay webhook
Inputs EA items: InputWebhook, MAGIC_NUMBER, RefreshRate
InputWebhook = ""— your AlgoWay webhook UUIDMAGIC_NUMBER = 1973— magic number for EA positionsRefreshRate = 1— timer frequency in seconds
What to enter:
- correct option: webhook UUID (ID);
- do not paste a full URL when the field expects UUID only.
v2.06 also contains a single-instance guard for the same webhook inside the same terminal environment.
4) Key setting for position behavior
Inputs EA item: TradeMode = Reverse
This is the main logic switch.
Available modes
Reverse = 0Hedge = 1Opposite = 2Inverse = 3
Reverse
- Default mode.
- One side per symbol model.
- BUY → opens / keeps BUY.
- SELL → closes the current opposite side and opens SELL.
- FLAT → closes positions for the symbol within EA logic.
Hedge
- BUY and SELL can exist simultaneously.
- BUY and SELL can be opened in parallel.
- FLAT closes positions for the symbol.
- JSON field
close_sideis additionally supported to close only one side.
Opposite
- Position follows the latest signal.
- A new signal closes the current position and opens the new side.
long/shortare additionally allowed and treated asbuy/sell.
Inverse
- Incoming direction is inverted before normal execution logic.
- BUY becomes SELL.
- SELL becomes BUY.
longbecomesshort, andshortbecomeslong.- If
close_sideis used, its side is inverted too.
5) Trade size and execution
Inputs EA items: OrderSizeCoefficient = 1, OrderFillingType = AUTO
5.1 OrderSizeCoefficient
This is a multiplier applied to the final size derived from order_contracts.
1— keep the computed / provided size as is0.5— half the size2— double the size
5.2 OrderFillingType
AUTO— automatic filling modeFOK— Fill or KillIOC— Immediate or Cancel
6) Symbols: how the EA knows what to trade
Inputs EA items: TV_Ticker1..5, Broker_Ticker1..5
If TradingView uses one ticker but the broker’s MT5 uses another, fill the pairs:
TV_Ticker N— as received intickerfrom TradingViewBroker_Ticker N— exact symbol name in the broker’s MT5
Default values:
TV_Ticker1 = ""/Broker_Ticker1 = ""TV_Ticker2 = ""/Broker_Ticker2 = ""TV_Ticker3 = ""/Broker_Ticker3 = ""TV_Ticker4 = ""/Broker_Ticker4 = ""TV_Ticker5 = ""/Broker_Ticker5 = ""
If the symbol is not found, the trade will not open.
7) IMPORTANT: two different SL/TP/Trailing models — do not mix them
Model A — levels come in the webhook message (JSON)
stop_loss,take_profit— distancesl_price,tp_price— absolute pricetrailing_pips— per-trade trailing
Model B — levels are set inside Inputs EA
UseInternalSLTP,InternalSLPips,InternalTPPipsEnableTrailingStop,TrailingStepEnableBreakeven,BreakevenAfterPipsEnableProfitLock,ProfitLockPips,ProfitLockDeltaTrigger
8) PIP type: how distances are interpreted
Inputs EA item: PipCalcMode = PIP_TRADINGVIEW
PIP_AUTO— pip calculation follows broker rules (digits / point)PIP_TRADINGVIEW— Forex: 1 pip = 10 × Point; others: 1 pip = PointPIP_PERCENT—stop_loss/take_profitare treated as a percent of entry price
9) Webhook JSON fields: supported and meaning
9.1 Required to open a trade
order_action— action (buy,sell,flat,modify, plus mode-specific management actions)ticker— instrument tickerorder_contracts— size (or percent, depending on Position Size Mode)
9.2 SL/TP from JSON (Model A)
sl_price/tp_price— SL/TP as absolute pricestop_loss/take_profit— SL/TP as distance (pips or % depends on PIP type)
Priority rule: if sl_price / tp_price are set and non-zero, price levels are used; otherwise stop_loss / take_profit are used as distances.
9.3 Trailing from JSON (Model A)
trailing_pips forces trailing for that trade even if global trailing is disabled in the EA.
9.4 close_side (FLAT only)
close_side is allowed only together with order_action="flat".
long/buy— close only BUY positionsshort/sell— close only SELL positions
If close_side is sent with buy / sell / modify, the EA treats it as an error.
9.5 comment / tv_order_id (position identifier)
comment— primary identifiertv_order_id— fallback identifier ifcommentis empty
9.6 Wrapper forms are also accepted
v2.06 normalizes wrapped values such as stop_loss=100, take_profit=200,
sl_price=1.2345, tp_price=1.2400, and trailing_pips=80.
10) EA-based SL/TP (Model B)
Inputs EA items: UseInternalSLTP, InternalSLPips, InternalTPPips
UseInternalSLTP = falseInternalSLPips = 0InternalTPPips = 0
Hard rule: if UseInternalSLTP = true, then on trade entry the EA applies internal
SL/TP and ignores SL/TP values from JSON.
11) EA-based trailing vs JSON trailing
Inputs EA items: EnableTrailingStop, TrailingStep
EnableTrailingStop = falseTrailingStep = 20
- If JSON has
trailing_pips→ trailing is enabled for that trade and the step comes fromtrailing_pips. - If
trailing_pipsis absent andEnableTrailingStop = true→ usesTrailingStep. - If
trailing_pipsis absent andEnableTrailingStop = false→ no trailing.
12) Position size mode (Lots / Risk% / Balance%)
Inputs EA items: PositionSizeModeInput = SIZE_LOTS, UseRiskPercent = false
12.1 SIZE_LOTS
order_contracts is treated as lots.
12.2 SIZE_RISK_PERCENT
order_contracts is treated as percent risk of equity.
Important: this mode requires stop_loss. Without stop_loss, the EA cannot calculate risk-based volume correctly.
12.3 SIZE_BALANCE_PERCENT
order_contracts is treated as percent of balance. This is not risk-by-stop-loss mode; lot size is calculated by margin.
12.4 Legacy switch
UseRiskPercent is kept for old .set files. In new setups, use PositionSizeModeInput.
13) Breakeven
Inputs EA items: EnableBreakeven, BreakevenAfterPips
EnableBreakeven = falseBreakevenAfterPips = 20
When enabled, the EA moves SL to breakeven after the trade reaches the configured profit distance.
14) Profit Lock
Inputs EA items: EnableProfitLock, ProfitLockPips, ProfitLockDeltaTrigger
EnableProfitLock = falseProfitLockPips = 100ProfitLockDeltaTrigger = 20
14.1 What Profit LockPips means
This is how much profit the EA tries to lock once the feature is activated.
14.2 What ProfitLockDeltaTrigger means
This is the profit threshold that activates the Profit Lock logic.
14.3 How the two inputs work together
Profit Lock is a two-part model:
- first the trade must reach
ProfitLockDeltaTrigger; - then the EA moves SL so that
ProfitLockPipsof profit is protected.
15) Martingale
Inputs EA items: EnableMartingale, MartingaleMultiplier
EnableMartingale = falseMartingaleMultiplier = 1.50
When enabled, the lot can be increased after a losing trade according to the multiplier.
16) Trade limits
Inputs EA items: DailyLossLimitPercent, MaxDrawdownPerTradePercent, MaxOpenPositions
DailyLossLimitPercent = 0.0— max daily loss in %MaxDrawdownPerTradePercent = 0.0— max drawdown per trade in %MaxOpenPositions = 0— max positions; if0= no limit
17) Sessions (UTC) + Daily Trade Window
Inputs EA items: NewYorkSeason, Trade_London, Trade_NewYork, Trade_Tokyo, DailyTimeWindowUTC
NewYorkSeason = WINTERTrade_London = true— London (07:00-16:00)Trade_NewYork = true— New York (12:00-22:00)Trade_Tokyo = true— Tokyo (22:00-07:00)DailyTimeWindowUTC = "00:00-23:59"
New York season logic:
SUMMER→ daily reset at21:00 UTCWINTER→ daily reset at22:00 UTC
18) Auto-close (Auto-Flat)
Inputs EA items: AutoClose, AutoCloseLeadMinutes
AutoClose = AUTOFLAT_NONEAutoCloseLeadMinutes = 30
Available modes:
AUTOFLAT_NONE— disabledAUTOFLAT_END_OF_DAY— close positions before end of dayAUTOFLAT_END_OF_WEEK— close positions before end of week
19) Telegram notifications
Inputs EA items: EnableTelegramNotifications, TelegramChatId, TelegramBotToken
EnableTelegramNotifications = falseTelegramChatId = ""TelegramBotToken = ""
When enabled and configured, the EA can notify you about disconnect / reconnect related events.
20) JSON examples (supported fields only)
20.1 Open BUY (Reverse), SL/TP by distance
{
"platform_name": "binance",
"order_action": "buy",
"ticker": "BTCUSDT.P",
"order_contracts": "0.10",
"stop_loss": "150",
"take_profit": "300"
}
20.2 Open SELL, SL/TP by absolute prices
{
"platform_name": "tradelocker",
"order_action": "sell",
"ticker": "XAUUSD",
"order_contracts": "0.05",
"sl_price": "2055.50",
"tp_price": "2038.00"
}
20.3 Open BUY with per-trade trailing
{
"platform_name": "metatrader5",
"order_action": "buy",
"ticker": "GBPUSD",
"order_contracts": "0.10",
"stop_loss": "120",
"trailing_pips": "80"
}
20.4 Hedge: close only long positions
{
"platform_name": "matchtrader",
"order_action": "flat",
"ticker": "EURUSD",
"order_contracts": "0.10",
"close_side": "long"
}
20.5 Opposite: use LONG/SHORT
{
"platform_name": "ctrader",
"order_action": "long",
"ticker": "USDJPY",
"order_contracts": "0.10",
"stop_loss": "100"
}
20.6 Modify: change SL/TP via comment
{
"platform_name": "okx",
"order_action": "modify",
"ticker": "ETHUSDT",
"comment": "TV#12345",
"stop_loss": "140",
"take_profit": "280"
}
20.7 Risk % mode example
{
"platform_name": "metatrader5",
"order_action": "buy",
"ticker": "EURUSD",
"order_contracts": "1.0",
"stop_loss": "100"
}
If PositionSizeModeInput = SIZE_RISK_PERCENT, the value in order_contracts is treated as risk percent.
20.8 Balance % mode example
{
"platform_name": "metatrader5",
"order_action": "buy",
"ticker": "EURUSD",
"order_contracts": "5.0",
"stop_loss": "100"
}
If PositionSizeModeInput = SIZE_BALANCE_PERCENT, the value in order_contracts is treated as balance percent, not lots.
20.9 Wrapped values example
{
"platform_name": "metatrader5",
"order_action": "buy",
"ticker": "EURUSD",
"order_contracts": "0.10",
"stop_loss": "stop_loss=100",
"take_profit": "take_profit=200",
"trailing_pips": "trailing_pips=80"
}
21) Common issues
- Wrong UUID in
InputWebhook→ EA will not receive commands. - Symbol not found → fill Symbols Mapping.
close_sideused with non-flataction → error.- Risk % mode without
stop_loss→ size cannot be calculated correctly. modifywithout validcomment/tv_order_id→ position may not be identified.- Trade blocked by session filters or daily time window.
- Algo Trading disabled in terminal / EA settings → commands will not execute.
- Another active instance for the same webhook → current instance may stay passive.
22) Scope (strict)
This guide covers:
- Inputs EA items and their meaning;
- supported webhook JSON fields;
- runtime behavior visible to the user.
This guide does not cover:
- source code internals;
- server-side implementation details;
- strategy design and indicator logic.