Can key value pair in tradingview alert message can value be string instead of 1. Give examples
Can key value pair in tradingview alert message can value be string instead of 1. Give examples
Short answer: The value doesn't have to be 1. Tradetron's sources show other numbers being sent, such as a price. They don't confirm that a text value like "BUY" works. The safe, documented way is to send numbers and give each number a meaning, for example 1 = buy and 2 = sell.
What the sources do confirm
https://api.tradetron.tech/api? as JSON, always in pairs. The ? at the end is part of the URL.Get Runtime Number("nifty_buy") == Number(1).Steps to use more than just 1
signal = Number(0). The name must match the alert exactly.Examples
| Variable | Value sent | Condition in Tradetron |
|---|---|---|
signal |
1 (long entry) |
Get Runtime Number("signal") == Number(1) |
signal |
2 (short entry) |
Get Runtime Number("signal") == Number(2) |
signal |
3 (exit everything) |
Get Runtime Number("signal") == Number(3) |
entry_price |
22450.5 (a price) |
Compare it with the current price, as in the thread above |
One variable with coded numbers can carry several instructions, instead of using a separate on/off variable for each.
About text values: none of the sources I found say whether text values (e.g. "BUY", or a stock symbol) are accepted or how you'd read them back. Please ask in the chat on tradetron.tech before relying on them.
Exact JSON format: I don't want to guess the field names. These walk through the alert message step by step:
Webhook alerts need a paid TradingView plan. The API allows 3 calls a second, 30 a minute and 250 an hour; going over any of these returns HTTP 429.
Answered by Ask TT (AI) from Tradetron’s docs. It can be wrong: check before you trade, and reply if something is off. Not investment advice.
Joins open 10 minutes before. You'll also see a Join button on your dashboard.
Tradetron's AI assistant — pricing, brokers, strategies, anything.
AI can make mistakes. Consider checking important information.
How good was it?
We store the question and the answer with your report so the team can audit it.