Skip to main content

What is the TradingView Message Field? Complete Guide to TradingView Alert Messages

When creating an alert in TradingView, one of the most important sections is the Message field. Many traders ignore this section because TradingView alerts work perfectly fine without it when sending email or app notifications. However, if you want to automate trading through Mirrorpip, the Message field becomes the most important part of the entire setup. Without a properly configured message, Mirrorpip cannot understand what trade needs to be executed. In this guide, we’ll explain exactly what the TradingView Message field is, why it’s important, how Mirrorpip uses it, and how to correctly configure it for automated trading.

What is the TradingView Message Field?

The Message field is a text box inside TradingView’s alert creation window. Whenever an alert triggers, TradingView sends the contents of this message along with the alert notification. Think of the message as a set of instructions. Instead of simply saying:
Buy Signal Generated
the message can contain detailed information such as:
  • Which exchange to trade on
  • Which symbol to trade
  • Whether to buy or sell
  • Position size
  • Stop Loss
  • Take Profit
  • User identification code
This information allows external platforms like Mirrorpip to understand exactly what action should be taken.

Where is the Message Field Located?

When creating a TradingView alert:
  1. Right-click on the chart
  2. Click Add Alert
  3. Configure your conditions
  4. Configure your trigger settings
You will then see a section called:
Message
This text box allows you to enter custom data that will be sent whenever the alert triggers.

Why is the Message Field Important?

For normal alerts: The message is optional. Example:
BTC crossed above 50 EMA
TradingView will simply send this notification to your email or mobile app.
For automated trading: The message is mandatory. Mirrorpip relies entirely on the message content to understand:
What trade to execute
Where to execute it
How much quantity to trade
Which user generated the signal
Without a proper message, Mirrorpip cannot place any orders.

Think of the Message as a Trade Instruction Sheet

Imagine a trader calls a broker and says:
Buy something.
The broker would immediately ask:
  • What should I buy?
  • How much should I buy?
  • Which market?
  • At what conditions?
The same applies to automation. Mirrorpip needs detailed instructions. The TradingView Message field provides those instructions.

How Mirrorpip Uses the Message Field

When an alert triggers:
TradingView Indicator

TradingView Alert

Message

Webhook

Mirrorpip

Exchange
Mirrorpip reads the contents of the message and converts it into an actual trade.

What Format Does Mirrorpip Use?

Mirrorpip uses JSON format. JSON (JavaScript Object Notation) is a structured way of sending information between systems. A typical Mirrorpip TradingView message looks like this:
[
  {
    "exchange": "coinswitch",
    "price": "{{close}}",
    "chart_symbol": "{{ticker}}",
    "order_type": "buy",
    "instrument_type": "NA",
    "quantity": "100",
    "tp": "20",
    "sl": "10",
    "code": "68ZMEQ6S5ZA507N0"
  }
]
This entire JSON must be pasted inside the TradingView Message field.

How to Get Your TradingView Message from Mirrorpip

Mirrorpip automatically generates the correct JSON for you. Navigate to:
Mirrorpip
→ Profile
→ TradingView Automation Bot
→ Copy TradingView Conditional Alert Data
Copy the generated JSON and paste it directly into the TradingView Message box. This eliminates formatting errors and ensures compatibility.

Understanding Each Field in the Message

Let’s break down every parameter.

Exchange

"exchange":"coinswitch"
Specifies where the trade should be executed. Examples:
"exchange":"delta"
"exchange":"bybit"
"exchange":"coinswitch"
Mirrorpip sends the order to the specified exchange.

Price

"price":"{{close}}"
TradingView automatically replaces this variable with the latest candle close price. Example:
64250.50

Chart Symbol

"chart_symbol":"{{ticker}}"
TradingView automatically inserts the chart symbol. Example:
BTCUSDT
ETHUSDT
SOLUSDT
This tells Mirrorpip which asset to trade.

Order Type

The order type determines the trading action.

Buy

"order_type":"buy"
Opens a long position.

Sell

"order_type":"sell"
Closes a long position.

Short

"order_type":"short"
Opens a short position.

Cover

"order_type":"cover"
Closes a short position.

Quantity

Quantity determines position size.

Fixed Lots

"quantity":"100"
This means:
100 Lots

Dollar-Based Position Sizing

"quantity":"100$"
This means:
Open a position worth $100
Mirrorpip automatically calculates the required quantity.

Take Profit (TP)

You can define take profit directly inside the message.

Points

"tp":"20"

Percentage

"tp":"20%"

Dollar Profit

"tp":"20$"

Stop Loss (SL)

Similarly:

Points

"sl":"10"

Percentage

"sl":"10%"

Dollar Risk

"sl":"10$"

Trailing Stop Loss (TSL)

Mirrorpip also supports trailing stop losses. Examples:
"tsl":"5"
"tsl":"5%"
"tsl":"5$"

What are TradingView Variables?

TradingView supports dynamic variables inside the Message field. Instead of sending fixed values, TradingView automatically replaces them when the alert triggers. Example:
"price":"{{close}}"
When triggered:
"price":"64250.50"

Another example:
"chart_symbol":"{{ticker}}"
When triggered:
"chart_symbol":"BTCUSDT"
These variables allow one alert template to work across different symbols and price levels.

Example: Supertrend Buy Signal

Suppose you create a Supertrend Buy Alert. Condition:
Price Crossing Above
Supertrend Downtrend
Message:
[
  {
    "exchange":"coinswitch",
    "price":"{{close}}",
    "chart_symbol":"{{ticker}}",
    "order_type":"buy",
    "quantity":"100$",
    "tp":"10%",
    "sl":"5%",
    "code":"68ZMEQ6S5ZA507N0"
  }
]
When the alert triggers:
  1. TradingView evaluates the condition
  2. TradingView sends the message
  3. Mirrorpip reads the message
  4. Mirrorpip executes the buy order
No manual intervention is required.

Common Mistakes in TradingView Messages

Editing the JSON Incorrectly

A missing bracket, comma, or quotation mark can break the entire message. Example: ❌ Invalid
"quantity":"100$
Missing closing quotation mark.

Using the Wrong Order Type

Example:
"order_type":"buy"
instead of
"order_type":"short"
can result in the opposite trade being executed.

Removing TradingView Variables

Incorrect:
"price":"50000"
Correct:
"price":"{{close}}"
Using TradingView variables ensures the latest market data is passed to Mirrorpip.

Using an Old Authentication Code

Always copy the latest JSON from Mirrorpip if your automation settings change.

Frequently Asked Questions

Can I write my own custom message?

Yes. However, for Mirrorpip automation, the message must follow the correct JSON structure.

Can I use plain text messages?

Yes for notifications. Example:
BTC Buy Signal Generated
But plain text cannot be used for trade automation.

Can I use one message for multiple symbols?

Yes. Using:
"chart_symbol":"{{ticker}}"
allows the alert to automatically adapt to the current chart symbol.

Does every alert need a message?

For manual notifications: No. For Mirrorpip automation: Absolutely yes. The message contains the trading instructions needed for execution.

Final Thoughts

The TradingView Message field is the brain of your automation setup. While the alert condition determines when a signal occurs, the message determines what action should be taken when that signal occurs. Think of it this way:
Condition = When to Trade

Message = How to Trade
Mirrorpip reads the message, understands your trading instructions, and executes the trade on your connected exchange account. Without a message, TradingView can only generate alerts. With a properly configured message, those alerts become fully automated trades. That’s why the Message field is one of the most important components of TradingView automation.