TradeLocker Stop Loss and Take Profit automation with TradingView webhook alerts and AlgoWay

Last updated: May 2026 · Platform: TradeLocker · Source: TradingView alerts · Connector: AlgoWay

TradeLocker Stop Loss and Take Profit Automation for TradingView Webhooks

AlgoWay now supports advanced Stop Loss and Take Profit automation for TradeLocker webhook trading. A TradingView alert can send a TradeLocker order with exact SL/TP prices, distance-based SL/TP values, or a mixed setup where one side uses a fixed price and the other side uses an offset from entry.

This page explains how to use AlgoWay JSON fields such as sl_price, tp_price, stop_loss and take_profit when automating TradeLocker from TradingView alerts. It is written for traders searching for TradingView to TradeLocker SL/TP, TradeLocker automated trading with stop loss, TradingView alerts with take profit, webhook trading bot with SL TP, TradeLocker webhook automation and TradingView TradeLocker risk management.

The execution flow is:

TradingView alert → AlgoWay webhook → TradeLocker API connection → TradeLocker order with SL/TP

Quick Answer: TradeLocker SL/TP Automation with AlgoWay

To send a TradeLocker order with Stop Loss and Take Profit from TradingView, create a TradeLocker webhook in AlgoWay, copy the AlgoWay webhook URL into the TradingView alert, and place valid JSON in the TradingView Message field. Use sl_price and tp_price for exact price levels. Use stop_loss and take_profit for offset values from entry.

Goal AlgoWay JSON field Best use case
Fixed Stop Loss price sl_price Market-structure SL, swing low/high, support/resistance level.
Fixed Take Profit price tp_price Exact target from an indicator, previous high/low, fixed chart level.
Distance-based Stop Loss stop_loss Strategy alerts that calculate risk in pips, ticks or platform distance units.
Distance-based Take Profit take_profit Risk-reward systems such as 1:2 or 1:3 targets from entry.

Why Stop Loss and Take Profit Automation Matters

A basic TradingView webhook can tell a connector to buy or sell. That is not enough for real automated trading. A TradeLocker automation setup needs to know how the trade should be protected after entry, where the planned exit is, and whether the risk levels are exact prices or distances from the entry price.

Without SL/TP fields, the alert only solves the entry problem. With SL/TP fields, the alert carries the full trade instruction:

  • symbol;
  • side;
  • quantity;
  • Stop Loss;
  • Take Profit;
  • trade mode;
  • execution destination.

That is the difference between simple alert forwarding and a TradeLocker webhook trading bot route that can execute a planned trade with risk context.

How AlgoWay Sends SL/TP from TradingView to TradeLocker

TradingView sends the alert payload to the AlgoWay webhook URL. AlgoWay reads the JSON message, validates the destination as tradelocker, identifies the symbol, side and size, then passes the order details to the configured TradeLocker account.

TradeLocker supports API-based trading workflows where external applications can create, modify and delete orders and positions. This is why a connector can do more than open a basic market order: it can also carry risk-management fields such as Stop Loss and Take Profit when the destination route supports them.

For traders, the important part is the TradingView Message field. Your alert must contain structured JSON, not a vague text message. AlgoWay uses that JSON to decide whether the TradeLocker order should use absolute SL/TP prices, offset SL/TP values, or a mixed setup.

TradeLocker SL/TP Fields in AlgoWay JSON

The four most important fields for this update are:

Field Type Meaning Example
sl_price Absolute price Exact Stop Loss price level. 2860.0
tp_price Absolute price Exact Take Profit price level. 3100.0
stop_loss Offset / distance Stop Loss distance from entry. 50
take_profit Offset / distance Take Profit distance from entry. 120

Use exact price fields when your TradingView script already calculates the stop or target level. Use offset fields when your strategy works with a fixed distance from the entry.

Absolute Price Mode: sl_price and tp_price

Absolute price mode is used when your TradingView alert sends the exact Stop Loss and Take Profit levels. This is the best format when the strategy calculates exits from chart structure, indicator levels, session highs/lows, support and resistance, or volatility bands.

Example: TradeLocker BUY with exact SL and TP prices

{
  "platform_name": "tradelocker",
  "ticker": "ETHUSD",
  "order_action": "buy",
  "order_contracts": 1.0,
  "sl_price": 2860.0,
  "tp_price": 3100.0
}

In this example, the alert tells AlgoWay to open a TradeLocker BUY order for ETHUSD, protect it with Stop Loss at 2860.0, and set Take Profit at 3100.0.

When to use absolute prices

  • Your Pine Script calculates exact SL and TP values.
  • Your strategy uses previous high, previous low, swing point or market structure.
  • Your indicator prints the stop and target on the chart.
  • You want the same price level that appears in TradingView to be sent to TradeLocker.

Offset Mode: stop_loss and take_profit

Offset mode is used when Stop Loss and Take Profit are expressed as a distance from the entry price. This is common for TradingView strategies that use fixed pip, point or tick-based risk logic.

Example: TradeLocker SELL with distance-based SL and TP

{
  "platform_name": "tradelocker",
  "ticker": "XAUUSD",
  "order_action": "sell",
  "order_contracts": 1.0,
  "stop_loss": 50,
  "take_profit": 120
}

In this example, the alert sends a SELL order with a Stop Loss distance of 50 and Take Profit distance of 120. The practical interpretation depends on the instrument and destination rules used by the TradeLocker route.

When to use offset values

  • Your strategy uses fixed pip or tick distance.
  • Your alerts are simple and do not calculate exact price levels.
  • You want the same risk distance on every entry.
  • You use a risk-reward model such as 50 pips Stop Loss and 100 pips Take Profit.

Mixed Mode: Absolute SL with Offset TP or Offset SL with Absolute TP

Some strategies need a mixed format. For example, a trader may want the Stop Loss at an exact invalidation level, but the Take Profit as a fixed distance from entry. AlgoWay supports this type of practical webhook format.

Example: absolute Stop Loss with offset Take Profit

{
  "platform_name": "tradelocker",
  "ticker": "USDJPY",
  "order_action": "buy",
  "order_contracts": 1.0,
  "sl_price": 146.200,
  "take_profit": 70
}

This is useful when the stop is based on a chart level, but the profit target is based on fixed distance or a simple reward multiple.

Priority Rule: Absolute Prices Take Priority

If both absolute and offset fields are provided for the same side of the trade, AlgoWay treats the absolute price as the priority value. In practice:

  • sl_price has priority over stop_loss for Stop Loss;
  • tp_price has priority over take_profit for Take Profit.

TradingView Strategy Alerts with SL/TP

For strategy-based automation, the cleanest approach is to make your Pine Script output the full JSON message. TradingView then sends the message to AlgoWay when the strategy alert fires.

TradingView strategy alert example with exact SL/TP prices

{
  "platform_name": "tradelocker",
  "ticker": "{{ticker}}",
  "order_action": "{{strategy.order.action}}",
  "order_contracts": {{strategy.order.contracts}},
  "sl_price": 1.07250,
  "tp_price": 1.08150
}

This format is useful when TradingView controls the signal and AlgoWay controls the execution route. TradingView does not need direct access to TradeLocker credentials. It only sends the alert to the AlgoWay webhook URL.

Manual TradingView Alerts with SL/TP

You can also use manual TradingView alerts. This is useful when you do not have a full Pine Script strategy, but still want a TradingView price alert to trigger a TradeLocker order with risk parameters.

Manual BUY alert example

{
  "platform_name": "tradelocker",
  "ticker": "EURUSD",
  "order_action": "buy",
  "order_contracts": 1.0,
  "stop_loss": 25,
  "take_profit": 60
}

Paste this JSON into the TradingView alert Message field and paste your AlgoWay webhook URL into the Webhook URL field. When the alert fires, AlgoWay receives the message and routes it to TradeLocker.

Practical Use Cases for TradeLocker SL/TP Automation

1. Moving Average Crossover with Fixed Risk

A moving average crossover strategy often uses a fixed distance Stop Loss and a larger Take Profit. In that case, stop_loss and take_profit are usually enough.

{
  "platform_name": "tradelocker",
  "ticker": "GBPUSD",
  "order_action": "buy",
  "order_contracts": 1.0,
  "stop_loss": 30,
  "take_profit": 90
}

2. RSI Reversal with Exact Invalidation Level

An RSI reversal strategy may enter when the market exits oversold or overbought territory. The Stop Loss can be placed at a recent swing level, while Take Profit can be a fixed distance.

{
  "platform_name": "tradelocker",
  "ticker": "AUDUSD",
  "order_action": "buy",
  "order_contracts": 1.0,
  "sl_price": 0.64120,
  "take_profit": 80
}

3. Breakout Strategy with Exact Target

A breakout strategy may calculate a breakout invalidation level and a fixed chart target. In that case, sl_price and tp_price make the webhook message more precise.

{
  "platform_name": "tradelocker",
  "ticker": "NAS100",
  "order_action": "buy",
  "order_contracts": 1.0,
  "sl_price": 18120.0,
  "tp_price": 18380.0
}

4. Multi-Account TradeLocker Automation

AlgoWay can be used as a webhook automation layer when the same TradingView signal needs to be routed through a controlled setup. The key SEO point is that TradeLocker automation should not only copy a BUY or SELL command. It should preserve the trade plan, including SL/TP, size and mode.

Testing TradeLocker SL/TP Webhooks

Before using a new JSON format in a live workflow, test the webhook route from the AlgoWay dashboard and then from TradingView. The goal is to confirm that the symbol, quantity, side and SL/TP values arrive exactly as expected.

  1. Create or open your TradeLocker webhook in AlgoWay.
  2. Use a small test size.
  3. Send a simple market order without SL/TP and confirm execution.
  4. Add stop_loss and take_profit and test again.
  5. Test sl_price and tp_price if your strategy uses exact price levels.
  6. Check the AlgoWay logs and the TradeLocker account after each test.

Logs matter because they show whether the issue is in TradingView alert formatting, AlgoWay JSON, platform credentials, symbol naming, quantity, TradeLocker account selection or broker execution rules.

Troubleshooting TradeLocker SL/TP Automation

Problem Likely cause What to check
TradingView alert fires but no TradeLocker order appears Webhook URL, credentials, server, Account ID or JSON error. Check AlgoWay webhook URL, TradeLocker login fields and AlgoWay logs.
Order opens without SL/TP Wrong field names or invalid values. Use sl_price, tp_price, stop_loss, take_profit exactly.
Absolute SL/TP ignored offset value Priority rule applied. If sl_price exists, it takes priority over stop_loss. If tp_price exists, it takes priority over take_profit.
Order rejected Invalid symbol, volume, account setting or SL/TP distance. Compare symbol and size with manual TradeLocker order rules and read AlgoWay execution logs.
TradingView sends text instead of JSON Message field is not valid JSON. Validate brackets, quotes, commas and placeholders before enabling automation.

How This Update Improves the TradeLocker Automation Workflow

This update makes the TradeLocker route more useful for real automated trading because the webhook can carry the risk plan with the entry. Traders no longer need to rely on a separate manual action after the order opens. The alert can contain the trade direction, symbol, quantity and risk parameters in one structured payload.

For AlgoWay, this also improves consistency across platforms. Traders who already use SL/TP fields for other AlgoWay destinations can use a clear TradeLocker format instead of treating TradeLocker as a basic order-only endpoint.

Related AlgoWay Guides

FAQ: TradeLocker Stop Loss and Take Profit Automation

Can TradingView send Stop Loss and Take Profit to TradeLocker?

Yes. With AlgoWay, a TradingView webhook alert can send TradeLocker orders with Stop Loss and Take Profit fields inside the JSON message.

Which fields should I use for exact Stop Loss and Take Profit prices?

Use sl_price for exact Stop Loss price and tp_price for exact Take Profit price.

Which fields should I use for distance-based SL/TP?

Use stop_loss for Stop Loss distance and take_profit for Take Profit distance from entry.

What happens if I send both sl_price and stop_loss?

AlgoWay gives priority to the absolute price field. For Stop Loss, sl_price has priority over stop_loss.

What happens if I send both tp_price and take_profit?

AlgoWay gives priority to the absolute price field. For Take Profit, tp_price has priority over take_profit.

Can I use TradeLocker SL/TP automation with manual TradingView alerts?

Yes. The TradingView alert can be manual or strategy-based. The important requirement is that the Message field contains valid AlgoWay JSON.

Does AlgoWay replace my TradingView strategy?

No. TradingView remains the signal source. AlgoWay receives the alert, validates the JSON and routes the execution command to TradeLocker.