Those who use TradingView for quantitative trading will eventually encounter the same problem:

The strategy signal comes out, but ordering still relies on manual execution. When the alert sounds, you might be sleeping, in a meeting, or looking at another chart — by the time you react, the opportunity window has long since closed.

The more fundamental question is: the act of manual ordering itself contradicts the logic of quantitative trading. You write strategies to eliminate emotional interference and execute rules, but as long as there is still a "person" in between, the rules cannot be strictly enforced.

This article solves this problem. After reading, you will understand the entire working principle of automated trading and complete the full configuration from TradingView alerts to automated transactions on Binance.

First, understand the principle: how this system works.

Before starting the configuration, take two minutes to understand the entire process — this will make your subsequent configuration clearer and easier to troubleshoot when problems arise.

The entire automated trading process consists of three parts:

TradingView → FlamoTrade → Binance
(Signal Source) (Execution Hub) (Exchange)

TradingView is responsible for generating signals. After your strategy or indicator triggers conditions, TradingView will send an alert. This alert can carry content and be sent to a specified URL via Webhook.

FlamoTrade is the intermediary execution engine. It receives the Webhook requests sent by TradingView, parses the JSON trading instructions inside, and then calls the Binance API to place orders. Its core value is to reliably connect the two tasks of "receiving signals" and "executing trades," while handling various engineering problems like multi-account concurrency, retrying failed orders, and Telegram pushes.

Binance is responsible for actual execution. FlamoTrade places orders in your account through the API Key you authorize.

After understanding this process, you will find that the logic of configuration is very simple: let TradingView know where to send signals and let FlamoTrade know which account to place orders.

Why is FlamoTrade needed as an intermediary layer?

Some may ask: Can TradingView directly call the Binance API?

Technically, TradingView's Webhook can only send HTTP requests. It does not have capabilities for signature verification, account management, or asynchronous concurrency, and cannot directly drive Binance.

Some people try to set up a middle server for this, but in reality, the issues to handle are far more than expected: Binance API’s signature rules, timestamp verification, concurrency control for multiple accounts, retry mechanisms for failed orders, exchange rate limits... all require significant engineering input and long-term maintenance.

FlamoTrade does just that and has been running stably for over a year. For traders, using ready-made tools to solve engineering problems and focusing on strategies is the correct division of labor.

Start configuration.

Step one: Register FlamoTrade and obtain the Webhook URL.

Open flamotrade.com, register an account, and log in.

After logging in, go to the subscription interface, select to open the free standard version, and then go to the user management page to find the Webhook URL section, and copy this address:

https://api.flamotrade.com/webhook/your_unique_key

This URL is your exclusive signal receiving address. TradingView sends requests here, and FlamoTrade will execute the corresponding trading instructions. The key is your unique identifier; do not disclose it to others.

Step two: Bind Binance API.

FlamoTrade needs to place orders in your account through the Binance API. Here is a security design worth understanding:

Binance API Key has permission divisions. You only need to open contract trading permissions, and you do not need to open withdrawal permissions. This means that even if the API Key is leaked, the other party cannot withdraw your funds; they can only operate on contracts. This is the practical application of the principle of least privilege.

When creating the API Key, add the following IP to the whitelist:

192.243.127.172

This is the fixed IP of the FlamoTrade server. Only requests from this IP can use your API Key; requests from other IPs will be directly rejected by Binance, further limiting risk exposure.

After creation, add your API Key and Secret Key in the trading account list on the FlamoTrade API management page. FlamoTrade encrypts the keys for storage and does not save them in plaintext.

Step three: Configure Telegram push.

This step is not mandatory, but configuration is highly recommended.

A potential risk of automated trading is "loss of control" — the system is executing, and you don’t know what it’s doing. Telegram push solves this problem: every order trigger, execution, and failure is pushed to your phone in real-time, keeping you informed of the system status at all times.

Configuration method:

  1. Search for @BotFather on Telegram, enter /newbot to create a Bot, and save the Token.

  2. Use @userinfobot to get your Chat ID.

  3. Fill in the Token and Chat ID on the TelegramBot settings page of the FlamoTrade API interface, select Chinese for the push language, and save.

  4. Click test, and receiving a message indicates that the configuration is successful.

Step four: Create alerts in TradingView.

This is the most critical step in the entire configuration and also the easiest place to encounter problems. Understanding the structure of JSON instructions will make it much easier to adjust parameters later.

Open TradingView, create an alert on your strategy or indicator, paying attention to two key places:

Webhook URL: Enter the FlamoTrade address obtained in step one.

Alert message: Fill in the JSON format trading instructions here. FlamoTrade will parse this JSON upon receiving the request to determine how to place the order.

Here are several commonly used command templates; understand the meaning of each parameter:

Market order to go long (the most basic approach).

{
"action": "buySell",
"account": "ALL",
"symbol": "ETHUSDT",
"side": "BUY",
"amount": "0",
"usdt": "100",
"multiple": "0",
"price": "0",
"orderType": "market",
"cancelLast": "false",
"closeLast": "reverse",
"reduceOnly": "false",
"delay": "0",
"memo": ""
}

Parameter description:

  • action: Instruction type. buySell is a normal buy/sell, and there are also create (composite order), closePosition (closing position), etc.

  • side: Direction. BUY to go long, SELL to go short.

  • usdt: Order amount. The fields amount, usdt, and multiple take the first non-zero value by priority. Here, usdt specifies 100U.

  • multiple: Place orders based on account balance ratio, such as "0.3*5" which means using 30% of the account balance × 5 times leverage (the leverage you have set for your account).

  • orderType: market price, limit price (price is required for limit orders).

  • closeLast: reverse means to close the opposite position before placing an order, avoiding holding both long and short positions at the same time.

  • cancelLast: Whether to revoke all pending orders of this variety before placing an order.

Set take profit and stop loss when opening a position (recommended to use this).

{
"action": "create",
"account": "ALL",
"symbol": "ETHUSDT",
"side": "BUY",
"amount": "0",
"usdt": "100",
"multiple": "0",
"price": "0",
"stopPrice": "{{close}}*(1-2%)",
"profitPrice": "{{close}}*(1+4%)",
"orderType": "market",
"cancelLast": "true",
"closeLast": "reverse",
"reduceOnly": "false",
"delay": "0",
"memo": ""
}

stopPrice and profitPrice support mathematical expressions, {{close}} is the TradingView alert placeholder, which will be automatically replaced by the closing price at the time of triggering. *(1-2%) means down 2%, *(1+4%) means up 4%.

This means you don't need to calculate prices yourself — the system will dynamically calculate the take profit and stop loss based on real-time prices at the moment the signal is triggered.

Close position.

{
"action": "closePosition",
"account": "ALL",
"symbol": "ETHUSDT",
"side": "X",
"amount": "0",
"ratio": "1.0",
"price": "0",
"orderType": "market",
"cancelLast": "true",
"delay": "0",
"memo": ""
}

Fill X in side for all positions to close; closeBuy only closes long positions, and closeSell only closes short positions. Ratio is the closing proportion, where 1.0 indicates full closure and 0.5 indicates half closure.

Step five: Validate the entire process.

After completing the configuration, conduct a complete test with a small position to confirm three things:

  1. Whether FlamoTrade received the request after the TradingView alert is triggered (the original JSON data with replaced placeholders will be shown in the TelegramBot).

  2. Whether Telegram received the push order status information.

  3. Whether the Binance contract account shows the corresponding order record.

If all three are correct, it means the entire process is connected.

Several notable details.

Delay issue: From the Webhook sent by TradingView to the Binance execution, the normal case is within 1 second. This delay comes from network transmission, not from FlamoTrade's own processing time.

Multi-account: Filling the account field with ALL means placing orders simultaneously for all accounts. If you manage multiple accounts, you can also fill in specific account names, such as "bnc1 bnc2", and FlamoTrade will execute them concurrently rather than waiting serially.

Order failure handling: FlamoTrade has a built-in retry mechanism. If an order fails due to network fluctuations or exchange rate limits, the system will automatically retry and inform you of the failure reason through Telegram.

Free version: The standard version is free forever, with a monthly quota of 60 orders. This is sufficient for low-frequency strategies or testing phases. If you need to exceed the frequency, consider upgrading to a paid version.

Summary

The essence of automated trading is: to strictly execute rules in your absence.

This configuration does a simple task: TradingView is responsible for judging signals, FlamoTrade is responsible for reliable execution, and Binance is responsible for actual execution. Each link only does what it is supposed to do, leaving no space for manual intervention.

Configure once, and afterwards you don’t even need to open your computer while the strategy runs.

FlamoTrade registration address: flamotrade.com (Standard version is free forever, no credit card required).