Skip to content

Guide / Checked Nov 2026

Why does my TradingView alert place duplicate orders?

Two orders from one alert usually mean TradingView fired twice. The common cause is an alert set to Once per bar instead of Once per bar close. Nyria drops an identical alert body repeated within 5 minutes with no other alert between. Within 30 seconds, an identical body is always dropped. The repeat answers 200 with status duplicate. A body that differs still trades, unless Allow multiple entries is off on the strategy.

Official documentation

Stop the double in six steps

  1. 1

    Read both logs

    Open TradingView's alert log and the strategy's Logs tab in Nyria. Two webhook hits a second apart mean TradingView sent two alerts.

  2. 2

    Set Once per bar close

    On an indicator alert, set Trigger to Once per bar close. Once per bar can fire twice in one bar and send conflicting orders.

  3. 3

    Delete the clone

    Open the Alert manager on the right toolbar. Delete any copy of the alert that points at the same strategy.

  4. 4

    Guard your alert() call

    If your Pine code calls alert() in a block that runs on every tick, wrap it in if barstate.isconfirmed.

  5. 5

    Check Allow multiple entries

    With it off, the strategy holds one position at a time and logs a second entry as already open. Turn it on only to scale in.

  6. 6

    Make scale-ins differ

    To enter twice on purpose, give each alert a unique metadata.message_id such as {{timenow}}. Identical bodies are dropped.

Messages to copy

Entry that scales in

{
  "ticker": "SPY",
  "action": "buy",
  "metadata": { "message_id": "{{timenow}}" }
}

How Nyria drops a repeat

  • An identical body within 30 seconds is dropped, every time.
  • Within 5 minutes it is dropped while it is still the strategy's latest alert.
  • With a metadata.message_id, Nyria compares that value instead of the body.
  • The repeat answers 200 with status duplicate. The Logs tab records it at most once every 5 minutes.
  • Duplicates are matched per strategy. Two strategies on one payload each place an order.

What Nyria does not drop

  • A body that differs in any field is a new alert, and it trades.
  • A body sent after a different alert, or after 5 minutes, is new.
  • Skip alert.freq_all in a reversal strategy. It fires on every tick and floods the webhook.

Questions

Why does my TradingView alert fire twice?
Most often the alert is set to Once per bar, which can fire twice in one bar. Set it to Once per bar close. Then open the Alert manager and delete any clone that points at the same strategy.
Does Nyria stop a duplicate webhook on its own?
Yes, when the body is identical. A repeat within 5 minutes with no other alert in between is dropped and answered 200 with status duplicate. Within 30 seconds, any identical body is dropped.
Can I scale into a position on purpose?
Yes. Turn on Allow multiple entries on the strategy and make each alert body different, for example with metadata.message_id set to {{timenow}}.
Why did two strategies both trade on one alert?
Duplicates are matched per strategy. Two strategies with the same payload each place their own order. Point one alert at one strategy.
What does it cost?
Paper is free. Live trading from $15 a month.

Next

Try a paper bot first

No card required. Paper is free. Live trading from $15 a month.