> ## Documentation Index
> Fetch the complete documentation index at: https://gocharting.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks for algo trading

> What a script controls in an alert that reaches an outside service, the message, and what the platform controls.

A script cannot address an outside service: Lipi has no webhook function, and no argument names an address. Where an alert goes
and how it is delivered is set on the platform when the alert is created.

What the script controls is the alert's message text:

* `alert(message)` takes a message built on the bar, so it can carry data such as a price.
* `alertcondition(condition, title, message)` takes a fixed message.

The message is the one part of the alert the script writes.

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("Signal message", overlay=true)
avg = talib.sma(close, 50)
if close > avg and close[1] <= avg[1] {
    alert("long " + str.tostring(close))
}
plot(avg, title="Average")
```

A strategy's orders are simulated and send nothing; `strategy.entry` and `strategy.exit` take no alert message. A strategy that must tell another system about a trade calls `alert` beside the order (example: [How to send a webhook when your condition fires](https://gocharting.com/docs/scripting/how-to/send-a-webhook-when-your-condition-fires.md)).

See [Alerts](https://gocharting.com/docs/scripting/automation/alerts.md) for where each function may be called and when it fires.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.