Main clusters and core pages.
ATP Premium Indicator can send TradingView indicator alerts to AlgoWay, and AlgoWay can route those alerts to MetaTrader 5 through the AlgoWayWS-MT5 Expert Advisor. The important part is the alert message: every ATP Premium alert must send one clean JSON command with the correct order_id, action, size, Stop Loss, Take Profit or trailing stop values.
This guide is written for traders searching for ATP Premium Indicator webhook, TradingView indicator alert JSON, indicator alert to MT5, TradingView to MT5 indicator automation, MT5 partial take profit webhook, TradingView trailing stop alert, and AlgoWay ATP Premium setup.
The automation route is:
ATP Premium Indicator alert → TradingView webhook URL → AlgoWay webhook → AlgoWayWS-MT5 EA → MetaTrader 5 broker account
This page is not a general TradingView Strategy Tester guide. ATP Premium uses indicator-style alert conditions, so the setup focuses on individual alert templates, position identifiers, partial entries, exits, SL/TP and trailing logic.
Last updated: 2026-05-12 • Author: AlgoWay
ATP Premium Indicator automation is different from a normal TradingView strategy webhook. A strategy can send order-fill events from one script, while an indicator usually produces separate alert conditions. For SEO and for real execution, this distinction matters. Traders searching for ATP Premium Indicator webhook alerts, TradingView indicator to MT5, indicator alert automation, or MT5 webhook trading bot usually need a practical mapping between each visual signal and each execution command.
AlgoWay solves this by treating every ATP Premium signal as a structured automation message. Long Entry 1, Long Entry 2, Short Entry 1 and Short Entry 2 are not only labels on a chart. In an automated trading workflow, they become position legs. Each leg needs a stable order_id, a direction, a size, and risk parameters. Without that mapping, a partial take profit alert can close the wrong trade, a trailing stop alert can be interpreted as a new entry, or a second-position alert can overwrite the first-position logic.
This is why the page focuses on exact JSON templates instead of generic trading advice. The goal is to turn ATP Premium Indicator alerts into clean AlgoWay webhook commands that can be checked in logs, routed to MetaTrader 5, and managed by the AlgoWayWS-MT5 EA.
To connect ATP Premium Indicator alerts to MetaTrader 5 through AlgoWay:
X, Y, SL, TP and TRAIL with real values or supported ATP variables.Many AlgoWay guides use TradingView strategy placeholders such as {{strategy.order.contracts}} and {{strategy.market_position}}. ATP Premium Indicator alerts are different. Indicator alerts usually fire from specific alert conditions and often need a fixed or indicator-generated message for each condition.
| Alert type | Typical message style | What matters most |
|---|---|---|
| TradingView strategy alert | Uses {{strategy.*}} placeholders |
Strategy order fills, market position, contracts |
| ATP Premium indicator alert | Separate JSON per indicator condition | order_id, action, X/Y size, SL, TP, trailing |
TradingView documents that indicator scripts can define alert conditions and that users must create alerts from those conditions in the Create Alert dialog. This is why ATP Premium needs separate alert messages for each event instead of one universal strategy message.
The phrase TradingView indicator alert to MT5 sounds simple, but the execution layer needs more than a signal name. A TradingView alert can tell AlgoWay that a condition fired, but AlgoWay still needs to know whether that condition means open long, open short, close a position, manage the second leg, apply Stop Loss, apply Take Profit, or activate trailing stop.
For ATP Premium, the cleanest structure is one alert condition mapped to one JSON command. That makes troubleshooting much easier. If Long Entry 1 fires, the AlgoWay Webhook Logs should show a Long Entry 1 payload. If Short Entry 2 closes, the payload should contain the same Short Entry 2 order_id. This structure gives the trader a readable audit trail from the TradingView alert window to the MetaTrader 5 Experts and Journal tabs.
For search engines, this also gives the page a clear topic: it is not only about TradingView alerts, and not only about MT5. It is about ATP Premium Indicator webhook JSON, partial position automation, TradingView to MetaTrader 5 execution, and AlgoWay webhook routing.
Prepare these items before configuring ATP Premium alerts:
X;Y;SL;TP;TRAIL, if using 2 TP mode.For MT5 setup, use the current guide: How to install AlgoWayWS-MT5 EA.
Every ATP Premium webhook message should be valid JSON and include the fields AlgoWay needs to route and execute the command.
| Field | Example | Purpose |
|---|---|---|
platform_name |
metatrader5 |
Tells AlgoWay to route the command to MetaTrader 5. |
ticker |
{{ticker}} |
TradingView symbol sent to AlgoWay. It must match or map to the MT5 broker symbol. |
order_id |
Long Entry 1 |
Identifies the specific ATP position leg so entry and exit can match. |
order_action |
buy, sell, flat |
Defines entry direction or close action. |
order_contracts |
X or Y |
Defines first or second position size. |
stop_loss |
SL |
Distance-style Stop Loss value where supported by the route. |
take_profit |
TP |
Distance-style Take Profit value where supported by the route. |
trailing_pips |
TRAIL |
Trailing Stop value for second leg / 2 TP mode where supported. |
Replace placeholder letters before live use. X, Y, SL, TP and TRAIL are examples. Use real numbers or ATP-supported variables that produce valid JSON values.
The order_id field is one of the most important fields in this ATP Premium setup. It allows AlgoWay to understand which logical position leg the alert belongs to. If the first long entry and the second long entry use the same generic identifier, the automation layer cannot clearly separate the first partial position from the second partial position. That becomes a problem when the strategy uses two take-profit levels, trailing on the second leg, or separate close alerts.
A good ATP Premium webhook setup uses stable names such as Long Entry 1, Long Entry 2, Short Entry 1 and Short Entry 2. The same value should appear in the matching close alert. This gives every alert a purpose: entry, close, trailing management, or position protection. It also makes logs readable when several signals arrive close together.
The templates on this page use stop_loss and take_profit as distance-style fields because they are easy to understand for ATP Premium examples. In some AlgoWay routes, traders may also use exact price fields such as sl_price and tp_price when the indicator or Pine Script output gives real market levels. Both approaches are useful, but they must not be confused.
Distance-style values are useful when the alert says “use 100 points Stop Loss” or “use 200 points Take Profit.” Exact price values are useful when the signal gives a concrete level, such as a structure low, structure high, support level, resistance level, or calculated indicator stop. Before live use, confirm which field your route expects and how your MT5 broker interprets digits, points and pips.
Use this template when ATP Premium opens the first long position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 1",
"order_action": "buy",
"order_contracts": "X",
"stop_loss": "SL",
"take_profit": "TP"
}
Use this template when ATP Premium closes the first long position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 1",
"order_action": "flat",
"order_contracts": "X"
}
The order_id value must match between the entry and exit templates.
Use this template when ATP Premium opens the second long position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 2",
"order_action": "buy",
"order_contracts": "Y",
"stop_loss": "SL",
"take_profit": "TP"
}
Use this template when ATP Premium applies trailing logic to the second long position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 2",
"order_action": "buy",
"order_contracts": "Y",
"trailing_pips": "TRAIL"
}
Use this template when ATP Premium closes the second long position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 2",
"order_action": "flat",
"order_contracts": "Y"
}
Use this template when ATP Premium opens the first short position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Short Entry 1",
"order_action": "sell",
"order_contracts": "X",
"stop_loss": "SL",
"take_profit": "TP"
}
Use this template when ATP Premium closes the first short position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Short Entry 1",
"order_action": "flat",
"order_contracts": "X"
}
Use this template when ATP Premium opens the second short position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Short Entry 2",
"order_action": "sell",
"order_contracts": "Y",
"stop_loss": "SL",
"take_profit": "TP"
}
Use this template when ATP Premium applies trailing logic to the second short position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Short Entry 2",
"order_action": "sell",
"order_contracts": "Y",
"trailing_pips": "TRAIL"
}
Use this template when ATP Premium closes the second short position.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Short Entry 2",
"order_action": "flat",
"order_contracts": "Y"
}
The original ATP Premium setup separates first and second position logic. This is useful for partial take profit and trailing-stop workflows:
X is the first part of the position;Y is the second part of the position;order_id as the entry leg.Trailing stop should be tested carefully because MT5 broker rules, points/pips interpretation, symbol digits, stop levels and EA behavior can affect execution.
More detail: How to automate MT5 Stop Loss and Take Profit from TradingView alerts.
A common ATP Premium automation structure is to split the trade into two logical positions. The first position can target the first take-profit level. The second position can stay open for a larger move and use trailing stop after the market moves in the expected direction. This is why the JSON examples separate X and Y.
The recommended workflow is:
order_id as the entry it is supposed to close.This structure gives more control than one large position because it separates the profit-taking leg from the runner leg. It also creates a better automation record in AlgoWay logs and MT5 logs.
Create a separate TradingView alert for each ATP Premium condition you want to automate.
TradingView webhook alerts send the alert message to the external URL configured in the alert. AlgoWay receives that message and routes it to the destination platform.
General setup guide: How to create a TradingView webhook alert.
When creating ATP Premium alerts, choose an alert frequency that matches the indicator logic. If the condition can remain true for several bars, an aggressive alert frequency may send repeated webhook messages. If the indicator creates a one-time entry event, the alert should normally fire only when that event appears.
The most important operational rule is simple: one ATP Premium event should produce one AlgoWay action. If Long Entry 1 appears once, AlgoWay should receive one Long Entry 1 JSON payload. If the same event is sent repeatedly, the MT5 side may receive repeated buy or sell instructions unless the route logic blocks duplicates. Use TradingView alert settings, ATP Premium condition settings and AlgoWay logs together to confirm that the alert fires exactly as expected.
For webhook delivery, TradingView sends the alert message to the external URL configured in the alert. If the alert message is valid JSON, AlgoWay can parse it as a structured command. If the message contains several JSON objects, missing quotes, broken placeholders, or text around the JSON, the automation path can fail before the command ever reaches MT5.
Test ATP Premium alerts in layers before live trading:
This is a structural example. Replace the symbol, size and SL/TP values according to your broker rules.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_id": "Long Entry 1",
"order_action": "buy",
"order_contracts": "0.01",
"stop_loss": "100",
"take_profit": "200"
}
If your route interprets stop_loss and take_profit as points, pips or another configured distance model, confirm that interpretation before live trading.
Before using normal position size, check the whole chain from TradingView to MT5.
platform_name is metatrader5.ticker matches the broker symbol or symbol mapping is configured.order_id matches between entry and close messages.order_contracts is a valid MT5 lot size for the symbol.TradingView should send one JSON message per alert. If several blocks are pasted together, AlgoWay can reject the message as invalid JSON.
These are placeholders. Replace them with real values or valid ATP output variables before live use.
If entry uses Long Entry 1 and exit uses a different identifier, the route may not close the intended leg.
TradingView {{ticker}} may not match the MT5 broker symbol. Check Market Watch and symbol mapping.
Stop Loss or Take Profit can be too close, on the wrong side, or invalid for the broker symbol. See: How to fix MT5 Error 4756.
If MT5 blocks Expert Advisor trading, orders will not execute. See: How to fix MT5 Error 4752.
If AlgoWay rejects the alert before MT5 receives it, check quotes, commas, braces and content type. See: How to fix AlgoWay webhook Error 415.
If a trailing alert uses buy or sell, confirm how your current route interprets that command. In some workflows, modification should use a dedicated modify action or route-specific logic. Test before live trading.
Yes. ATP Premium Indicator alerts can be sent from TradingView to AlgoWay through a webhook URL. AlgoWay then routes the JSON command to MetaTrader 5 through the AlgoWayWS-MT5 EA.
Use separate TradingView alerts for separate ATP Premium conditions. Long Entry 1, Long Entry 2, Short Entry 1, Short Entry 2, close alerts and trailing alerts should be configured separately so each alert sends one clear JSON command.
order_id identifies the logical position leg. It helps the entry, close and trailing logic stay connected. Without consistent identifiers, partial take profit and second-position management become harder to debug.
This page is written for MT5 automation, but the general AlgoWay model can support other destinations if the route accepts the required fields. For other platforms, use that platform's dedicated AlgoWay guide and adjust platform_name and supported risk fields.
The safest first test is a small fixed Long Entry 1 message with a valid lot size and simple SL/TP values. After that, test the matching flat alert, then repeat the same process for the second long leg and both short legs.
ATP Premium Indicator automation depends on clean, separate TradingView alert messages. Use one JSON block per ATP condition, keep order_id consistent between entry and exit, replace X, Y, SL, TP and TRAIL with valid values, and test each leg before live trading.
Once the messages are correct, AlgoWay can route ATP Premium indicator alerts from TradingView to MetaTrader 5 through the current AlgoWayWS-MT5 EA workflow.