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

# Indicator Automation

> Learn to automate any tradingview indicator without coding

# How to Automate Any TradingView Indicator Using Mirrorpip

TradingView is one of the most powerful charting platforms in the world, offering access to over **150,000+ indicators and strategies** built by TradingView developers as well as its massive community of traders.

Whether you're using **Supertrend**, **RSI**, **Moving Averages**, **MACD**, **Bollinger Bands**, or a custom community indicator, Mirrorpip allows you to automate trade execution directly on supported exchanges using TradingView alerts and webhooks.

This guide will walk you through the complete process of converting any TradingView indicator into a fully automated trading bot using Mirrorpip.

<Frame>
  <img src="https://mintcdn.com/mirrorpippvtltd/_jmFS7Z_b1MEKLSl/images/WhatsApp-Image-2025-09-25-at-13.44.53-(1).jpeg?fit=max&auto=format&n=_jmFS7Z_b1MEKLSl&q=85&s=25d3b545d13c7555a738ded6a94d818c" alt="Whats App Image 2025 09 25 At 13 44 53 (1)" width="1600" height="900" data-path="images/WhatsApp-Image-2025-09-25-at-13.44.53-(1).jpeg" />
</Frame>

***

## Why Automate TradingView Indicators?

Manual trading often involves:

* Constant chart monitoring
* Emotional decision-making
* Missed trading opportunities
* Delayed entries and exits

By automating TradingView indicators with Mirrorpip, you can:

✅ Execute trades automatically

✅ Trade 24x7 without monitoring charts

✅ Remove emotional bias

✅ Connect to multiple exchanges

✅ Automate both long and short strategies

✅ Add Stop Loss, Take Profit, and Trailing Stop Loss

***

# How TradingView Automation Works

The automation flow is simple:

```text theme={null}
TradingView Indicator
        ↓
TradingView Alert
        ↓
Webhook
        ↓
Mirrorpip
        ↓
Your Exchange Account
        ↓
Trade Executed
```

Whenever your indicator generates a signal, TradingView sends an alert to Mirrorpip using a webhook. Mirrorpip then executes the trade on your connected exchange account.

***

# Example: Automating the Supertrend Indicator

Let's take the popular Supertrend indicator as an example.

Suppose you want:

* Buy when price crosses above the Supertrend downtrend line
* Exit when price crosses below the Supertrend uptrend line

This can be fully automated using TradingView alerts.

***

# Step 1: Add Indicators to Your Chart

Open TradingView and:

1. Select your preferred trading pair (example: BTCUSDT)
2. Choose your desired timeframe
3. Add one or multiple indicators

Examples:

* Supertrend
* RSI
* MACD
* EMA
* Bollinger Bands
* VWAP
* Community indicators
* Custom indicators

You can combine multiple indicators to create sophisticated trading conditions.

***

# Step 2: Create a TradingView Alert

Once your indicators are added:

1. Right-click anywhere on the chart
2. Click **Add Alert**

TradingView will open the alert creation window.

***

# Step 3: Configure Alert Conditions

The first section is called **Condition**.

TradingView provides three dropdown boxes that allow you to create custom entry and exit logic.

### Example: Supertrend Buy Signal

If you want to buy when price crosses above the Supertrend downtrend line:

```text theme={null}
Price
Crossing Above
Supertrend | Downtrend
```

This means:

* Source = Price
* Condition = Crossing Above
* Target = Supertrend Downtrend Line

Whenever this condition becomes true, TradingView will generate an alert.

***

# Step 4: Configure Trigger Settings

The next section is **Trigger**.

TradingView allows multiple trigger options:

### Once

Alert triggers only one time.

### Once Per Bar

Triggers whenever the condition becomes true during the candle.

### Once Per Minute

Checks and triggers every minute.

### Once Per Bar Close

Triggers only after the candle has closed.

<Tip>
  **Recommended Setting :For most indicator-based strategies: once per bar close**<br />This avoids false signals that may disappear before candle close.
</Tip>

Example:

If you only want to buy after a candle closes above the Supertrend line, use:

```text theme={null}
Once Per Bar Close
```

***

# Step 5: Configure Alert Expiration

The next setting is **Expiration**.

This determines how long TradingView should keep the alert active.

Options include:

* 1 Day
* 1 Week
* 1 Month
* Custom Date
* Infinite (available depending on your TradingView plan)

### Recommended

Set an expiration period that matches your trading strategy requirements.

If you plan to automate indefinitely, use the maximum available expiration period.

***

# Step 6: Generate Mirrorpip TradingView Alert JSON

This is the most important step.

Mirrorpip executes trades using a JSON payload received from TradingView.

To obtain your TradingView automation JSON:

Navigate to:

```text theme={null}
Mirrorpip
→ Profile
→ TradingView Automation Bot
→ Copy TradingView Conditional Alert Data
```

You will receive a JSON similar to this:

```json theme={null}
[
  {
    "exchange": "coinswitch",
    "price": "{{close}}",
    "chart_symbol": "{{ticker}}",
    "order_type": "buy",
    "instrument_type": "NA",
    "quantity": "100",
    "tp": "20",
    "sl": "10",
    "code": "68ZFGQ6S5ZA507N0"
  }
]
```

Copy this entire JSON and paste it into the TradingView **Message** field.

***

# Understanding Each JSON Parameter

## Exchange

Specifies where the order should be executed.

Examples:

```json theme={null}
"exchange":"delta"
```

```json theme={null}
"exchange":"coinswitch"
```

```json theme={null}
"exchange":"bybit"
```

***

## Price

```json theme={null}
"price":"{{close}}"
```

TradingView automatically replaces this with the latest candle close price.

***

## Chart Symbol

```json theme={null}
"chart_symbol":"{{ticker}}"
```

TradingView automatically sends the chart symbol.

Example:

```text theme={null}
BTCUSDT
ETHUSDT
SOLUSDT
```

***

## Order Type

This field determines what action Mirrorpip should perform.

### Long Entry

```json theme={null}
"order_type":"buy"
```

### Long Exit

```json theme={null}
"order_type":"sell"
```

### Short Entry

```json theme={null}
"order_type":"short"
```

### Short Exit

```json theme={null}
"order_type":"cover"
```

| Action      | Order Type |
| :---------- | :--------- |
| Buy Long    | buy        |
| Exit Long   | sell       |
| Enter Short | short      |
| Exit Short  | cover      |

***

## Quantity

### Fixed Quantity

```json theme={null}
"quantity":"100"
```

This means:

```text theme={null}
100 Lots
```

***

### Dollar-Based Quantity

```json theme={null}
"quantity":"100$"
```

This means:

```text theme={null}
Take position worth $100
```

Mirrorpip automatically calculates the required quantity.

***

## Take Profit (TP)

### Points-Based TP

```json theme={null}
"tp":"20"
```

Take profit at 20 points.

***

### Percentage-Based TP

```json theme={null}
"tp":"20%"
```

Take profit at 20%.

***

### Dollar-Based TP

```json theme={null}
"tp":"20$"
```

Take profit when profit reaches \$20.

***

## Stop Loss (SL)

### Points-Based SL

```json theme={null}
"sl":"10"
```

***

### Percentage-Based SL

```json theme={null}
"sl":"10%"
```

***

### Dollar-Based SL

```json theme={null}
"sl":"10$"
```

***

## Trailing Stop Loss (TSL)

Mirrorpip also supports trailing stop loss.

Examples:

```json theme={null}
"tsl":"5"
```

```json theme={null}
"tsl":"5%"
```

```json theme={null}
"tsl":"5$"
```

***

# Step 7: Paste JSON into TradingView Message Box

After configuring the condition and trigger:

Locate the **Message** section.

Paste the complete Mirrorpip JSON.

Example:

```json theme={null}
[
  {
    "exchange": "coinswitch",
    "price": "{{close}}",
    "chart_symbol": "{{ticker}}",
    "order_type": "buy",
    "instrument_type": "NA",
    "quantity": "100",
    "tp": "20",
    "sl": "10",
    "code": "68ZMEQAS5ZA507N0"
  }
]
```

This message tells Mirrorpip exactly what action to perform when the alert triggers.

***

# Step 8: Configure Webhook URL

This is where most users complete the automation process.

## Important

Webhook support requires a paid TradingView subscription.

Without webhooks, TradingView can generate alerts but cannot send them to Mirrorpip automatically.

Enable:

```text theme={null}
Webhook URL
```

And enter:

```text theme={null}
https://trade.mirrorpip.com/tradingview
```

Whenever the alert triggers:

```text theme={null}
TradingView
→ Sends JSON
→ Mirrorpip Receives Signal
→ Mirrorpip Executes Trade
```

Automatically and instantly.

***

# Step 9: Create the Alert

After verifying:

* Condition
* Trigger
* Expiration
* JSON Message
* Webhook URL

Click:

```text theme={null}
Create Alert
```

Your TradingView automation bot is now live.

***

# Using Multiple Indicators

One of TradingView's biggest strengths is combining multiple indicators.

Examples:

### Supertrend + RSI

Buy only when:

* Supertrend turns bullish
* RSI is above 50

***

### EMA + MACD

Buy only when:

* EMA crossover occurs
* MACD confirms momentum

***

### Multi-Timeframe Confirmation

Buy only when:

* 15 Minute Supertrend = Bullish
* 1 Hour EMA Trend = Bullish

TradingView's condition builder allows advanced combinations while Mirrorpip handles trade execution.

The setup process remains identical:

* Conditions change
* Trigger remains same
* Message remains same
* Webhook remains same

***

# Important Requirement: Add Symbols to Mirrorpip Watchlist

Before automation can execute trades, the symbol must exist inside your Mirrorpip Watchlist.

Example:

If your TradingView chart is:

```text theme={null}
BTCUSDT
```

Then BTCUSDT must also be added to your Mirrorpip Watchlist.

### If the symbol is not present:

❌ Alert will trigger

❌ Webhook will be received

❌ Order will NOT be executed

Always verify that the trading symbol is available in your Mirrorpip Watchlist before activating automation.

***

# Common Mistakes to Avoid

### Incorrect JSON Format

Even a small JSON error can prevent execution.

Always copy the JSON directly from Mirrorpip.

***

### Wrong Order Type

Using:

```json theme={null}
"buy"
```

instead of

```json theme={null}
"short"
```

can create the opposite trade.

Double-check your order types.

***

### Missing Webhook URL

Without the webhook:

```text theme={null}
TradingView → Mirrorpip
```

communication cannot happen.

***

### Symbol Not in Watchlist

The symbol must exist in Mirrorpip before automation can execute.

***

### Trigger Type Not Set Correctly

If you want candle confirmation, use:

```text theme={null}
Once Per Bar Close
```

instead of:

```text theme={null}
Once Per Bar
```

***

# Final Thoughts

Mirrorpip enables traders to automate virtually any TradingView indicator, whether it's a built-in indicator, a community-created strategy, or a custom trading setup.

With access to over 150,000+ indicators on TradingView and Mirrorpip's powerful webhook automation engine, you can transform any indicator signal into a fully automated trading system that executes directly on your preferred exchange.

From simple Supertrend strategies to advanced multi-indicator and multi-timeframe systems, the workflow remains the same:

**Indicator → Alert → Webhook → Mirrorpip → Exchange → Automated Trade**

Once configured correctly, your strategy can operate 24x7 without manual intervention, helping you execute trades faster, eliminate emotional decision-making, and scale your trading operations efficiently.
