label.new() in Pine Script: Add Text Labels to Charts
The label.new function in Pine Script puts text annotations directly on your TradingView chart — prices, signals, calculations, whatever you need displayed at a specific bar and price level.
Blog posts related to the TradingView
View All TagsThe label.new function in Pine Script puts text annotations directly on your TradingView chart — prices, signals, calculations, whatever you need displayed at a specific bar and price level.
math.abs() returns the magnitude of a numeric value: -5 becomes 5, and 5 stays 5. It removes direction; it does not normalize units, identify a divergence, or turn missing data into a valid observation.

The offset parameter changes where a plot appears on the chart. It does not change the calculated series, delay an order, or make future prices available. Historical indexing is a separate operation.

A trailing exit can follow favorable price movement after an activation level is reached. In Pine Script, activation and trailing distance are separate parameters. Neither a simulated trailing order nor an activation above entry guarantees a profitable live fill.


request.security() is a Pine Script function that fetches data from any symbol or timeframe, not just the one on your current chart. You can pull OHLCV values, custom calculations, or entire indicator outputs from another context and display them in your active script.
Ever found yourself on a 1-minute chart needing the daily trend? Or trading SPY but wanting to watch what the VIX is doing at the same time? That's what this function supports.
The requested context has its own bars and confirmation timing. An expression that compiles can still use an invalid timeframe or produce changing values on realtime bars.
na represents an unavailable value; na(value) checks for it. Missing numeric data usually propagates through arithmetic rather than crashing a script. A guard should express what the calculation needs, not replace every missing observation with an invented zero.

ta.barssince(condition) returns zero when the condition is true, then counts chart bars until it is true again. Before the first occurrence, it returns na. The count measures time since that event, not the age or strength of a trend.
LuxAlgo’s library is a catalog of indicators and trading concepts. To use a specific tool, check its own page, supported platform, access terms and calculation rules. The earlier description of a fixed 200-tool collection with identical features is no longer a reliable guide.

Fibonacci retracement levels divide a selected price move into proportional distances. Their usefulness depends on how the endpoints are chosen and when those endpoints become known. A mathematical ratio alone does not establish support, resistance or a profitable entry.
