How to Connect TradingView and Metatrader? – Send Alerts From TradingView to Mt4 & MT5

TradingView and MetaTrader stand out as the two most widely utilized platforms in online forex trading, each catering to a broad spectrum of traders’ needs. TradingView is renowned for its intuitive interface and robust charting tools, making it a favorite among traders who prioritize technical analysis and social trading features.

MetaTrader, encompassing both MetaTrader 4 (MT4) and MetaTrader 5 (MT5), is highly regarded for its advanced trading functionalities, including automated trading capabilities through Expert Advisors (EAs) and comprehensive analysis tools. These platforms offer distinct advantages, from TradingView’s collaborative environment and superior graphical tools to MetaTrader’s algorithmic trading support and broad broker compatibility, making them tools for forex traders worldwide.

How to Connect TradingView and Metatrader?

To connect TradingView and MetaTrader and have the ability to send alerts and signals from TradingView to Mt4 or MT5, you can use Pineconnector or Tradingview to app.

Connect TradingView to MetaTrader:

Please watch my video about this topic:


Connecting TradingView with MetaTrader (MT4 or MT5) involves a few steps that bridge the gap between TradingView’s advanced charting capabilities and MetaTrader’s robust trading execution features.

The process starts by downloading a specialized Expert Advisor (EA) for either MT4 or MT5, depending on the version of MetaTrader you are using. This EA acts as a link between the two platforms. You must obtain a license code from the provider’s website to initiate the connection. The provider typically offers a 7-day trial period free of charge, allowing you to test the service before committing financially.

Once you have the EA and license code, the next step is to set up TradingView to send signals to MetaTrader. This involves creating a trading alert on TradingView, within which you’ll need to include the license code. Additionally, you must specify a Webhook URL; for instance, “” directs the alert signals to the EA running on MetaTrader.

On the MetaTrader side, you activate the downloaded EA on the chart of the instrument you wish to trade and input the license code into the EA’s settings. This completes the bridge, and now, when you set alerts on TradingView using the specified format and webhook URL, those alerts will trigger trades or notifications in your MetaTrader platform, leveraging the strengths of both platforms for a more comprehensive trading strategy.

download ea pineconnector

After you download EAs and install them into the Expert Advisor folder, you can activate the following:

pineconnector licence metatrader settings

To configure the PineConnector EA’s settings, you must follow a structured approach to bridge your TradingView alerts effectively with the MetaTrader platform. Here’s a breakdown of the critical settings and options:

  1. License ID: Begin by inputting your License ID, obtained from the Licensing Dashboard, into the PineConnector EA. This unique identifier, typically starting with a ‘6’, connects the EA to the PineConnector server, enabling it to process your TradingView alerts.
  2. Syntax Settings – Target Type: Choose how your stop loss (sl=) and take profit (tp=) targets are calculated. You can select from three options: Pips, Price, or Percentage. Each option adjusts your targets differently based on the asset being traded and its current market price.
  3. Syntax Settings – Volume Type (risk=): This setting determines how your trade volume is computed. Options include specifying the volume in Lots, as a Dollar Amount, or as a Percentage of Balance in various forms. This affects how much of your balance is risked on each trade.
  4. Pending Order Entry (price=): Configure how the entry price for pending orders is determined, with options for Positive Only, Pips from Current Market Price, Specified Price from TradingView Alert, or Percentage from Current Market Price. This setting is crucial for executing trades at your intended entry points.
  5. Account Filter (accfilter=): Set conditions under which your signals are processed based on account metrics like Balance, Equity, Free Margin, or Margin Percentage. This ensures trades are only executed when certain financial conditions are met in your trading account.
  6. EA Input: Your SL and TP will be calculated based on the Target Type option selected, and the Risk calculation will be based on the Volume Type chosen. This customization allows for precise management of risk and reward parameters for each trade.
  7. General Settings: Includes options for pyramiding (handling multiple orders), closing on the reverse (how opposite signals are treated), shadow targets (hiding your SL and TP targets), and settings for managing position sizes and open trades.
  8. Dashboard: If you are not subscribed and wish to access the free dashboard, use “1001” as the License ID. This dashboard provides insights into trading performance and allows for further customization of how profit is computed, including commission, taxes, and swaps considerations.
  9. Account Settings: For capital management, especially relevant for prop firm traders, settings for Daily Loss, Daily Profit, Cumulative Profit, and Cumulative Loss help safeguard your capital by setting thresholds for profit-taking and loss-stopping.
  10. Miscellaneous Settings: Adjust EA’s operation based on specific needs, like EA Magic Number for running multiple strategies, Magic Restriction for determining how trades are managed, and custom settings for EA active hours and symbol prefixes or suffixes.

These detailed configurations ensure that traders can tailor the PineConnector EA to fit their specific trading strategy, risk management practices, and execution preferences, bridging the analytical power of TradingView with the trading capabilities of MetaTrader.

send alert using webhook at Tradingview

So you need to enter these values :



alert on tradingview

In practice, here is how you can send an alert :



screenshot how to send alert using tradingview to MT4 or Mt5

The first long number is the license ID; the rest are alert message content.


To seamlessly integrate TradingView’s analytical tools with MetaTrader’s execution capabilities, traders must first download a specific Expert Advisor (EA) for either MetaTrader 4 or MetaTrader 5 and obtain a license code, often available with a trial period. After installation, configure TradingView alerts to include the license code and set a designated Webhook URL to communicate with the MetaTrader platform.

Within MetaTrader, activate the EA and enter the license code in its settings, ensuring it’s ready to receive and execute trades based on TradingView alerts. This setup enables the automatic execution of trades on MT4 or MT5 based on customized alerts from TradingView, marrying the strengths of both platforms for enhanced trading strategies.



Igor has been a trader since 2007. Currently, Igor works for several prop trading companies. He is an expert in financial niche, long-term trading, and weekly technical levels. The primary field of Igor's research is the application of machine learning in algorithmic trading. Education: Computer Engineering and Ph.D. in machine learning. Igor regularly publishes trading-related videos on the Fxigor Youtube channel. To contact Igor write on:

Trade gold and silver. Visit the broker's page and start trading high liquidity spot metals - the most traded instruments in the world.

Trade Gold & Silver


Recent Posts