# Alerts

## Alerts — Trader's Guide (EN)

> **mrD-RSI Pullback** — How to set up **alerts** so you never miss a signal, even when away from the chart, and how to connect **webhooks** for auto-trading bots.

***

`🟢 BUY Pullback: BTCUSDT`\
`📊 Timeframe: 60`\
`💰 Entry Price: $50,000.00`\
`📈 RSI: 42.50`\
`🎯 Support (Band): $49,500.00`\
`📉 Low 14: $49,200.00`

### 1. What is the Alerts system?

Alerts let TradingView **automatically notify you** when a signal fires, via:

* **Push notification** on TradingView app (mobile/desktop)
* **Email** to your registered address
* **SMS** (depending on TradingView plan)
* **Webhook** — POSTs a request to your URL (for auto-trading bots, Discord/Telegram bots, custom systems)
* **Sound** in browser

> **Benefit:** No need to sit at the chart all day — let alerts run, you'll be notified the moment a signal appears.

***

### 2. 6 built-in Alert modes

The system offers **6 alert modes** — pick one based on need:

| Alert Mode                     | Fires when?                                                   | For                                |
| ------------------------------ | ------------------------------------------------------------- | ---------------------------------- |
| **None**                       | Disabled completely                                           | Traders who only watch live charts |
| **All**                        | Any signal (Pullback + Advanced + Trend Change + Trend State) | Traders who want to MISS NOTHING   |
| **Buy/Sell Pullback**          | Standard Pullback BUY/SELL fires                              | Standard pullback traders          |
| **Buy/Sell Advanced Pullback** | Advanced Pullback only (multi-TF)                             | High-quality traders               |
| **Trend Change**               | RSI Band cloud flips color (trend reversal)                   | Regime / position traders          |
| **Trend State**                | RSI state changes (3/2/1/0/-1/-2/-3)                          | Momentum-state readers             |

> **Default recommendation:** Pick the **mode matching what you trade**. E.g. trading standard Pullback → choose `Buy/Sell Pullback`. Avoid `All` — it's noisy.

***

### 3. Enable alerts in the indicator

#### Step 1 — Open Indicator Settings

Click the gear (⚙️) next to the indicator name.

#### Step 2 — Find group "ANY ALERT() FUNCTION CALL CONDITIONS"

It's at the bottom of the input panel.

#### Step 3 — Choose **Signals Alerts Type**

Dropdown — pick one of the 6 modes from section 2.

#### Step 4 — Save settings

Close the panel — settings auto-save.

> **Note:** Steps 1-4 only **enable trigger conditions** in code. To make TradingView actually notify you, do the next section.

***

### 4. Create an Alert in TradingView

After enabling the mode in the indicator, **you must create 1 alert** in TradingView to receive notifications:

#### Step 1 — Click "Alert" in TradingView

* Desktop: 🔔 button on the toolbar
* Or shortcut: `Alt + A`

#### Step 2 — Choose Condition

* **Condition** dropdown → choose `mrD-RSI Pullback`
* **Sub-condition** → choose `Any alert() function call`

> **Important:** Must be `Any alert() function call`, NOT other conditions in the dropdown.

#### Step 3 — Choose Trigger

* `Once Per Bar Close` (default, recommended) — fires only at bar close → no spam, no repaint

#### Step 4 — Choose notification channel

* **Notify on app** — mobile push (need TradingView app)
* **Send email** — receive email
* **Webhook URL** — connect auto-trading bot (see section 6)
* **Play sound** — browser sound

#### Step 5 — Set Alert Name

Use a memorable name, e.g. `BTCUSDT 1H Pullback`.

#### Step 6 — Click "Create"

Alert is active. Whenever a signal fires → you get notified.

***

### 5. Additional alertcondition() — Trend Bands

Beyond the 6 modes above, the indicator provides **2 dedicated alertcondition()** for **Trend Bands**:

#### A) Trend Bands: Bullish 🟢

Fires when RSI Band cloud flips from red → green (bullish trend start).

#### B) Trend Bands: Bearish 🔴

Fires when RSI Band cloud flips from green → red (bearish trend start).

**Usage:**

* Create alert as usual, in "Sub-condition" → choose one of these instead of `Any alert() function call`
* Each condition needs its own alert if you want both

> **When to use:** When you only care about big trend reversals (cloud flip), not Pullback signals.

***

### 6. Webhook integration (for auto-trading bots)

#### What is a webhook?

A webhook = TradingView sends a **POST request** with JSON to your URL when an alert fires. Your URL receives the message → bot processes → places trade automatically.

#### Step 1 — Get a webhook URL

* **Self-hosted:** Run a server (Node.js, Python Flask, ...) accepting POST
* **Use a service:** 3Commas, Cornix, Wundertrading, Pinescript-Webhook, ...

#### Step 2 — In "Create Alert" dialog

* Tick **"Webhook URL"**
* Paste your webhook URL
* In **"Message"**, write JSON in the format your bot expects, e.g.:

```json
{
  "ticker": "{{ticker}}",
  "action": "buy",
  "price": "{{close}}",
  "interval": "{{interval}}",
  "timestamp": "{{timenow}}"
}
```

#### Step 3 — Test the webhook

* Save alert
* Wait for a real fire, or use TradingView's test (if available)
* Check your webhook server log for the received message

***

### 7. Tips for using Alerts effectively

#### 🎯 Tip 1 — 1 alert / 1 ticker / 1 mode

Don't create one "All Signals" alert for 10 tickers → flood. Create **separate alerts** for each `(ticker, mode)` pair.

#### 🎯 Tip 2 — Once Per Bar Close is the golden default

Never pick "Once Per Bar" or "Realtime" for this indicator — you'll be spammed every tick. **Once Per Bar Close** = fires only at bar close.

#### 🎯 Tip 3 — Different setup for different style

| Style            | Recommended mode             |
| ---------------- | ---------------------------- |
| Day-trade        | `Buy/Sell Pullback`          |
| Swing            | `Buy/Sell Advanced Pullback` |
| Position / DCA   | `Trend Change`               |
| Reading momentum | `Trend State`                |

#### 🎯 Tip 4 — Combo with other indicators

Create multiple alerts simultaneously:

* Alert 1 (Pullback) → fires on entry signal
* Alert 2 (Trend Change) → fires when cloud flips → exit everything

→ You get both entry and exit signals.

#### 🎯 Tip 5 — Test alerts before trusting

Before letting alerts run "for real", create one on a chart you're watching live → wait for one fire → confirm notifications arrive correctly.

#### 🎯 Tip 6 — Different sound per asset

If you trade many assets, set different sounds per alert → instantly know which asset fired without opening the chart.

#### 🎯 Tip 7 — Webhook security 2FA

If a webhook connects to a real-trade bot, **secure the URL** (HTTPS, secret token, IP whitelist). If leaked → others can spoof signals → bot trades wrong.

#### 🎯 Tip 8 — Setup alerts for both Pullback + Trend Change

Common workflow:

* Alert mode `Buy/Sell Pullback` → entry signals
* Alert mode `Trend Change` (alertcondition Bullish/Bearish) → exit signals when trend flips

→ Ensures you never "diamond hand" a reversed trend.

***

### 8. Alert message format

When alerts fire, the message is detailed:

#### Buy/Sell Pullback

```
🟢 BUY Pullback: BTCUSDT
📊 Timeframe: 60
💰 Entry Price: $50,000.00
📈 RSI: 42.50
🎯 Support (Band): $49,500.00
📉 Low 14: $49,200.00
https://mrd-indicators.com/
```

#### Buy/Sell Advanced Pullback

```
🟢 BUY Advanced Pullback: BTCUSDT
📊 Timeframe: 60 + 240
💰 Entry Price: $50,000.00
📈 RSI Current: 42.50
📈 RSI HTF: 48.00
🎯 Support (Band): $49,500.00
📉 Low 14: $49,200.00
https://mrd-indicators.com/
```

#### Trend Change

```
🟢 BULLISH Trend Change: BTCUSDT
📊 Timeframe: 60
📈 Trend: Bearish → Bullish
💰 Price: $50,000.00
🎯 Support (Band): $49,500.00
https://mrd-indicators.com/
```

#### Trend State

```
STRONG BULLISH State: BTCUSDT
 Timeframe: 60
 RSI: 72.50
 Open: $49,800.00
https://mrd-indicators.com/
```

→ Has all the info needed for bot/manual entry.

***

### 9. Common mistakes with Alerts

| Mistake                                   | Fix                                            |
| ----------------------------------------- | ---------------------------------------------- |
| Picking "All" for every asset             | Notification flood — pick a specific mode      |
| Setting "Realtime" instead of "Bar Close" | Tick spam — always Bar Close                   |
| Creating 50 alerts then forgetting        | Manage periodically, delete unused             |
| Forgetting to reset expired alerts        | Free TradingView alerts last 2 months — re-set |
| Public webhook URL                        | Hackers spoof → bot loses money                |

***

### 10. FAQ

#### Q: Maximum number of alerts?

**A:** Depends on TradingView plan:

* Free: 1 active alert
* Pro: 20
* Pro+: 100
* Premium: 400

→ Trading many assets, you need at least Pro+.

#### Q: Do alerts expire?

**A:** Yes. Free/Pro alerts last max 2 months. Then auto-expire. Reset or use Premium (forever).

#### Q: How long is the webhook delay?

**A:** Usually < 1 sec from bar close. Sometimes 5-10s lag during busy times. Don't build strategies dependent on micro-latency.

#### Q: Can I auto-trade without a webhook?

**A:** Some services (like Coinrule, AltSignals) integrate directly with TradingView via API. But webhooks are most universal.

#### Q: Do alerts repaint?

**A:** No. The indicator uses `barstate.isconfirmed` for most signals → alerts only fire on closed bars → never "vanish" after firing.

***

> **Mantra:** "Right alert = no missed signals. Wrong alert = flood. Smart alert = sleep well, trade well."


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mrd-indicators.com/feature/tradingview-indicators/mrd-rsi-pullback-eng/alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
