TradingView's alert message character limit, and what Autoview sees

Autoview · Guide · Updated August 11, 2026

The real limits

TradingView documents three separate caps, and which one applies depends on how the message was built:

  • Alert name: 300 characters.
  • Manually typed message (the alert dialog's Message field): 4000 characters.
  • Message built by Pine Script's alert() function, or the alert_message argument: 40960 characters, ten times the manual limit.

TradingView also notes that emojis are encoded in multiple bytes, so a single emoji in your message counts as several characters against whichever limit applies. The webhook POST body TradingView sends is capped the same way as the alert message itself, there's no separate, larger allowance for the request that actually reaches your webhook URL.

What Autoview does with the message it receives

Autoview's webhook endpoint doesn't impose a length limit of its own. It reads the POST body TradingView sends and splits it into individual commands on newlines, carriage returns, or |, skipping any of those characters found inside [ ] brackets so a stacked command isn't split apart by accident. There's no additional length check, and no re-validation that a bracket or quote is actually closed, before that text is treated as a command. Whatever TradingView actually transmits is exactly what gets parsed, nothing added, nothing trimmed on Autoview's side.

The honest edge case: truncation happens before Autoview ever sees it

If a Pine Script alert() message runs past 40960 characters, TradingView cuts it down before the webhook POST is ever made. That truncation is entirely TradingView's decision, made before your webhook URL is even contacted, so there's no flag or marker in what Autoview receives saying "this used to be longer." Autoview can't distinguish a message that was always short from one that got cut short.

In practice, the symptom you'd notice is a command in your log that looks cut off, a parameter value ending mid-number, or a bracketed section missing its closing ], rather than an explicit "message too long" error from Autoview. If a command in your log looks truncated and you can't explain why, check how long the built message actually is before assuming it's a syntax mistake in your script.

What tends to push a message toward the limit

The 40960-character alert() cap is generous, most single commands are nowhere close. It gets more relevant when a message stacks several optional parameters at once, attached stop-loss and take-profit levels, an OCO group, several str.tostring() concatenations for computed values, or a long // comment appended on top. See the command reference for the full parameter list and Pine Script functions for building a message dynamically with str.tostring(). The 4000-character manual-dialog limit is the one worth watching if you're pasting a long command by hand into the alert dialog rather than generating it from Pine Script.

Test before you trust it

Add d=1 to the message while you're building something long. Autoview logs what it would have sent instead of placing the order, so you can read the whole command back in the log and confirm every parameter arrived intact before removing d=1.

A note on what Autoview is. Autoview is an execution tool, not a trading or investment advisor. It places the orders your script and alerts tell it to; it doesn't generate signals or make any claim about results. Trading carries risk of loss, and you're responsible for the strategy you automate. See our disclosures.

Read the command reference