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:
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:
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:
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:
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:
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:
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:
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:
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

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

Price

TradingView automatically replaces this variable with the latest candle close price. Example:

Chart Symbol

TradingView automatically inserts the chart symbol. Example:
This tells Mirrorpip which asset to trade.

Order Type

The order type determines the trading action.

Buy

Opens a long position.

Sell

Closes a long position.

Short

Opens a short position.

Cover

Closes a short position.

Quantity

Quantity determines position size.

Fixed Lots

This means:

Dollar-Based Position Sizing

This means:
Mirrorpip automatically calculates the required quantity.

Take Profit (TP)

You can define take profit directly inside the message.

Points


Percentage


Dollar Profit


Stop Loss (SL)

Similarly:

Points


Percentage


Dollar Risk


Trailing Stop Loss (TSL)

Mirrorpip also supports trailing stop losses. Examples:

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:
When triggered:

Another example:
When triggered:
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:
Message:
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
Missing closing quotation mark.

Using the Wrong Order Type

Example:
instead of
can result in the opposite trade being executed.

Removing TradingView Variables

Incorrect:
Correct:
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:
But plain text cannot be used for trade automation.

Can I use one message for multiple symbols?

Yes. Using:
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:
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.