guide · Platforms & automation

TradingView Alerts and Webhooks: An Auditable Workflow

A TradingView alert observes a configured condition; a webhook sends its message to an external receiver. Delivery, validation, order acceptance and a broker fill are separate events that need separate evidence.

TradeCopier Editorial TeamPublished
Linked modular blocks illustrating account connections and automation dependencies
Editorial illustration. Examples and calculations below state their own assumptions.

Separate the stages of the workflow

A useful audit begins with distinct stages: input data arrives, a condition evaluates, an alert fires, a request is delivered, a receiver validates it, an order is submitted, a broker responds and fills change a position. One timestamp or a green delivery indicator cannot prove that every later stage succeeded.

TradingView describes alerts on data series, drawings, indicators and strategies. A webhook is one delivery mechanism for an alert message. The receiving system determines what that message means. A charting platform's ability to send a message does not establish that every broker, account or copier can interpret it as an order.

Before configuring anything operational, write down the exact receiver and its supported message contract. This guide supplies an educational workflow and a sample event format. It does not document a native TradeCopier webhook receiver or claim that TradeCopier can execute arbitrary TradingView strategies.

Freeze the condition and alert version

Record the symbol, exchange or broker feed, chart timeframe, session template, indicator settings and event frequency. A crossing on one provider's price series may not occur at the same time on another. A confirmed-bar condition is also different from one evaluated on every update of an unfinished bar.

TradingView's Pine documentation explains script alerts and their saved configuration. A running alert is not simply a permanent live link to whatever settings happen to be visible on a chart later. Keep a version identifier in the operating record and verify whether changing the script or inputs requires recreating the alert.

For an illustrative moving-average event, state whether a crossing requires the completed close. If the fast line moves above the slow line intrabar and falls back before close, the intrabar and confirmed-bar variants should report different events. Treat that as a design choice to test, not automatically a platform malfunction.

Understand the delivery contract

TradingView's current webhook documentation, checked September 19, 2026, describes an HTTP POST containing the alert message. Valid JSON is sent with an application/json content type; other text uses text/plain. The same page lists supported ports, a processing timeout, two-factor-authentication requirements and delivery-status information. Verify those current constraints when implementing a receiver.

The receiver should acknowledge according to that contract and perform durable processing in a way that does not confuse transport success with a completed trade. A timeout leaves an important ambiguity: processing may have begun even if the sender did not observe the response. Repeating a message blindly can create duplicate side effects.

Keep authentication and access controls aligned with the documented integration. TradingView advises against putting login credentials or passwords in webhook bodies. Do not assume a sample URL or message field supplies authentication by itself. Broker credentials belong in an appropriately controlled execution component, not in a shared screenshot or public chart script.

A sample event record, not an executable integration

{
  "schema_version": 1,
  "event_id": "demo-session-001-close-014",
  "strategy_version": "example-cross-v1",
  "symbol_reference": "DEMO",
  "event_time_utc": "2026-09-19T09:45:00Z",
  "condition": "confirmed_upward_cross",
  "mode": "record_only"
}

This deliberately fictional payload records an event and contains no broker credentials or trade instruction. Its field names are examples, not a schema accepted by any named service. The receiver's actual documented contract determines required fields, types, time formats and permitted actions.

An event identifier can support deduplication only if the receiver stores and checks it consistently. It must distinguish a retry of the same event from a genuinely new event. Reusing a constant ID for an entire day could suppress valid observations; generating a new random ID for every retry could defeat duplicate detection.

Versioning also prevents ambiguous replay. If a message recorded under one strategy definition is processed after the receiver changes behavior, the result may differ from the original intention. Preserve the schema and strategy versions with the decision record and reject unsupported versions rather than guessing.

Validate before translating into an order

A receiving system should check that the event is structurally valid, authorized, timely and consistent with its configured account context. A symbol label is not enough to identify a tradable contract. It may refer to a continuous futures chart, a different expiry, a CFD or a broker-specific alias.

Quantity also needs units. The number one might mean one contract, one lot, one underlying unit or one percent in different interfaces. A robust adapter has an explicit mapping and validates minimum, maximum and step constraints before submission. Unknown or ambiguous units should produce a recorded rejection rather than an improvised conversion.

Keep account-state rules equally clear. Decide what a buy event means when a long position already exists, a short position is open or a previous order is still pending. Add, close and reverse are different operations. The orders, deals and positions reference helps separate requested actions from actual executions.

Build an evidence chain for one hypothetical event

Imagine an event is evaluated at 09:45:00.000 UTC, logged as fired at 09:45:00.040, received at 09:45:00.180 and validated at 09:45:00.190. These are invented demonstration times, not TradeCopier or TradingView latency measurements. The purpose is to name the stages and clocks.

If the order is then rejected because its quantity is below the permitted minimum, the correct outcome is “delivered and rejected,” not “copied successfully.” If it is accepted and partially filled, the event is still not equivalent to the final requested position. Store accepted quantity, filled quantity, remaining quantity and broker identifiers.

Differences between timestamps should be interpreted only when clocks and timezones are trustworthy. Receiver time minus sender time combines actual delay with clock error. Measuring a platform's routing latency requires a separate documented methodology; an isolated alert-to-fill interval is not an independently verified benchmark.

Test failures before granting execution authority

Begin with record-only messages and inspect the full logs. Test malformed JSON, unknown symbols, stale timestamps, unsupported versions and repeated IDs. Confirm that invalid events produce useful reasons without exposing secrets in diagnostic output. A working happy-path request is not enough to establish reliable behavior.

Next, use a suitable simulation environment and deliberately exercise duplicate delivery, a receiver restart, an unavailable account and a rejected order. Verify whether pending work survives a restart and whether the system reconciles broker state before retrying. Automatic repetition is unsafe when the previous side effect is unknown.

Only compare results with the appropriate assumptions. Paper trading differs from live execution in liquidity, fill models and other conditions. A successful simulation demonstrates parts of the workflow, not a guarantee of live performance or permission to use a particular account arrangement.

Specify recovery decisions before a failure

Use a small decision table for operational ambiguity. If the receiver rejects an unknown schema version before submitting anything, the result is a validation failure. If it submits an instruction and loses the connection before receiving a reply, the result is an unknown submission state. Those outcomes need different recovery paths; treating both as ordinary failed messages can duplicate an order.

Illustrative recovery rules for a separately implemented receiver
Observed stateFirst useful checkAction to avoid
Invalid event before submissionInspect the recorded validation reasonGuessing missing units or account identifiers
Repeated event identifierRead the prior processing resultCreating a second side effect automatically
Submission response missingReconcile broker order and execution recordsAssuming no order exists
Late event after a restartApply the declared age and state policyExecuting a stale decision as if it were current

For an original simulation exercise, record an event, stop the receiver after it stores the event but before it processes the next stage, and then restart it. The expected result depends on the implementation, but it should be explainable from durable records. Repeat at the boundary after submission. A local “processed” flag cannot replace reconciliation when the external outcome is unknown.

Define what operators can change during recovery. Editing an old event's account or quantity and resubmitting it under the original identifier makes the history ambiguous. A corrected instruction should preserve the rejected original and carry a new, explicitly related record. This is a design principle for the proposed receiver, not a claim about automatic retry behavior supplied by TradingView or TradeCopier.

Keep separate counts of received events, accepted events, submitted instructions and resulting executions. One event may legitimately produce several execution records, while another produces a recorded rejection. Comparing those counts as though they must always be equal can hide a correct partial-fill workflow or misclassify a failed submission.

Investigate chart and alert disagreements

A final historical chart may differ from the values visible during an unfinished bar. TradingView documents repainting-related differences. Compare the original alert version, actual input series and decision timestamp before assuming that the receiver missed an event.

For a moving-average crossover, preserve the two numeric series at the decision time. For an execution discrepancy, compare order and fill records instead of recalculating the indicator from today's adjusted chart. These are separate investigations and need different evidence.

A completed operational review should answer four concrete questions: what condition fired, what message arrived, what authorized action was accepted and what position resulted? Use the slippage calculator only after choosing a valid reference price and actual fills. This makes the workflow auditable without mistaking a delivered notification for a successful or profitable trade.

Questions and answers

Does a delivered webhook prove that a trade executed?

No. It proves at most that the receiving endpoint accepted the request at the transport layer. Validation, order submission, broker acceptance, fills and final positions need their own records.

Does editing a chart automatically update a running script alert?

TradingView documents that a script alert uses a saved snapshot of its script and settings. Recreate or update alerts according to the current platform workflow and verify the active version explicitly.

Does this guide establish a TradeCopier TradingView webhook integration?

No. It explains a general alert workflow. Use a receiver and account connector only when its documented compatibility and permissions have been verified for the exact setup.

Sources and further checks

Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.

  1. TradingView: Configure webhook alerts · Checked September 19, 2026
  2. TradingView: Set up alerts · Checked September 19, 2026
  3. TradingView Pine Script: Alerts · Checked September 19, 2026
  4. TradingView: Repainting behavior · Checked September 19, 2026

Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.

Check the product workflow

Use these pages to check TradeCopier settings and connection requirements for your own setup.

Browse all resourcesCurrent resource: /learn/tradingview-alerts-webhooks

Start Copying Smarter Today

Join traders who trust TradeCopier for speed, reliability, and performance.

Get Started Free