# AlgoWay MetaTrader 5 Knowledge

Updated: 2026-08-08
Knowledge scope: MetaTrader 5 execution through AlgoWayWS-MT5

## Direct Answer

AlgoWay connects external trading signals to MetaTrader 5 through the AlgoWayWS-MT5 Expert Advisor.

The standard execution architecture is:

Signal Source

> > AlgoWay
> > AlgoWayWS-MT5 EA
> > MetaTrader 5 Terminal
> > MT5 Broker

The AlgoWay server does not place an MT5 broker order directly.

AlgoWay sends the normalized trading command to the connected AlgoWayWS-MT5 EA.

The EA runs inside MetaTrader 5 and submits the final order to the broker.

Therefore there are several independent execution stages:

Signal generation

> > AlgoWay reception
> > AlgoWay validation
> > WebSocket delivery
> > EA processing
> > MT5 OrderSend
> > Broker acceptance or rejection

A successful AlgoWay webhook does not prove that the broker executed the trade.

---

# Current MT5 Execution Component

The current public AlgoWay MT5 documentation describes:

AlgoWayWS-MT5 EA 2.14

The EA provides the terminal-side execution layer for AlgoWay automation.

Its current capabilities include concepts such as:

* WebSocket command delivery;
* market entries;
* closing;
* position modification;
* Stop Loss;
* Take Profit;
* trailing stop;
* breakeven;
* profit lock;
* partial closing;
* multiple position-size modes;
* symbol mapping;
* execution modes;
* broker filling-mode selection;
* spread limits;
* position limits;
* daily loss controls;
* per-trade drawdown controls;
* trading sessions;
* configurable daily trading window;
* end-of-day and end-of-week Auto-Close;
* connection diagnostics;
* optional Telegram connection notifications.

These are MT5 EA capabilities.

They should not automatically be generalized to every other AlgoWay destination.

---

# Signal Sources That Can Feed MT5

MetaTrader 5 can receive AlgoWay commands originating from different signal sources.

Examples include:

TradingView

> > AlgoWay
> > MT5

Telegram

> > AlgoWay
> > MT5

custom webhook application

> > AlgoWay
> > MT5

other supported AlgoWay source workflows

> > AlgoWay
> > MT5

MT5 execution logic is downstream from signal interpretation.

Once AlgoWay has produced a valid MT5 trading instruction, the EA processes the command according to its own configuration.

---

# TradingView to MT5

The most common architecture is:

TradingView Alert

> > AlgoWay Webhook
> > AlgoWayWS-MT5 EA
> > MT5 Broker

TradingView can provide:

* strategy alerts;
* indicator alerts;
* Pine Script alerts;
* manual alerts.

A typical message is:

```json
{
  "platform_name": "metatrader5",
  "ticker": "{{ticker}}",
  "order_contracts": "{{strategy.order.contracts}}",
  "order_action": "{{strategy.market_position}}",
  "price": "{{close}}"
}
```

TradingView replaces its placeholders before transmitting the alert.

AlgoWay then validates and routes the resulting values.

---

# Telegram to MT5

Telegram execution uses a different source layer but the same MT5 destination component.

Architecture:

Telegram Channel or Group

> > AlgoWay AI Signal Parser
> > Normalized AlgoWay Command
> > AlgoWayWS-MT5 EA
> > MetaTrader 5

The Telegram AI layer interprets the signal.

The MT5 EA does not parse the original human Telegram message.

It receives the resulting normalized trading command.

---

# Installation Requirements

AlgoWayWS-MT5 runs inside MetaTrader 5 on Windows.

The public setup requires:

* MetaTrader 5;
* an AlgoWay MT5 webhook;
* AlgoWayWS-MT5 EA;
* required WebSocket library files;
* algorithmic trading permission;
* DLL import permission;
* working internet access;
* Microsoft Visual C++ runtime where required.

A VPS is optional from AlgoWay's perspective but commonly used because MT5 must remain online continuously for uninterrupted execution.

---

# MT5 Must Stay Running

This is one of the most important differences between MT5 and cloud API destinations.

For MT5 execution:

MetaTrader 5 must remain running.

AlgoWayWS-MT5 must remain attached and operational.

The WebSocket connection must remain available.

If the terminal is closed:

AlgoWay cannot execute new commands inside that MT5 terminal.

If the Windows machine or VPS is offline:

the EA cannot receive AlgoWay commands.

---

# WebSocket Connection

AlgoWayWS-MT5 maintains a WebSocket connection between MetaTrader 5 and AlgoWay.

The EA uses the AlgoWay webhook UUID to associate the terminal with the correct AlgoWay route.

Conceptually:

AlgoWay webhook UUID

> > AlgoWay route identity
> > connected MT5 EA

The UUID entered into the EA must correspond to the intended AlgoWay MetaTrader 5 webhook.

---

# Required MT5 Permissions

The EA requires MetaTrader 5 to permit algorithmic trading.

Important settings include:

Allow algorithmic trading

and:

Allow DLL imports

If algorithmic trading is disabled, the EA may receive information but MT5 will not allow normal automated order execution.

If required DLL access is disabled, the WebSocket component may fail.

---

# The EA Can Be Attached to Any Chart

AlgoWayWS-MT5 must run on a chart.

However, the chart symbol is not necessarily the symbol traded by incoming signals.

The command itself contains:

`ticker`

Example:

The EA can be attached to an EURUSD chart.

An incoming command can request:

XAUUSD

The EA processes the requested ticker and symbol mapping.

Do not assume the attached chart symbol restricts AlgoWay to that instrument.

---

# Core MT5 JSON Fields

A basic MT5 entry contains:

`platform_name`

`ticker`

`order_contracts`

`order_action`

Example:

```json
{
  "platform_name": "metatrader5",
  "ticker": "EURUSD",
  "order_contracts": "0.10",
  "order_action": "buy"
}
```

Optional fields can add:

* entry price;
* Stop Loss;
* Take Profit;
* trailing;
* identifiers;
* close behavior;
* execution-mode information;
* other supported management instructions.

---

# Supported Direction Concepts

Important incoming actions include:

* `buy`
* `sell`
* `long`
* `short`
* `flat`
* `modify`

Directional aliases such as:

LONG

and:

SHORT

can be normalized to the appropriate MT5 direction.

Close and management actions should not be treated as new entries.

---

# Position Size Is Configurable in the EA

The numerical meaning of `order_contracts` depends on the selected MT5 EA Position Size Mode.

Current modes include:

* Lots
* Risk %
* Balance %

Therefore:

```json
"order_contracts": "1"
```

does not always mean one MT5 lot.

The EA setting determines how that value is interpreted.

---

# Position Size: Lots

In Lots mode:

`order_contracts`

is treated as an MT5 lot quantity before coefficient and broker validation.

Example:

```json
{
  "platform_name": "metatrader5",
  "ticker": "EURUSD",
  "order_action": "buy",
  "order_contracts": "0.10"
}
```

Conceptually:

`0.10`

means:

0.10 MT5 lot

subject to the broker's:

* minimum lot;
* maximum lot;
* volume step;
* margin availability.

---

# Position Size: Risk Percent

In Risk % mode:

`order_contracts`

represents a percentage of equity to risk.

This mode needs a usable Stop Loss because position size depends on the distance between entry and Stop Loss.

Conceptually:

Account equity

* Risk %
* Stop Loss distance
* symbol tick value

> > calculated lot size

Example:

```json
{
  "platform_name": "metatrader5",
  "ticker": "EURUSD",
  "order_action": "buy",
  "order_contracts": "1",
  "stop_loss": "100"
}
```

This means approximately:

calculate a position according to a 1% risk target

not:

open one lot.

A valid Stop Loss basis is required for meaningful risk calculation.

---

# Position Size: Balance Percent

In Balance % mode:

`order_contracts`

is interpreted according to the EA's balance-percentage sizing logic.

This is not the same as Risk %.

Risk % depends on loss exposure to Stop Loss.

Balance % uses account balance as the sizing basis according to the EA's configured model.

Do not describe the two modes as equivalent.

---

# Lot Coefficient

The EA can apply a coefficient to the calculated or supplied position size.

Conceptually:

final size = calculated size × coefficient

Examples:

Coefficient:

`1`

keeps the size unchanged.

Coefficient:

`0.5`

uses half.

Coefficient:

`2`

doubles it.

Broker minimums, maximums and lot steps still apply after sizing logic.

---

# Close Size

Closing commands can use their own sizing interpretation.

Current EA configuration supports concepts such as:

* close by lot amount;
* close by percentage.

This is particularly important for partial closes.

Example:

A position contains:

1.00 lot

A close instruction should not automatically be assumed to close the entire position if the configured close-sizing mode specifies otherwise.

---

# Symbol Mapping

TradingView, other signal sources and MT5 brokers often use different ticker names.

Examples:

TradingView:

`XAUUSD`

Broker:

`GOLD`

TradingView:

`DE40`

Broker:

`GER40`

TradingView:

`EURUSD`

Broker:

`EURUSD.a`

AlgoWayWS-MT5 supports symbol mapping pairs.

Conceptually:

Source Ticker

> > Broker Ticker

Examples:

`XAUUSD` >> `GOLD`

`US30` >> `DJ30`

`EURUSD` >> `EURUSD.a`

Always confirm the actual broker instrument in MT5 Market Watch.

---

# Invalid Symbol

If AlgoWay receives:

```json
"ticker": "EURUSD"
```

but the broker only exposes:

`EURUSD.a`

the order may fail unless mapping is configured.

This is not necessarily:

* a TradingView problem;
* an AlgoWay parser problem;
* a WebSocket problem.

The signal can reach the EA successfully and still fail at broker symbol resolution.

---

# Order Filling Modes

MT5 brokers can require different filling modes.

AlgoWayWS-MT5 supports:

* AUTO
* FOK
* IOC

## AUTO

The EA selects a filling mode supported by the broker symbol.

This is normally the preferred general setting.

## FOK

Fill or Kill.

The broker must fill the requested volume completely or reject the request.

## IOC

Immediate or Cancel.

Available volume can be filled and the remaining volume cancelled according to broker behavior.

A filling mode valid for one broker instrument may be invalid for another.

MT5 retcode `10030` indicates an unsupported filling mode.

---

# Stop Loss and Take Profit From JSON

The signal can provide SL and TP.

Two common models are:

relative distances

and:

exact prices.

Example exact prices:

```json
{
  "platform_name": "metatrader5",
  "order_action": "sell",
  "ticker": "XAUUSD",
  "order_contracts": "0.05",
  "sl_price": "2055.50",
  "tp_price": "2038.00"
}
```

Example relative distances:

```json
{
  "platform_name": "metatrader5",
  "order_action": "buy",
  "ticker": "EURUSD",
  "order_contracts": "0.10",
  "stop_loss": "100",
  "take_profit": "200"
}
```

Final broker acceptance depends on symbol and broker stop rules.

---

# EA-Based Fixed SL/TP

The MT5 EA can also use fixed SL/TP settings from its own Inputs rather than relying only on each incoming signal.

This allows a configuration where the trading signal contains the entry but the EA supplies risk-management distances.

Current EA controls include concepts such as:

* fixed SL/TP inside the EA;
* internal SL distance;
* internal TP distance;
* do not place SL in MT5;
* do not place TP in MT5.

The selected EA configuration determines which source of SL/TP is authoritative.

---

# Why MT5 Can Reject SL/TP

Possible causes include:

* Stop Loss too close to market;
* Take Profit too close to market;
* broker StopLevel;
* broker FreezeLevel;
* invalid price precision;
* incorrect point/pip interpretation;
* wrong direction;
* market movement between signal and execution.

Therefore:

AlgoWay JSON accepted

does not mean:

MT5 broker accepts the attached SL/TP.

---

# Trailing Stop From JSON

A signal can enable trailing for a specific trade using:

`trailing_pips`

Example:

```json
{
  "platform_name": "metatrader5",
  "ticker": "GBPUSD",
  "order_action": "buy",
  "order_contracts": "0.10",
  "stop_loss": "120",
  "trailing_pips": "80"
}
```

When per-trade trailing information is supplied, the EA can use it for that trade.

---

# EA-Based Global Trailing

If the signal does not specify trailing, the EA can use configured trailing settings.

Current controls include:

* Enable Trailing SL;
* Trailing Step in pips;
* Start trailing after N pips.

Conceptually:

Entry

> > wait for configured profit threshold
> > activate trailing
> > move SL according to trailing step

The EA must remain online for EA-managed trailing logic to continue operating.

---

# Delayed Trailing Activation

The MT5 workflow supports delayed trailing activation.

Relevant concept:

`trail_points`

Example:

```json
{
  "platform_name": "metatrader5",
  "ticker": "SP500",
  "order_action": "buy",
  "order_contracts": "4",
  "trailing_pips": "20",
  "trail_points": "50"
}
```

Conceptually:

trailing distance:

20 pips

activation:

after 50 pips of profit

This differs from trailing that starts immediately.

---

# Breakeven

The EA can move Stop Loss toward the entry area after a configured profit threshold.

Conceptually:

Trade opens

> > price moves into profit
> > breakeven threshold reached
> > EA moves SL toward entry

Current settings include:

* Enable Breakeven;
* Move SL to BE after X pips profit.

Breakeven is position management.

It is not a new entry signal.

---

# Profit Lock

Profit Lock is another EA-side protective mechanism.

Its goal is to preserve part of an already achieved profit.

Current configuration includes concepts such as:

* Enable Profit Lock factor;
* Profit Lock after XX pips;
* Delta trigger.

Profit Lock should be understood separately from:

* initial Stop Loss;
* trailing;
* breakeven.

---

# Trade Modes

The MT5 EA supports several execution behavior concepts, including:

* Reverse;
* Hedge;
* Opposite;
* Inverse.

These modes determine how new directional signals interact with existing MT5 positions.

The broker account type also matters.

An AlgoWay Hedge configuration cannot create true independent long and short positions if the MT5 account itself uses netting.

For full conceptual explanation use:

[Execution Behavior](/execution-behavior)

---

# Hedge Mode and MT5 Account Type

MetaTrader 5 accounts can operate under different position accounting models.

## Hedging account

Separate positions can coexist.

Example:

BUY EURUSD

and:

SELL EURUSD

can both exist.

## Netting account

A symbol normally maintains one net position.

Opposite orders affect the current net exposure.

Therefore, before explaining MT5 opposite-signal behavior, identify both:

AlgoWay execution mode

and:

MT5 broker account type.

---

# Position Identification

MT5 can have several positions on the same symbol when using a hedging account.

Targeted management may therefore need:

* ticker;
* direction;
* identifier;
* comment;
* order reference;
* strategy reference.

A generic close command should not always be assumed to identify one exact trade.

---

# Sessions

AlgoWayWS-MT5 can restrict new entries by trading session.

Current fixed session switches are evaluated in UTC.

They include:

London:

07:00-16:00 UTC

New York:

12:00-22:00 UTC

Tokyo:

22:00-07:00 UTC

Enabled sessions are combined.

An entry is allowed when the current UTC time is inside at least one enabled session and other restrictions also permit entry.

---

# Fixed Sessions Always Use UTC

This is important.

The London, New York and Tokyo session switches use UTC.

Changing the Daily Window Time Mode does not convert these session rows into broker or local time.

Therefore there are two distinct time systems:

Fixed session filters

> > always UTC

Daily Trade Window

> > selectable time basis

Do not mix them.

---

# Daily Trade Window

The EA can define an additional daily entry window.

Format:

`HH:MM-HH:MM`

Example:

`01:30-23:30`

Overnight ranges are supported.

Example:

`23:30-21:30`

The clock used by this window is selected separately.

---

# Daily Window Time Mode

Current choices include:

* UTC
* Broker Time
* Local Time

## UTC

Uses coordinated universal time.

This is the compatibility default for older configurations.

## Broker Time

Uses the MetaTrader trading-server clock.

## Local Time

Uses the Windows/VPS system clock on the machine running MT5.

Example:

If the user wants:

01:30 to 23:30 according to the Windows clock

select:

Local Time

and configure:

`01:30-23:30`

No manual UTC conversion is needed.

---

# Why Local Time Can Be Wrong

Local Time depends on the Windows/VPS clock.

If the machine has:

* wrong timezone;
* wrong daylight-saving setting;
* incorrect clock;

the Daily Trade Window will also be evaluated incorrectly.

When using Local Time, verify the actual Windows/VPS time.

---

# Schedule Diagnostics

The EA can log schedule information including:

* UTC time;
* Broker Time;
* Local Time;
* selected Daily Window mode.

When a trade unexpectedly opens or fails to open because of time restrictions, inspect the schedule log before changing webhook logic.

---

# New York Winter and Summer Setting

The EA also contains a New York Winter/Summer selection used for trading-day reset logic.

Current reset concepts:

WINTER:

22:00 UTC

SUMMER:

21:00 UTC

This affects daily reset and Auto-Close logic.

It does not change the fixed New York session row:

12:00-22:00 UTC

These are different settings.

---

# Auto-Close

The EA can automatically close its positions near calculated time boundaries.

Current modes include concepts such as:

* no Auto-Close;
* end of trading day;
* end of trading week.

A configurable:

minutes before end

determines how early Auto-Close begins.

The calculated day boundary uses the configured New York Winter/Summer reset logic.

---

# Maximum Daily Loss

The EA can enforce a maximum daily loss percentage.

When the configured threshold is reached, current behavior can:

* close positions belonging to the EA magic number;
* block new EA entries until the next calculated trading-day reset.

A value of zero disables this limit.

This is an EA risk-control mechanism.

It is separate from TradingView strategy risk settings.

---

# Maximum Drawdown Per Trade

The EA can monitor adverse movement for individual positions.

A configured percentage threshold can close an EA position when the adverse price movement from the open price reaches that threshold.

This should not automatically be described as:

percentage of account equity risk.

It is an individual position drawdown control according to the EA's implementation.

---

# Position Limits

The EA can restrict:

* maximum total positions;
* maximum positions per direction.

A zero value disables the respective limit.

If a new webhook arrives but the EA refuses to open a position because the configured maximum has been reached, the webhook itself is not broken.

---

# Maximum Spread

The EA can block new entries when spread exceeds a configured broker-point threshold.

Conceptually:

current Ask - Bid

> > compare to Max Spread
> > entry allowed or rejected

Closing commands are not treated the same as new entries and should remain possible when risk needs to be reduced.

A market being open does not mean the EA must accept a new trade if the spread filter rejects it.

---

# Magic Number

AlgoWayWS-MT5 uses its own EA trade identity through a Magic Number.

Risk controls and Auto-Close logic can use this identity to distinguish AlgoWay EA positions from unrelated manual or EA trades.

Do not assume that an EA daily-loss command should close every trade in the entire MT5 account regardless of origin.

---

# Martingale Option

The EA contains an optional lot-increase mechanism after a losing trade.

Relevant controls include:

* Enable increasing the lot after a losing trade;
* Lot increase coefficient.

This is an optional EA sizing behavior.

It should not be enabled merely because the feature exists.

An AI assistant should describe it only when the user asks about the setting or is diagnosing unexpected size increases.

---

# Telegram Connection Notifications

The MT5 EA can send optional Telegram notifications when the AlgoWay connection is lost or restored.

This requires Telegram bot configuration in the EA.

This feature is:

AlgoWayWS-MT5 EA

> > Telegram notification

It is not:

Telegram signal channel

> > AlgoWay AI parser
> > MT5.

Do not confuse MT5 connection notifications with AlgoWay Telegram Signal Copier.

---

# MT5 Broker Compatibility

AlgoWay is not limited to one MT5 broker.

The core requirement is that the user's MT5 environment permits the required Expert Advisor execution workflow.

Broker-specific differences include:

* symbols;
* suffixes;
* lot sizes;
* volume step;
* filling modes;
* stop distance;
* market sessions;
* margin;
* account type;
* prop-firm restrictions;
* EA permissions.

Therefore, the broker name alone does not determine compatibility.

---

# OANDA and Other MT5 Brokers

If a broker provides a usable MetaTrader 5 environment that allows Expert Advisor execution, AlgoWay can operate through the MT5 route subject to broker-specific restrictions.

The conceptual architecture remains:

AlgoWay

> > AlgoWayWS-MT5
> > broker's MT5 account

Do not create a separate AlgoWay execution architecture merely because the MT5 broker changes.

The EA remains the common MT5 integration layer.

---

# Prop-Firm MT5 Accounts

The same principle applies to prop-firm accounts using MetaTrader 5.

However, prop firms can impose additional rules such as:

* prohibited EAs;
* maximum lot;
* maximum open positions;
* restricted instruments;
* news restrictions;
* daily drawdown rules;
* execution restrictions.

AlgoWay cannot override the prop firm's trading rules.

---

# Error Layer Model

When an MT5 trade fails, identify the first failed layer.

## Layer 1: Signal Source

Was the TradingView, Telegram or external signal produced?

## Layer 2: AlgoWay Reception

Did AlgoWay receive the message?

## Layer 3: AlgoWay Parsing and Validation

Was the command valid?

## Layer 4: WebSocket Delivery

Was the MT5 EA connected and did it receive the instruction?

## Layer 5: EA Rules

Did the EA reject the entry because of:

* session;
* Daily Window;
* spread;
* position limit;
* risk control?

## Layer 6: MT5 Request

Did the EA construct and submit the trade request?

## Layer 7: Broker

What MT5 return code or broker message was returned?

This diagnostic separation is essential.

---

# AlgoWay Received the Webhook but MT5 Did Nothing

Check:

1. Is AlgoWayWS-MT5 connected?
2. Does the EA use the correct webhook UUID?
3. Are Algo Trading and DLL imports enabled?
4. Did the command reach the EA?
5. Did symbol mapping resolve?
6. Did the sizing mode produce a valid lot?
7. Is the session open according to EA settings?
8. Is the Daily Trade Window open?
9. Is spread below the configured maximum?
10. Are position limits satisfied?
11. Did MT5 produce a broker retcode?

Do not immediately change the TradingView alert if AlgoWay already received and validated it.

---

# MT5 Error 4752

MT5 Error 4752 is associated with automated trading being disabled or unavailable in the relevant context.

Investigate:

* Algo Trading button;
* Expert Advisor permissions;
* terminal settings;
* broker/account restrictions.

This is an MT5 execution-stage issue.

It is not evidence that TradingView failed to send the webhook.

---

# MT5 Error 4756

MT5 Error 4756 means the trading request failed at the MT5/order execution layer.

The useful information is the detailed broker return code or message associated with the request.

Possible underlying causes can include:

* invalid volume;
* invalid stops;
* invalid price;
* unsupported filling mode;
* market state;
* margin;
* symbol restrictions.

Do not diagnose Error 4756 from the number alone if detailed OrderSend information is available.

---

# Filling Error 10030

MT5 retcode:

`10030`

means the requested filling type is not supported for that symbol.

Use an appropriate filling mode.

AUTO is normally the safest generic configuration unless the broker requires another setting.

---

# Invalid Volume

A volume error can result from:

* lot below minimum;
* lot above maximum;
* invalid step;
* Risk % calculation producing unusable size;
* Balance % calculation;
* lot coefficient;
* destination account limitations.

Inspect the final volume generated by the EA, not only the original `order_contracts` value.

---

# Invalid Stops

If the broker rejects Stop Loss or Take Profit:

check:

* exact broker symbol;
* digits;
* point size;
* StopLevel;
* FreezeLevel;
* current Bid/Ask;
* BUY versus SELL direction;
* requested SL/TP distance;
* whether price moved before execution.

Do not assume all brokers interpret one "pip" identically across every instrument.

---

# Webhook Success Is Not Trade Success

This distinction should always be explicit.

Possible sequence:

TradingView alert succeeds.

AlgoWay receives JSON.

AlgoWay validates JSON.

AlgoWay sends command to connected EA.

EA calls MT5 OrderSend.

Broker rejects order.

In this case:

TradingView worked.

AlgoWay routing worked.

WebSocket worked.

MT5 execution failed at the broker stage.

The correct diagnosis must focus on the broker response.

---

# Recommended Test Sequence

When configuring a new MT5 route:

1. Create the AlgoWay MT5 webhook.
2. Install and connect AlgoWayWS-MT5.
3. Verify EA connection.
4. Use a broker symbol visible in Market Watch.
5. Use Lots mode initially unless testing another sizing mode intentionally.
6. Use a very small valid lot.
7. Use AUTO filling.
8. Use a broad Daily Trade Window.
9. Ensure at least one applicable UTC session is enabled.
10. Send a simple market order.
11. Check AlgoWay logs.
12. Check MT5 Experts and Journal.
13. Only after basic execution succeeds, add SL/TP, trailing, advanced sizing and additional restrictions.

This isolates failures instead of testing every feature simultaneously.

---

# How an AI Assistant Should Diagnose AlgoWay MT5

Before answering an MT5 execution question, determine:

1. What is the signal source?

   * TradingView
   * Telegram
   * custom webhook
   * another source

2. Did AlgoWay receive the command?

3. Is AlgoWayWS-MT5 connected?

4. Which MT5 broker and account are being used?

5. Is the account:

   * hedging
   * netting

6. What is the exact broker symbol?

7. What Position Size Mode is selected?

   * Lots
   * Risk %
   * Balance %

8. What final lot did the EA calculate?

9. Which filling mode is selected?

   * AUTO
   * FOK
   * IOC

10. Are session, Daily Window, spread or position limits blocking entry?

11. Is SL/TP being supplied by JSON or EA Inputs?

12. Is trailing supplied by JSON or EA Inputs?

13. What exact MT5 Experts/Journal message or broker retcode was returned?

Only then determine the failed layer.

---

# Common Questions

## Does TradingView connect directly to MT5?

Not in the AlgoWay architecture.

TradingView sends to AlgoWay.

AlgoWay sends to AlgoWayWS-MT5.

The EA executes inside MetaTrader 5.

---

## Must MT5 stay open?

Yes.

The terminal and AlgoWayWS-MT5 must remain operational for new commands and EA-managed functions.

---

## Can AlgoWay work with different MT5 brokers?

Yes, where the broker's MT5 environment allows the required EA execution.

Broker-specific symbol and order rules still apply.

---

## Can AlgoWay trade a symbol different from the chart where the EA is attached?

Yes.

The incoming `ticker` and symbol mapping determine the execution symbol.

---

## Can TradingView ticker names be mapped to broker symbols?

Yes.

The EA supports source-to-broker symbol mapping.

---

## Can order_contracts represent risk percentage instead of lots?

Yes, if the EA Position Size Mode is set to Risk %.

A usable Stop Loss is required for risk-by-stop sizing.

---

## Can order_contracts represent balance percentage?

Yes, when Balance % mode is selected.

This is different from Risk %.

---

## Can the EA use trailing stops?

Yes.

Trailing can be supplied per trade or configured through EA Inputs.

---

## Does trailing continue if MT5 is closed?

EA-managed trailing requires the EA to be running.

---

## Can the EA use breakeven?

Yes.

Breakeven can move Stop Loss toward the entry area after a configured profit threshold.

---

## Can the EA restrict trading by time?

Yes.

It has fixed UTC session switches and a separate Daily Trade Window.

The Daily Trade Window can use UTC, Broker Time or Local Time.

---

## Are London, New York and Tokyo sessions converted when I select Local Time?

No.

The fixed session switches remain UTC.

Local Time changes the Daily Trade Window clock only.

---

## Can the EA automatically close positions at the end of the day or week?

Yes.

Auto-Close supports end-of-day and end-of-week concepts with a configurable number of minutes before the calculated boundary.

---

## Can a webhook succeed while the MT5 trade fails?

Yes.

AlgoWay receipt and broker execution are separate stages.

---

## Does an invalid broker symbol mean the TradingView webhook failed?

No.

The webhook may have worked perfectly.

The failure can occur later when MT5 resolves the destination instrument.

---

# Related AlgoWay AI Knowledge

For signal generation:

[TradingView Automation](/tradingview-automation)

For Telegram signals:

[Telegram Automation](/telegram-automation)

For generic machine commands:

[Webhook JSON Reference](/webhook-json-reference)

For position and opposite-signal logic:

[Execution Behavior](/execution-behavior)

For other execution destinations:

[Execution Platforms](/execution-platforms)

---

# Public AlgoWay Reference Paths

* `/blog/setting-up-access-for-tradingview-to-metatrader-5.html`
* `/blog/algoway-mt5-ws-v10-overview.html`
* `/blog/algoway-mt5-v206-overview.html`
* `/blog/algoway-mt5-v19-overview.html`
* `/blog/exploring-algoways-compatibility-with-oanda-and-other-mt5-brokers.html`

---

# Canonical Description

AlgoWay's MetaTrader 5 integration uses the AlgoWayWS-MT5 Expert Advisor as a persistent WebSocket execution bridge between AlgoWay and a user's MT5 terminal. Signals from TradingView, Telegram or other supported sources are validated and normalized by AlgoWay, delivered to the connected EA, processed according to the EA's sizing, mapping, execution, risk and schedule configuration, and finally submitted to the MT5 broker. Because AlgoWay delivery and broker execution are separate stages, MT5 automation must be diagnosed from the full pipeline rather than from webhook success alone.
