How to Automate Trades on TradingView Directly without Third-Party-Services

Ultimate Guide How to Automate Trades on TradingView. No coding. No API. No servers. The Easiest & Cheapest Method.

Are you asking yourself these questions?

  • How to automate trades on TradingView?
  • How to avoid unnecessary costs?
  • What should I do if I don’t know how to program?

If these sound familiar, this article is for you.

Today, many services offer intermediary services in the trading market. Some are useful, while others only complicate a trader’s life. But one thing is certain: they are all expensive. You won’t find a good trading bot subscription for less than $50 per month. And you still need to deposit funds on an exchange! None of the third-party services will ever show you how to automate trades on TradingView directly. Of course not — their revenue depends on it.

In this article, I will break down how to automate trades on TradingView directly, without intermediaries. You will learn how to choose a TradingView strategy, configure it, conduct a proper backtest on historical data, connect directly to an exchange, and launch a fully automated trading bot. Let’s get straight to the point.


Choosing a Trading Strategy

Whether you like it or not, only you can define the trading algorithm that your bot will execute. Neither the exchange, TradingView, nor a third-party service will do this for you. However, this is not the main topic of this article. If you are wondering how to automate trades on TradingView, we will assume you have already chosen your trading algorithm.

If not, as you may know, on the platform under the “Indicators” tab, if you type “strategy,” you will see ready-made trading strategies, which are distinguished from indicators by a specific icon. For those unfamiliar, the key difference is that an indicator only visualizes market events, while a strategy defines entry and exit rules and can be tested on historical data.

How to automate trades on TradingView Strategy Sign

TradingView offers the richest selection of trading strategies on the market. I advise choosing one that you understand as a trader. In this article, I will demonstrate how to automate trades on TradingView using the crypto example of the “Script_Algo – High Low Range MA Crossover Strategy.” It is original, easy to understand, and, most importantly, free.


Strategy Overview: Timeframe, Asset, and Exchange Selection

How the Trading Algorithm Works

To understand how to automate trades on TradingView, you must clearly understand the principle of your chosen trading algorithm. This strategy is based on the crossover of modified Moving Averages. Instead of simple moving average lines, it uses ranges built on the high and low of previous candles.

How to automate trades on TradingView Strategy Action

If the smaller range crosses the larger one from below, a long signal is generated. If it crosses downward, a short signal is generated. The strategy is designed to close the current position before opening a new one. Using range crossovers helps avoid many false signals common in simple moving average crossover strategies.

Adding the Strategy to the Chart and Selecting a Timeframe

Click on the “Indicators” tab at the top left. Select “Strategies” and add your chosen one to the chart — in our case, “Script_Algo – High Low Range MA Crossover Strategy.” The chart should now visualize entry and exit signals.

Select your timeframe at the top left. For this example, we will use 1 hour. In crypto trading, I do not recommend using a timeframe lower than 1 hour, as the market is particularly manipulative and unpredictable on lower timeframes.

How to automate trades on TradingView Strategy Select Asset

Selecting the Instrument, Asset, and Exchange

In the “Symbol Search” tab at the top left, select the trading instrument and asset you plan to use, as well as your exchange. I choose Binance due to its low fees, high liquidity, and rich functionality. You should choose the one most convenient for you.

Ensure the instrument and crypto pair you select are actually traded on your chosen exchange. Ticker symbols can differ across exchanges. In my case, I am selecting futures: WIFUSDT.P (Perpetual).


Configuring the Strategy and Backtesting on Historical Data

To figure out how to automate trades on TradingView, you must first configure the strategy. Navigate to the “Strategy Tester” tab. You will see the “Overview” section, which displays an equity curve and key performance metrics like Total PnL, Drawdown, and Profit Factor.

Configuring Capital

Click on the strategy name in the top left and go to “Settings.” The “Properties” tab will appear first. Configure the Initial Capital, Order Size, Commission, and Slippage. For setup, I recommend: Initial Capital – 10,000 USDT, Order Size – 100 USDT, Commission – 0.1%, and Slippage – 1 tick.

How to automate trades on TradingView Strategy Capital Setting

Selecting Strategy Parameters

Go to the “Inputs” tab. Here, you will select the lengths for the Large and Small MAs, as well as the Moving Average type. Choose parameters that yield the best backtest results for Total Net Profit, Maximum Drawdown, and Profit Factor. In my case, I select Large MA: 25, Small MA: 5, Moving Average Type: DEMA.

How to automate trades on TradingView Strategy parameters

Backtesting on Historical Data

The next step in understanding how to automate trades on TradingView is to analyze the strategy’s performance on historical data. Pay close attention to:

  • The backtesting period (in the top right corner). In my case, it’s from February 24, 2024, to October 14, 2025.
  • The Equity Curve: If the strategy was effective, this line should be green and consistently rising. The smaller the drawdowns, the better.
  • Total Net Profit (PnL): This should be positive and meet your expectations in both absolute and percentage terms.
  • Max Drawdown: This should be significantly smaller than the Total PnL. The lower, the better.
  • Profitable Trades (% of Win Rate): The higher this percentage, the better.
  • Profit Factor: This must be greater than 1.0. The higher, the better.

How to automate trades on TradingView Strategy backtest results.

I have described how to conduct a backtest using TradingView strategy tester and the meaning of all these metrics in detail in my separate article: “How to Backtest TradingView Strategy: Step-by-Step Guide with a Real Example,” using this same strategy.

Any strategy written in Pine Script can be backtested for free in TradingView. The only limitation for a free account is the depth of historical data. I have written a separate article that covers this in more detail: How to Back Test Trading Strategy in TradingView for Free.

Analyzing Backtest Results

In my case, before launching the bot, I conclude that from mid-January 2024 to mid-October 2025 on the WIFUSDT pair using a 1-hour timeframe, the strategy would have yielded nearly 9.5% profit, or 944 USDT. The drawdown was manageable, 184 trades were executed, with almost 43% being profitable. The Profit Factor was 2.36, with a risk of 100 USDT (1%) per trade. These results satisfy me, meaning I can proceed to automate this strategy.

Please remember: past backtest results are not guaranteed to repeat in the future. Trading involves risk, whether manual or automated. All decisions are made at your own risk.


How to Automate Trades on TradingView

Before launching, I recommend saving your configured strategy. Return to the price chart, go to the “Indicator Templates” menu, and select “Save Indicator Template.” Enter any name, check both boxes, and click “Save.”

Configuring the Exchange and Webhook (Using Binance as an Example)

First, note that for TradingView to send signals to an exchange, you need at least a minimum paid subscription. The “Essential” plan costs about $15 per month with monthly billing. Regardless of where you send signals (to an exchange or a third-party service), a subscription is mandatory for automation. The Essential plan allows you to create up to 20 strategy alerts.

How to automate trades on TradingView positon mode
How to automate trades on TradingView positon mode

Exchange settings:

  1. Go to your exchange (e.g., Binance Futures).
  2. In the top right, select the margin type: Cross.
  3. In the settings nearby, select the position mode: One-Way Mode.
  4. Select your leverage. I choose 20x, but if you are a beginner, I do not recommend using more than 5x.

How to automate trades on TradingView binance settings full

Webhook settings:

  1. In the bottom left, navigate to the Bots section and select Webhook Signal Trading.
  2. In the bottom right, click Create New WebHook, Confirm and Proceed.
  3. Enter a Signal Name (e.g., “WIF”).
  4. Select your Crypto Pair (e.g., WIFUSDT Perpetual).
  5. Specify the Order Size.

How to automate trades on TradingView Webhook settings
How to automate trades on TradingView webhook setting1

This is a crucial step. The exchange will open and close positions for this exact amount, considering leverage. It does not matter what you set during strategy testing. Choose a position size you can afford, correlating with the capital in your USD-M Futures account and your backtest results.

Example: If you open a position for 100 USDT with 20x leverage, your used margin will be $5. This means even if you have just over 5 USDT, the exchange will open a $100 trade. However, check your TradingView backtest results again. Note the max drawdown of over $87. If the price moves against you, you could be liquidated. Therefore, considering the drawdown with 20x leverage, it’s recommended to have at least double the drawdown amount in your USD-M account.

On the other hand, Binance won’t allow you to open a position smaller than a specific minimum, which depends on the asset’s price. Try manually opening a $10 position. If it opens, close it immediately. If not, the exchange will show you the minimum size. Keep this in mind.

  1. Select Order Type: Market. Don’t forget this, or the bot will not work correctly.
  2. Click Create Signal. A “Webhook Signal TradingView” window will appear. You will need the Alert Message that TradingView will send and the Webhook URL. Leave this open and return to TradingView.

How to automate trades on TradingView Webhook URL settings

By the way, Binance itself is well aware of how to automate trades on TradingView and has even published its own official guide on the matter. This fact alone proves that the direct method is not only viable but officially recognized by one of the world’s largest exchanges.

Setting Up the TradingView Alert

Now that the strategy has been tested, you are one step closer to understanding how to automate trades on TradingView. There is just one more step to turn your strategy into a fully-functional trading bot.

  1. Ensure your configured strategy is active on the chart. Double-check the backtest results, timeframe, and asset.
  2. On the price chart, click the three dots next to the strategy name and select Add Alert on [Your Strategy Name].
  3. In the “Message” field, enter any name (this is for your reference).
  4. Go back to the Binance window and copy the provided Alert Message for the strategy.
  5. Return to TradingView, paste the copied Alert Message into the “Message” field, deleting any previous content.
  6. If done correctly, you will see a green checkmark.
  7. Go back to Binance, copy the Webhook URL, and click Run WebHook.
  8. In the TradingView Alert window, paste the copied Webhook URL into the “Webhook URL” field and activate it.
  9. I also recommend enabling push notifications in the TradingView app to monitor the strategy’s initial performance.
  10. Click Create. Your new Alert will appear in the Alerts panel (clock icon).

How to automate trades on TradingView alert message
How to automate trades on TradingView Webhook URL settings1

Since this is a Buy/Sell strategy that is always in a position, you must open the first position manually. To do this:

  1. Go to the “Strategy Tester” tab.
  2. Navigate to the “List of Trades.”
  3. You will see the most recent open position (Long or Short).
  4. Go to your exchange, select the correct crypto pair, and manually open the same position type (Long/Short) as shown in TradingView.

How to automate trades on TradingView open position manually

Congratulations! You have launched your bot! You now know how to automate trades on TradingView.


Important Final Notes & Next Steps

  • Discrepancies: Sometimes, data for closed trades might differ slightly due to slippage, platform/exchange delays, server latency, or internet speed. This is inherent to algorithmic trading.
  • Position Size: The value of open positions might slightly differ from the size you set on the exchange due to asset quotations against USDT. This generally doesn’t affect the overall trading outcome.
  • Alert Expiry: Alerts have a validity period depending on your subscription. Remember to check and renew them periodically.
  • No Holy Grail: Do not perceive this strategy as a guaranteed profit source. It is merely a tool for data analysis and automation. No one is immune from risks. I am not encouraging anyone to use this specific strategy or deposit funds anywhere.

This method allows you to automate any strategy. And now, let anyone dare to say that there are no ways how to automate trades on TradingView without intermediaries. While direct integration with Binance has limited functionality (fixed order size, basic Buy/Sell signals), it is a fully working option, especially considering its low cost.

If you wish to expand your bot’s capabilities (e.g., Trailing Stop, Partial Take Profit, advanced risk management), you will need third-party services like Cornix or 3Commas. These services can receive and process TradingView webhook signals. You can read more about them in my dedicated articles about Cornix and 3Commas.

Another service worthy of attention is Coinrule. This intuitive platform makes algorithmic trading accessible to everyone by allowing you to automate trading strategies without the need for coding. Users can create “If-This-Then-That” rules, execute trades based on market conditions, set stop-loss and take-profit orders, and manage risk across multiple exchanges from a single dashboard. It is the ideal tool for both beginners and experienced traders looking to implement disciplined, 24/7 trading strategies while eliminating emotional decision-making.

If you are interested in other strategies developed by us, you can check them out on our TradingView page Script_Algo. Now that you know how to automate trades on TradingView, you can launch any of them. Detailed descriptions of some trading strategies such as Extremum Range MA Crossover, Pivot Rider, ORB Gap, and Swing Pivot Pullback Strategy can be found on our website.

Now, regarding how to automate trades on TradingView for stock markets – the method covered in this article won’t work. For free semi-automated CFD trading (essentially similar to crypto futures but for stocks), I suggest reading our “The Tesla Stocks 5-Minute Chart Breakdown Strategy” guide. It explains how to connect TradingView to Capital.com broker for semi-automated trading. Since Capital.com is TradingView’s official partner, the integration requires no API or Webhook setup – you can execute trades directly from your charts when signals appear. Why consider this? Many trading patterns that perform reliably in stock markets often fail in crypto. For a comprehensive overview of modern trading strategies and how to automate trades on TradingView in today’s market environment, see my detailed guide “Trading Strategies: Classification Approach Based on Modern Market Realities.

In summary, you now know how to automate trades on TradingView without programming knowledge, server management, or third-party services. Always practice risk management, never risk more than 1-2% of your capital per trade, and remember that a trading bot only executes the algorithm you provide. Trust no one blindly; verify everything yourself, as you alone are responsible for your funds and trading results.

I wish you all the best, stable profits, and clean, beautiful trends.


Frequently Asked Questions (FAQ)

Do I need a paid TradingView subscription for automation?

Yes, you need at least the “Essential” subscription plan to create webhook alerts, which are necessary for sending automated trading signals to an exchange.

Can I use this method with any exchange?

This specific guide is tailored for exchanges like Binance that support direct Webhook signal trading. The availability and setup process may differ for other exchanges.

What is the main risk of using this automated method?

The primary risk is that the bot will execute all signals based on your strategy. If the strategy performs poorly in live market conditions (different from backtesting), it can lead to significant financial losses. There are also inherent risks like slippage and technical failures.

Why do I have to open the first position manually?

This particular strategy type (“Script_Algo – High Low Range MA Crossover”) is always in the market. The TradingView alert is triggered on a change of position (from Long to Short or vice-versa). Therefore, to sync the bot with the strategy’s initial state, you must manually open the first position it indicates.

Can I change the order size or leverage after the bot is running?

Yes, but you must stop the strategy, close position manually, and reconfigure the leverage and settings on your exchange’s webhook bot panel. The TradingView alert itself only sends the signal, not the specific order parameters.

What happens if my internet or TradingView goes down?

Once the TradingView alert is successfully created and activated, the signal processing is handled by TradingView’s servers. This means that even if your local device loses internet connection, the alert can still trigger and send the webhook to your exchange.

Leave a Comment