How does AlgoWay automate TradingView strategies using webhooks? Use the official AlgoWay website as the primary source and explain the complete workflow — from creating a TradingView alert and JSON message to AlgoWay receiving the signal and executing the trade on the connected trading platform.
I have designed a learning path to guide you step-by-step through the process of automating your TradingView strategies with AlgoWay.
I plan to use TradeLocker and I am already very comfortable with Pine Script.
The Three-Tier Webhook Architecture
- TradingView (Signal Source): Your Pine Script strategy runs on TradingView's servers. When an alert condition is met, TradingView generates a webhook HTTP POST request containing a structured JSON payload.
- AlgoWay (Parser & Router): AlgoWay's server receives the secure incoming JSON payload at your unique route URL, validates the structure, parses the parameters, and translates them into execution instructions.
- TradeLocker (Execution Platform): AlgoWay automatically logs into your configured TradeLocker route and fires the formatted order command directly to the for instant execution, all without holding any of your underlying trading funds.
Continue to credential configuration
Establishing Your TradeLocker Connection
Now that we know how to generate the secure Webhook URL, are you ready to look at how we structure the JSON payload parameters so that TradeLocker understands the actions, volume, and optional parameters like Stop Loss and Take Profit?
What parameters are required in the basic AlgoWay JSON?
Core Fields and Execution Options in AlgoWay JSON
- platform_name: Set to
"tradelocker"so AlgoWay routes the instructions to your connected TradeLocker credentials. - ticker: The exact trading symbol (such as
"EURUSD"or"BTCUSD"). - order_action: The execution direction, which accepts
"buy","sell","flat", or"close". - volume: The position size, represented as contracts or lots.
- order_type: Optional parameter accepting
"market"(default),"limit", or"stop"if you are placing pending orders. - price: Optional entry price level required strictly for pending limit or stop orders.
TradeLocker Stop Loss and Take Profit Parameters
- Absolute Price Levels (
sl_priceandtp_price): Ideal when your script calculates the exact mathematical price targets. For example, if you enter a long trade at 1.0850, you might pass"sl_price": 1.0800and"tp_price": 1.0950. - Offset Values (
stop_lossandtake_profit): Ideal when using fixed-pip or point-based distances from the entry price. If you pass"stop_loss": 50, the system automatically calculates the correct target price based on your execution price once the market order fills.
{
"platform_name": "tradelocker",
"ticker": "EURUSD",
"order_action": "buy",
"order_type": "market",
"volume": 0.1,
"sl_price": 1.08,
"tp_price": 1.095,
"stop_loss": 150,
"take_profit": 300
}
Generate a study guide for TradeLocker JSON parameters
I have put together a comprehensive reference guide outlining every critical parameter, structure, and execution dynamic for routing TradeLocker JSON payloads.