Skip to content

automated trading

I Changed My Pine Script, but the Alert Still Uses the Old Settings

You changed your Pine Script this morning. New EMA lengths, a smaller lot size, a tidier stop rule. Then the alert fired at lunchtime and did exactly what the old version would have done. Nothing is broken. TradingView alerts are designed to behave this way, and once you know why, the fix takes two minutes.

The short answer: a TradingView alert is a frozen copy of the script and its inputs, taken at the moment you created it. Edits to the chart afterwards never reach that copy. To run the new version, you delete the old alert and create a new one from the updated chart. This article explains the mechanism from TradingView's own documentation, shows how to tell which version an alert is using, and gives a short procedure for switching over without doubling up your orders.

It is written for anyone routing TradingView alerts to an MT5 terminal through a connector such as PineConnector. If your setup runs inside MT5 as an MQL5 Expert Advisor with no TradingView alerts involved, this problem does not apply to you, and the Pine Script on MT5 comparison is the better read.

Why the alert kept the old settings

TradingView's Pine Script FAQ is unambiguous. When you create an alert through the Create Alert dialog, that action "saves a 'snapshot' of the script, its inputs, and the current chart's context on TradingView's servers"[1]. The FAQ goes on: "This snapshot acts as an independent copy of the script instance and chart. Therefore, any changes to the script, its inputs, or the user's chart do not affect that created alert"[1].

TradingView's Help Center says the same thing in plainer words: "If you change an indicator's parameters after creating an alert, the alert will still trigger using the original settings"[2].

So the alert is not reading your chart. It is running its own private copy, on TradingView's servers, with the inputs and the message text you gave it on the day you clicked Create. The message text matters as much as the inputs. If your connector instruction was 60123456789,buy,EURUSD,vol_lots=1 when you created the alert, that is what the snapshot will keep sending, even after you changed the chart to trade half a lot.

Illustrative diagram: the chart now runs script version two, but the alert holds a frozen snapshot of version one and keeps firing on the old conditions and message. The fix is to delete and recreate the alert.

The documented fix is delete and recreate

The Pine Script FAQ gives one procedure: "To update an alert after making changes, delete the existing alert and create a new one"[1]. There is no button that pulls current settings into an existing alert. Editing an alert's name, expiry or notification options does not replace the snapshot of the script and inputs, so treat any change to logic, inputs or message text as a recreate.

That is inconvenient if you tune a strategy often, but it is also protective. A live alert cannot be silently altered by an accidental drag of an input slider. What you created is what runs, until you deliberately replace it.

How to tell which version an alert is running

You cannot open a snapshot and read its code, so work from evidence.

  1. Creation time. In the Alerts panel, each alert shows when it was created. If that time is before your last script edit, the alert is on the old version. This is the fastest check.
  2. Message text. Open the alert and read the message. If the connector instruction still shows the old lot size or symbol, the snapshot is old.
  3. The Alerts log. TradingView's Alerts log records each firing and the message it sent. Compare a recent entry against what your current chart would produce.
  4. The connector's signal log. PineConnector's Test Alert guide describes the portal Signals Log entry for a received alert: "This entry will have timestamps indicating when our server received the signal and when the PineConnector EA processed it"[3]. The received message is the proof of what TradingView actually sent. If it carries the old instruction, the problem is upstream of the connector, and no change at the terminal will fix it.

The upstream duplicate trap

Recreating alerts is where a second, quieter problem often starts. Traders create the new alert and forget the old one, or they have the same strategy on two charts, or on two timeframes, each with its own alert. Every one of those alerts fires independently and sends its own message to the webhook. From the connector's point of view they are separate, valid instructions, so two alerts can mean two orders.

This has nothing to do with TradingView's webhook retry behaviour or with the connector; it is simply more than one alert pointing at the same account. Before you recreate anything, list every alert that sends to your connector and know what each one is for. TradingView also throttles heavy alerting: "If more than 15 alerts occur within three minutes, the system automatically halts further alerts"[1], which is another reason to keep the set small and deliberate. A fuller treatment of duplicate mechanisms is in the post on why duplicate orders happen in trading automation.

A five-step switch-over

Step What to do How you know it worked
1. Inventory Open the Alerts panel and list every active alert that posts to your connector webhook. Note the chart, timeframe and message for each. You can account for every alert. None is a mystery.
2. Pause Stop the old alerts you intend to replace. Do not leave them running "just in case". The Alerts panel shows them inactive; the connector signal log stops receiving their messages.
3. Recreate On the updated chart, create the new alert. Re-enter the webhook URL and the connector message. Check the instruction text against the documented format: Licence ID, command, symbol, then parameters. The alert's creation time is after your last script edit.
4. Test on demo Point the licence at a demo connection first, or use a test alert as PineConnector's guide describes[3]. Confirm the received message in the Signals Log matches the new version. Received message shows the new symbol, size and command. Exactly one order appears on the demo account.
5. Re-enable Delete the paused old alerts rather than leaving them paused. Switch the new alert to the intended connection. One alert per intended signal. Nothing else in the panel posts to the webhook.

What hosting can and cannot do here

It is tempting to assume that a more reliable terminal would have caught this. It cannot. The alert snapshot lives on TradingView's servers. Whether your MT5 terminal runs on a laptop, a Windows VPS, or PineConnector Edge's managed MT5 hosting, the terminal receives whatever TradingView sends. An outdated alert sends an outdated instruction, and a perfectly healthy terminal executes it perfectly.

What hosting changes is the stages after the alert. With PineConnector Edge, PineConnector states that "We host and maintain MT5 and the PineConnector EA, so you do not need to keep your own computer or VPS running"[4]. The Bridge page in the portal lets you "send test signals and view their processing results, including the reported latency"[4], which is useful in step 4 above. Two current limits are worth knowing if you are diagnosing on Edge: "EA settings currently use a fixed default configuration and cannot be edited", and "Trading account data, including account balance, and the Experts and Journal logs are not yet available on the Edge page"[4]. Both are stated as early-access limitations, with customisation planned. For this particular problem neither matters, because the evidence you need is upstream, in TradingView's Alerts log and the connector's Signals Log.

If the received message in the Signals Log is correct and the trade is still wrong or missing, the problem is somewhere else in the chain. Work through the stage-by-stage diagnosis from that point.

Frequently asked questions

Can I edit the alert instead of recreating it?

You can edit an alert's name, expiry and notification settings, but TradingView's documented method for picking up script or input changes is to delete the alert and create a new one[1]. Assume that any change to logic, inputs or message text needs a fresh alert.

I only changed the alert message, not the script. Same rule?

The message is part of what you entered when you created the alert. To send a different message, create a new alert with the new text and remove the old one.

Why did I get two orders after updating?

The most common cause is that the old alert was left active alongside the new one, or the same strategy has alerts on more than one chart or timeframe. Each active alert sends its own message. Inventory and delete before you go live.

Does PineConnector Edge protect me from an outdated alert?

No. Managed MT5 hosting keeps the terminal running; it does not change what TradingView sends. The connector's Signals Log will show you the received message so you can prove where the mismatch is[3].

Next step: run the five-step switch-over on a demo connection, then follow the TradingView to MT5 setup guide if you are configuring the connection for the first time.

Reviewed 10 September 2026. Facts were checked against the linked sources on that date.

Sources

  1. TradingView – Pine Script documentation, FAQ: Alerts, accessed 10 September 2026.
  2. TradingView Help Center – Introduction to TradingView alerts, accessed 10 September 2026.
  3. PineConnector Docs – Test Alert, accessed 10 September 2026.
  4. PineConnector Docs – Edge Guide, accessed 10 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Start with Core

Launch price — standard pricing is $69/mo after the launch period.