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..jpeg?fit=max&auto=format&n=_jmFS7Z_b1MEKLSl&q=85&s=25d3b545d13c7555a738ded6a94d818c)
Why Automate TradingView Indicators?
Manual trading often involves:- Constant chart monitoring
- Emotional decision-making
- Missed trading opportunities
- Delayed entries and exits
How TradingView Automation Works
The automation flow is simple: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
Step 1: Add Indicators to Your Chart
Open TradingView and:- Select your preferred trading pair (example: BTCUSDT)
- Choose your desired timeframe
- Add one or multiple indicators
- Supertrend
- RSI
- MACD
- EMA
- Bollinger Bands
- VWAP
- Community indicators
- Custom indicators
Step 2: Create a TradingView Alert
Once your indicators are added:- Right-click anywhere on the chart
- Click Add Alert
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:- Source = Price
- Condition = Crossing Above
- Target = Supertrend Downtrend Line
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. Example: If you only want to buy after a candle closes above the Supertrend line, use: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:Understanding Each JSON Parameter
Exchange
Specifies where the order should be executed. Examples:Price
Chart Symbol
Order Type
This field determines what action Mirrorpip should perform.Long Entry
Long Exit
Short Entry
Short Exit
Quantity
Fixed Quantity
Dollar-Based Quantity
Take Profit (TP)
Points-Based TP
Percentage-Based TP
Dollar-Based TP
Stop Loss (SL)
Points-Based SL
Percentage-Based SL
Dollar-Based SL
Trailing Stop Loss (TSL)
Mirrorpip also supports trailing stop loss. Examples:Step 7: Paste JSON into TradingView Message Box
After configuring the condition and trigger: Locate the Message section. Paste the complete Mirrorpip JSON. Example: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:Step 9: Create the Alert
After verifying:- Condition
- Trigger
- Expiration
- JSON Message
- Webhook URL
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
- Conditions change
- Trigger remains same
- Message remains same
- Webhook remains same