Pine Script

Pine Script syminfo.isin: Match Symbols Across Exchanges

How to use the Pine Script syminfo.isin variable to identify securities globally across exchanges with 12-character ISIN codes.

Tom Hartman

Marketing

Reviewed by Mike Christensen

Fact-checked by Mike Christensen

9 Min Read
BluSky — The Future of Trading. Prop firm futures trading. Sign up at BluSky.pro.

Bottom Line

  • syminfo.isin is a new variable added in November 2025 that returns the 12-character International Securities Identification Number for the current symbol
  • ISINs uniquely identify securities globally regardless of which exchange lists them unlike ticker symbols which vary by exchange
  • Use syminfo.isin with request.security() to compare whether two different ticker symbols refer to the same underlying security
  • Returns an empty string if no ISIN is available for the current symbol

Pine Script v6 introduced the syminfo.isin variable in November 2025, giving scripts access to a symbol's International Securities Identification Number directly1. An ISIN is a 12-character alphanumeric code that uniquely identifies a security globally, regardless of which exchange lists it. If you have ever needed to determine whether two different ticker symbols on different exchanges actually refer to the same underlying instrument, syminfo.isin provides the answer programmatically.

This guide explains what ISIN codes are, how the syminfo.isin variable works, and how to use it with request.security() for cross-exchange comparisons in your Pine Script indicators and strategies.

What ISIN Codes Are

ISIN stands for International Securities Identification Number. It is a standardized 12-character code defined by ISO 6166 that uniquely identifies a specific financial instrument2. Every publicly traded stock, bond, ETF, and many other financial products have an assigned ISIN.

The code follows a fixed structure:

  • Characters 1-2 are the country code (ISO 3166-1 alpha-2) indicating where the security was issued
  • Characters 3-11 are the National Securities Identifying Number (NSIN), which varies by country
  • Character 12 is a check digit calculated from the preceding characters2

For example, the ISIN for Apple Inc. common stock is US0378331005. The "US" prefix indicates a United States-issued security. This code remains the same whether you look up Apple on NASDAQ, NYSE, or any other exchange globally.

This consistency is what makes ISINs valuable for trading scripts. Ticker symbols are not consistent across exchanges. Apple trades as "AAPL" on NASDAQ, but on the German GETTEX exchange, it trades under the symbol "APC." Despite the different ticker names, both refer to the same underlying security, and both share the ISIN US0378331005.

However, not every symbol with "AAPL" in its name refers to the same instrument. On the Toronto Stock Exchange (TSX), the symbol AAPL represents Apple Inc. Canadian Depositary Receipts (CDRs), which is a different financial instrument with its own ISIN: CA03785Y1007. The ISIN correctly distinguishes these as different securities even though the ticker looks the same.

The syminfo.isin Variable

The syminfo.isin variable has the type simple string and returns the ISIN code associated with the current chart symbol3. If no ISIN data is available for the symbol, it returns an empty string ("")3.

//@version=6
indicator("Show ISIN", overlay = true)

if barstate.islastconfirmedhistory
    label.new(bar_index, high, syminfo.isin, yloc = yloc.abovebar)

This script displays the ISIN of the current chart symbol as a label on the last bar. If you add this to a chart showing NASDAQ:AAPL, the label reads US0378331005. Switch to GETTEX:APC (Apple on the German exchange) and the label still reads US0378331005, confirming both symbols reference the same security.

Because syminfo.isin is a simple string, its value is determined when the script first loads and does not change across bars3. You can use it in any string comparison, log it to the Pine Logs pane, display it in labels or tables, or pass it to functions.

The syminfo.isin variable joins several other syminfo variables that provide metadata about the current symbol:

  • syminfo.ticker returns the symbol name without the exchange prefix (e.g., "AAPL")
  • syminfo.tickerid returns the full symbol name with exchange prefix (e.g., "NASDAQ:AAPL")
  • syminfo.description returns the human-readable description of the symbol (e.g., "Apple Inc.")
  • syminfo.currency returns the currency the symbol is quoted in (e.g., "USD")
  • syminfo.basecurrency returns the base currency for forex and crypto pairs
  • syminfo.isin returns the global ISIN identifier that stays consistent across exchanges3

Together, these variables let you build scripts that understand not just what a symbol is called, but what it actually represents.

Comparing Symbols Across Exchanges

The primary use case for syminfo.isin is comparing whether two symbols on different exchanges refer to the same underlying security1. You do this by combining syminfo.isin with request.security(), which retrieves data from a different symbol context3.

Here is the official example from the Pine Script documentation1:

//@version=6
indicator("ISIN demo")

// Define inputs for two symbols to compare.
string symbol1Input = input.symbol("NASDAQ:AAPL", "Symbol 1")
string symbol2Input = input.symbol("GETTEX:APC",  "Symbol 2")

if barstate.islastconfirmedhistory
    // Retrieve ISIN strings for symbol1Input and symbol2Input.
    var string isin1 = request.security(symbol1Input, "", syminfo.isin)
    var string isin2 = request.security(symbol2Input, "", syminfo.isin)

    // Log the retrieved ISIN codes.
    log.info("Symbol 1 ISIN: " + isin1)
    log.info("Symbol 2 ISIN: " + isin2)

    // Log an error message if one of the symbols does not have ISIN information.
    if isin1 == "" or isin2 == ""
        log.error("ISIN information is not available for both symbols.")
    // If both symbols do have ISIN information, log a message to confirm
    // whether both refer to the same security.
    else if isin1 == isin2
        log.info("Both symbols refer to the same security.")
    else
        log.info("The two symbols refer to different securities.")

The key technique here is passing syminfo.isin as the expression argument to request.security()3. This retrieves the ISIN from the context of the specified symbol rather than the chart's current symbol. The script then compares the two ISIN strings to determine whether both symbols represent the same instrument.

When you run this script with NASDAQ:AAPL and GETTEX:APC, both ISIN values resolve to US0378331005, and the script logs that both symbols refer to the same security.

Cross-Exchange Symbol Matcher

You can build a more complete tool that checks multiple symbols against the current chart symbol and reports which ones share the same underlying security.

//@version=6
indicator("Cross-Exchange Matcher", overlay = true)

string sym1 = input.symbol("GETTEX:APC", "Compare Symbol 1")
string sym2 = input.symbol("TSX:AAPL", "Compare Symbol 2")
string sym3 = input.symbol("LSE:0R2T", "Compare Symbol 3")

if barstate.islastconfirmedhistory
    string chartIsin = syminfo.isin
    var string isin1 = request.security(sym1, "", syminfo.isin)
    var string isin2 = request.security(sym2, "", syminfo.isin)
    var string isin3 = request.security(sym3, "", syminfo.isin)

    var table t = table.new(position.top_right, 3, 5, bgcolor = color.white)
    table.cell(t, 0, 0, "Symbol", text_color = color.black)
    table.cell(t, 1, 0, "ISIN", text_color = color.black)
    table.cell(t, 2, 0, "Match", text_color = color.black)

    table.cell(t, 0, 1, syminfo.tickerid, text_color = color.black)
    table.cell(t, 1, 1, chartIsin, text_color = color.black)
    table.cell(t, 2, 1, "Chart", text_color = color.gray)

    table.cell(t, 0, 2, sym1, text_color = color.black)
    table.cell(t, 1, 2, isin1, text_color = color.black)
    table.cell(t, 2, 2, isin1 == chartIsin ? "Yes" : "No",
         text_color = isin1 == chartIsin ? color.green : color.red)

    table.cell(t, 0, 3, sym2, text_color = color.black)
    table.cell(t, 1, 3, isin2, text_color = color.black)
    table.cell(t, 2, 3, isin2 == chartIsin ? "Yes" : "No",
         text_color = isin2 == chartIsin ? color.green : color.red)

    table.cell(t, 0, 4, sym3, text_color = color.black)
    table.cell(t, 1, 4, isin3, text_color = color.black)
    table.cell(t, 2, 4, isin3 == chartIsin ? "Yes" : "No",
         text_color = isin3 == chartIsin ? color.green : color.red)

This script displays a table in the top-right corner of the chart showing each comparison symbol, its ISIN, and whether it matches the chart symbol's ISIN. Applied to a NASDAQ:AAPL chart, the GETTEX:APC row would show "Yes" (same underlying Apple common stock), the TSX:AAPL row would show "No" (different instrument, the Canadian Depositary Receipt), and LSE:0R2T (Apple on the London Stock Exchange) would show "Yes."

Multi-Exchange Price Comparison

Once you confirm that two symbols share the same ISIN, you can use request.security() to pull price data from both exchanges and compare them. This is useful for identifying arbitrage opportunities or checking cross-listing price discrepancies.

//@version=6
indicator("Multi-Exchange Price", overlay = false)

string altSymbol = input.symbol("GETTEX:APC", "Alternative Listing")

if barstate.islastconfirmedhistory
    var string altIsin = request.security(altSymbol, "", syminfo.isin)
    if syminfo.isin != "" and altIsin != "" and syminfo.isin != altIsin
        log.warning("Symbols have different ISINs - not the same security")

float altClose = request.security(altSymbol, "", close)
float priceDiff = close - altClose

plot(close, "Chart Close", color.blue, 2)
plot(altClose, "Alt Close", color.orange, 2, linestyle = plot.linestyle_dashed)
plot(priceDiff, "Difference", color.gray, 1, display = display.data_window)

The script first verifies that both symbols share the same ISIN, logging a warning if they do not. It then plots the closing prices from both exchanges and calculates the difference. Note that price differences between exchanges may reflect currency conversions, different trading hours, or exchange-specific factors.

When ISIN Is Not Available

The syminfo.isin variable returns an empty string ("") when no ISIN data is available for the current symbol3. This happens in several situations:

  • Cryptocurrency pairs typically do not have ISINs because they are not registered through traditional securities identification systems
  • Forex pairs do not have ISINs since currencies themselves are not securities
  • Some indices, custom symbols, and less common instruments may lack ISIN data in TradingView's database
  • Synthetic or calculated symbols created with ticker.new() do not have ISINs

Always check for an empty string before using the ISIN value in comparisons:

if syminfo.isin == ""
    log.warning("No ISIN available for " + syminfo.tickerid)
else
    log.info("ISIN: " + syminfo.isin)

This check prevents false negatives in your cross-exchange comparisons. Two symbols that both return empty ISIN strings should not be treated as matching, since the empty string simply means no data is available rather than indicating they are the same security.

Using ISIN Data with Automation

The syminfo.isin variable is particularly valuable for traders who operate across multiple exchanges and brokers. If you build indicators that track the same security across different listings, you can automate your trading on whichever exchange offers the best execution.

TradersPost connects TradingView alerts to multiple broker accounts simultaneously4. You can set up alerts on your primary exchange listing and have TradersPost execute orders through the broker that provides the best access to your preferred exchange. The ISIN verification in your script ensures you are always tracking and trading the correct underlying security, even when ticker symbols differ.

Conclusion

The syminfo.isin variable added in November 2025 gives Pine Script developers a reliable way to identify securities globally1. Unlike ticker symbols that vary across exchanges, ISINs provide a universal identifier for the same underlying instrument2. Combined with request.security(), you can build cross-exchange comparison tools, verify symbol identity programmatically, and ensure your multi-exchange analysis always compares the right instruments3. Check for empty strings when working with asset classes that do not have ISINs, and use the variable alongside other syminfo properties like syminfo.ticker and syminfo.description for a complete understanding of any symbol your script encounters.

References

1 Pine Script Release Notes
2 Pine Script User Manual
3 Pine Script v6 Language Reference
4 TradersPost - Automated Trading Platform

All In Pine Script
  • Pine Script Mar 9, 2026

    Export Constants from Pine Script Libraries (v6)

    How to export constant variables from Pine Script libraries to share reusable values like ratios, thresholds, and configuration across multiple scripts.

  • Pine Script Mar 9, 2026

    How to Automate Pine Script Strategies

    How to automate your Pine Script v6 strategies with TradersPost webhooks, from alert setup to live broker execution with supported brokers.

  • Pine Script Mar 9, 2026

    What Changed in the Pine Script Editor in 2025

    Pine Script developer experience improvements from 2025: unlimited scopes, 10x longer strings, the new Pine Editor layout, and flexible line wrapping.

  • Pine Script Mar 9, 2026

    Pine Script Multi-Symbol Screener Tutorial

    How to build a multi-symbol dashboard in Pine Script v6 using dynamic requests to compare prices, RSI, and volume across multiple tickers.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

TradersPost operates as a non-custodial automated trading platform, enabling users to connect alerts from their preferred trading platforms to their selected brokerage or exchange accounts. It abstains from the transmission, custody, or management of customer funds, covering both traditional and cryptocurrency assets. Typically, registration requirements set by regulatory entities such as the SEC, FINRA, or FinCEN apply to entities that hold or transmit customer funds. To ensure ongoing compliance, TradersPost regularly engages with regulatory authorities to confirm its adherence to all relevant local and federal laws.

TradersPost does not provide alerts, signals, research, analysis, or trading advice of any kind. It is designed to assist traders and investors in making their own trading decisions based on their alerts. The platform does not offer recommendations regarding securities to buy or sell, nor does it provide trading or investing advice. The platform and its features, capabilities, and tools are provided 'as-is' without any warranty.

Risk Disclosure: The use of automated trading systems involves inherent risks, including the potential for significant financial loss. These systems operate based on predetermined algorithms that may not fully adapt to changing market conditions, possibly making them unsuitable for some investors. Individuals are advised to thoroughly assess their financial situation and risk tolerance before using this platform.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

© 2026 TradersPost, Inc. All rights reserved.