Automation
TradingView Alerts: Order Fills vs alert() Calls Explained
Compare TradingView strategy emulator fill alerts and Pine alert() events, message templates, duplicates and broker reconciliation.
On this page+

TradingView strategy alerts can be triggered by simulated order fills, by calls to Pine Script's alert() function, or by both when the script and selected alert configuration support them. These events are not the same as confirmation that a real broker executed an order. This distinction is essential for an alert-to-broker workflow. A carefully designed message should convey what happened on the chart and what the receiving system is expected to do, without confusing a signal, a simulated fill and the actual position held in a brokerage account.
What a strategy order-fill alert represents
A Pine strategy generates simulated orders that TradingView's broker emulator processes under its model and strategy settings. When a simulated order fills in realtime, the corresponding alert can fire if the strategy alert includes fill events. This event reports the strategy's simulated execution, not an independent receipt from a real brokerage account. Entry, exit, close and other order-generating strategy functions may produce these events. The emulator's fill timing depends on its assumptions and settings, so the timestamp of an alert need not equal the moment a condition first became true.
What an alert() call represents
An alert() call runs when execution reaches that function in the script. The programmer defines the conditions and message. It can represent an entry signal, a warning or another event that does not necessarily create any simulated order. Depending on the script type, frequency selection and calculation settings, the event can occur during a developing bar or at a confirmed close. The fact that an alert() message contains a buy or sell label does not establish that a strategy order was placed. The intended meaning must be documented by the script author and understood by the receiver.
Why the timing of two events can differ
Imagine a fictional strategy that identifies a price condition when a candle closes, creates a simulated market order and also executes an alert() call. The signal alert may be generated at the condition, while the simulated fill can occur at a subsequent available emulator tick, according to strategy settings. A limit order might instead remain pending. If both alerts are selected, the same broad trading decision may generate different notifications at different times. A receiving workflow should not assume that the second notification is a new independent trade unless its message and state model explicitly establish that.
Custom messages and placeholders
Order-generating strategy functions can define an alert_message value to describe the particular simulated order. A strategy alert configured to use that value can include the strategy.order.alert_message placeholder surrounded by double curly braces in its message field. Other placeholders may describe the action, order price or quantity. The alert() function uses its own message argument and can construct a different payload. Review the script's documented message format rather than mixing examples from different event types. A valid-looking JSON object does not establish that each field has the intended meaning for the receiving broker workflow.
The alert snapshot and settings
When a TradingView alert is created, TradingView stores a snapshot of the relevant script and settings on its servers. Editing a chart or changing script inputs afterward should not be assumed to modify an existing alert. Review and recreate the alert when its intended configuration changes, following the platform's current instructions. Record the market, interval, script version and chosen event type so that a notification can be traced to its origin. An alert that appears to use the wrong settings may actually be operating from an older configuration rather than malfunctioning.
Avoid accidentally routing two transactions
Selecting both fill events and alert() calls can be useful for observation, but it can also produce multiple messages for a single intended decision. A receiving system needs a clear contract for which events are actionable and which are informational. Duplicate alert protection should not be confused with the rejection of legitimately distinct orders. Review the expected behaviour when an entry creates several order events, when an exit is partial, and when messages arrive out of sequence. Do not send a second order merely because a delayed notification appears to repeat an earlier instruction.
Broker acknowledgement is a separate state
After an alert arrives, the receiver may validate it, map the instrument, apply risk controls and submit an order. The broker may acknowledge, reject, partially fill or fully fill that order. A real position can differ from the chart if the order was rejected, delayed or filled at a different price. Reconcile against broker-reported orders and positions before deciding whether another instruction is necessary. A webhook delivery receipt, a simulated order-fill message and a broker fill are three different pieces of evidence. None should be silently substituted for the others in an operational dashboard.
A paper-testing matrix
Create test cases for a signal with no order, a simulated order that fills, a working limit order, an exit and a duplicated notification. Record the script event, alert message, receiving validation, requested order and actual paper broker result separately. Include the case where an alert is correct but the broker does not accept an order. Check session boundaries and the symbol mapping when using a continuous futures chart. Testing only a successful market entry leaves the most important disagreements unexamined. The paper environment itself can differ from live execution, so it is a workflow check rather than proof of fill quality.
Using strategy alerts with TradeLuma
TradeLuma provides automation and commercial strategy products and has a financial interest in those offerings. Use the documented alert format for the particular supported workflow, rather than assuming an arbitrary Pine script message is compatible. Confirm the broker, account mode, quantity policy, supported market and intended event type. Review the live order and position record when investigating discrepancies. This guide describes TradingView concepts, not a promise that every alert mechanism or combination is supported by every TradeLuma integration. The distinction between a simulated fill and a real fill remains important in every environment.
Frequently asked questions
Does an order-fill alert prove a live trade executed?+
No. It reports a simulated fill by the strategy's broker emulator.
Can alert() trigger without an order?+
Yes. Its condition and message are defined by the script.
Can both alert types fire?+
Yes, if the strategy supports both and the alert is configured accordingly.
Can a chart change update an existing alert?+
Do not assume so. Review the saved alert configuration and recreate it when needed.
Does alert frequency govern every simulated fill?+
No. Order-fill events and alert() call frequency are separate mechanisms.
What confirms actual execution?+
The real broker's order and fill records, reconciled with the intended transaction.
Execution workflow
See how controlled automation is structured.
Explore TradeLuma's execution flow, live and paper modes, broker controls, monitoring, and reconciliation.
See how TradeLuma works →Continue learning
Related guides.

Why TradingView Stops Sending Alerts: Understanding Alert Frequency Limits
Understand TradingView's 15-trigger-per-three-minute rule, watchlist limits, burst detection, debugging and safe order reconciliation before restarting automation.

Do You Need IBKR Real-Time Market Data for TradingView Automation?
Separate TradingView signal data, IBKR quote subscriptions, trading permissions and broker execution before automating orders.

Invalid Tick Size: Why Your Automated Futures Orders Get Rejected
Identify invalid futures price increments, round limit and stop prices intentionally, and troubleshoot rejected TradingView-to-broker orders.
