ticker.standard() - Pine Script Function
ticker.standard()
Section titled “ticker.standard()”Overview
Section titled “Overview”Creates a ticker to request data from a standard chart that is unaffected by modifiers like extended session, dividend adjustment, currency conversion, and the calculations of non-standard chart types: Heikin Ashi, Renko, etc. Among other things, this makes it possible to retrieve standard chart values when the script is running on a non-standard chart.
Syntax
Section titled “Syntax”ticker.standard(symbol) → simple stringParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| symbol | simple string | A ticker ID to be converted into its standard form. Optional. The default is syminfo.tickerid. |
Returns
Section titled “Returns”A string representing the ticker of a standard chart in the “prefix:ticker” format. If the symbol argument does not contain the prefix and ticker information, the function returns the supplied argument as is.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("ticker.standard", overlay = true)// This script should be run on a non-standard chart such as HA, Renko...// Requests data from the chart type the script is running on.chartTypeValue = request.security(syminfo.tickerid, "1D", close)// Request data from the standard chart type, regardless of the chart type the script is running on.standardChartValue = request.security(ticker.standard(syminfo.tickerid), "1D", close)// This will not use a standard ticker ID because the `symbol` argument contains only the ticker — not the prefix (exchange).standardChartValue2 = request.security(ticker.standard(syminfo.ticker), "1D", close)plot(chartTypeValue)plot(standardChartValue, color = color.green)