What you will learn in this lesson
- Understand the purpose of the alert Message box, in plain English
- Learn what JSON is, in one simple sentence, with no programming background assumed
- Understand TradingView's placeholder syntax conceptually (e.g. {{ticker}}, {{close}})
- Walk through a simple worked example composing a small JSON-style alert message
- Recognize that exact message fields depend entirely on the receiving platform's own requirements
Lesson 39 located the Webhook URL field. This lesson looks at the piece right next to it: the Message box - what actually gets sent when the alert fires - along with TradingView’s placeholder syntax that makes a single message automatically accurate, no matter what triggers it.
The Message Box, Briefly
Inside the same alert creation dialog from Module 8 and Lesson 39, the Message box is where you type the content that gets sent - whether that message ends up as an on-screen notification, an email, or (this module’s focus) a webhook message delivered to your configured URL.
What Is JSON? (One Sentence)
You’ll often see alert messages formatted in a particular structured style called JSON. In one simple sentence: JSON is simply a structured text format that many different software systems use to exchange data. That’s genuinely all you need to know conceptually for this lesson - no programming background required.
TradingView’s Placeholder Syntax
Rather than typing a fixed price or instrument name into the Message box (which would quickly become wrong the moment conditions change), TradingView provides placeholders - special text wrapped in double curly braces, like {{ticker}} - that get automatically replaced with real, current values at the exact moment the alert fires.
A few commonly used examples:
{{ticker}}→ replaced with the instrument’s ticker symbol (e.g.,RELIANCE,NIFTY){{close}}→ replaced with the closing price at the moment the alert triggered{{time}}→ replaced with the timestamp of the triggering candle{{strategy.order.action}}→ replaced with the order action (e.g.,buyorsell) from a strategy script’s logic, per Lesson 37’s strategy-vs-indicator distinction
What you TYPE in the Message box:
{{ticker}} crossed {{close}} at {{time}}
What TradingView actually SENDS when it fires:
RELIANCE crossed 2,847.50 at 2026-07-19 10:32:00
The same typed message automatically produces an accurate, current message every single time the alert fires - regardless of which instrument, price, or time is actually involved at that moment.
A Simple Worked Example: Composing a JSON-Style Message
Suppose a receiving system expects a small, structured message rather than a plain sentence. A trader might compose this in the Message box:
{"ticker": "{{ticker}}", "action": "buy", "price": {{close}}}
Reading this in plain English: it’s a structured message with three labeled pieces of information - a ticker (which will be automatically filled in with the real instrument symbol), an action (written here as a fixed value, “buy,” since this particular alert always means the same thing), and a price (automatically filled in with the real closing price). When the alert actually fires on, say, Reliance Industries at ₹2,847.50, TradingView would send something like:
{"ticker": "RELIANCE", "action": "buy", "price": 2847.50}
This example is illustrative, not universal. The exact field names (“ticker,” “action,” “price”), how many fields to include, and the precise formatting depend entirely on what the receiving platform expects and is built to parse - some systems might want additional fields, different names entirely, or a different structure altogether.
Real-Life Example: Two Alerts, Two Messages
Suppose a trader sets up two separate Bank Nifty alerts. The first, a simple price alert, uses the message "Bank Nifty crossed {{close}}" - plain text, meant mainly for a human reading a notification. The second, connected to a strategy script’s buy/sell logic, uses a JSON-style message like {"ticker": "{{ticker}}", "action": "{{strategy.order.action}}", "price": {{close}}} - meant for a receiving system that needs to programmatically read the ticker, action, and price separately. Same underlying placeholder mechanism, two different message styles, matched to two different purposes.
Analogy: A Fill-in-the-Blanks Form Letter
Think of a placeholder-filled alert message like a form letter with blanks: “Dear _, your appointment on _ at ___ is confirmed.” You write the template once, with blanks marked clearly, and the system fills in the real name, date, and time automatically each time a letter goes out - you never have to rewrite the whole letter for every single recipient. TradingView’s {{ticker}}, {{close}}, and similar placeholders work exactly the same way, just for alert messages instead of letters.
Common Beginner Mistakes
- Assuming JSON requires a programming background to understand conceptually. The one-sentence definition in this lesson (a structured text format for exchanging data) is genuinely sufficient to follow this entire module.
- Believing this lesson’s exact example fields are a universal standard. They’re illustrative only - the receiving platform always determines what fields and structure it actually expects.
- Misspelling a placeholder (like
{{clsoe}}instead of{{close}}), which would likely prevent proper substitution - careful spelling matters here. - Putting sensitive information directly into the message text, a security consideration covered fully in Lesson 42.
Practical Tips
- Before composing any real message, check what field names and structure your intended receiving platform actually expects - never assume this lesson’s example fields apply universally.
- Start with a simple plain-text message (no JSON) if you’re not yet connected to a system that needs structured data - JSON formatting is a choice, not a requirement, for the Message box itself.
- Keep a personal note of which placeholders you’ve tested and confirmed work as expected, before relying on any alert message for something important.
Practical Exercise
- Using only the placeholders introduced in this lesson ({{ticker}}, {{close}}, {{time}}, {{strategy.order.action}}), write out in plain text what a message might look like for an alert on Reliance Industries triggering a sell signal - don't worry about exact JSON formatting, just identify which placeholder goes where.
- Open the alert dialog's Message box (from Lesson 39's exercise) and, without saving or activating anything, simply look at whatever default or placeholder text may already be shown there. Note anything that resembles the {{...}} syntax described in this lesson.
Mini Quiz
1. What is JSON, in the simplest possible terms?
JSON (JavaScript Object Notation) is simply a structured text format - a way of organizing data as readable text - that many different software systems use to exchange information with each other, no programming background required to grasp this basic idea.
2. What does a placeholder like {{ticker}} do inside a TradingView alert message?
Placeholders like {{ticker}} are automatically substituted with real, current values (in this case, the instrument's ticker symbol) at the exact moment the alert condition triggers and the message is sent.
3. In the example message {"ticker": "{{ticker}}", "action": "buy", "price": {{close}}}, what would happen to {{close}} when the alert actually fires?
{{close}} is a placeholder that TradingView automatically replaces with the real closing price value at the exact moment the alert fires - the same substitution behavior described for {{ticker}} and other placeholders.
4. Are the exact fields used in a JSON-style alert message (like "ticker" or "action") fixed and mandatory across all systems?
The specific field names and structure of a JSON-style message are determined by whatever the RECEIVING system expects and is built to parse - this lesson's example is illustrative, not a universal standard every system requires.
5. Where does a trader actually compose the message containing placeholders like {{ticker}}?
The Message box lives inside the same alert creation dialog from Module 8 and Lesson 39 - this is where placeholders like {{ticker}} and {{close}} are typed alongside any custom text, forming the content that gets sent to the Webhook URL.
Frequently Asked Questions
Do I need any programming background to understand JSON?
No - this lesson's goal is a one-sentence, simple understanding: JSON is simply a structured text format many systems use to exchange data. Genuinely writing complex JSON by hand can involve more nuance, but recognizing the basic shape requires no programming background.
What other placeholders does TradingView support besides {{ticker}}, {{close}}, {{time}}, and {{strategy.order.action}}?
TradingView supports a range of placeholders covering things like open/high/low prices, volume, exchange, and strategy-specific values - always check TradingView's current alert documentation for the complete, up-to-date list, since available placeholders can be updated over time.
Is {{strategy.order.action}} available for every type of alert, including simple price alerts?
Strategy-specific placeholders like this one are generally tied to strategy scripts (Lesson 37's distinction) that have defined order actions - a plain price alert with no strategy script involved wouldn't have a meaningful "order action" to reference in the first place.
Does the Message box require JSON formatting, or can it just be plain text?
The Message box accepts plain text - JSON-style formatting is a common CHOICE when the receiving system expects structured data it can parse programmatically, not a requirement imposed by TradingView itself. A simple simple message works too, if that's all the receiving system needs.
Why would anyone bother formatting a message as JSON instead of plain English?
Structured formats like JSON are easier for RECEIVING SOFTWARE to parse reliably (pulling out the exact ticker, price, or action programmatically), compared to trying to extract the same information from a loosely worded sentence - useful specifically when the receiving system is software, not a human reading a notification directly.
What happens if I misspell a placeholder, like typing {{clsoe}} instead of {{close}}?
A misspelled or unrecognized placeholder would likely not be substituted with a real value the way a correctly spelled one would - it's worth carefully reviewing placeholder spelling before relying on an alert message for anything important.
Can I combine placeholders with my own custom text in the same message?
Yes - a message can freely mix custom text with placeholders, such as writing "Alert fired for {{ticker}} at price {{close}}" - the placeholders get substituted with real values while the surrounding custom text stays exactly as written.
Does every receiving platform expect the exact same JSON field names?
No - this is worth repeating, since it's a common point of confusion. Field names and structure are determined by whatever the receiving platform is built to parse; this lesson's example ({"ticker", "action", "price"}) is illustrative only, not a universal standard.
How does this lesson connect to Lesson 41 next?
This lesson focused on what goes INTO the message itself. Lesson 41 zooms out to the full generic workflow - from chart condition, through the alert and webhook, to a receiving platform, and what that platform might do with the message once received.
Is it safe to put sensitive information, like account passwords, inside an alert message?
No - this is an important security consideration covered fully in Lesson 42, but worth flagging here too: alert messages should never contain real login credentials or sensitive account secrets in plain text.
Key Takeaways
- JSON is simply a structured text format that many systems use to exchange data - no programming background needed to grasp this one-sentence definition.
- TradingView's placeholder syntax (like {{ticker}}, {{close}}, {{time}}, {{strategy.order.action}}) gets automatically replaced with real values the moment an alert fires.
- The alert's Message box, inside the same dialog covered in Lesson 39, is where placeholders and custom text are combined to compose what gets sent.
- A simple worked example, like {"ticker": "{{ticker}}", "action": "buy", "price": {{close}}}, shows how placeholders slot into a structured message.
- Exact field names and structure depend entirely on what the receiving platform expects and is built to parse - this lesson's example is illustrative, not universal.
Conclusion
Placeholders like {{ticker}} and {{close}} are what let a single alert message stay accurate and specific, automatically, no matter which instrument or price actually triggers it. With the message itself understood, the next lesson zooms out to the full generic workflow - from a chart condition being met all the way to a receiving platform deciding what to do about it.
