# TradingView Advanced Charts - Documentation Map

A map of all documentation pages with their headings, for navigation by LLMs and tools. Every page is available as Markdown at the linked URL.

> Last updated: 2026-10-07 13:14:09 UTC

This map uses a hierarchical structure:

* `##`/`###` mark documentation groups
* `- [title](url.md)` marks a page (fetch the `.md` URL for its full content)
* Nested bullets show the heading structure within each page

## Overview

- [Introduction](https://charting-library-docs.xstaging.tv/latest/introduction.md)
  - Exclusive trading features
  - Key features
  - System requirements
- [Get started](https://charting-library-docs.xstaging.tv/latest/quick-start.md)
  - 1. Get access
  - 2. Install the library
    - Package structure
  - 3. Initialize the chart
  - 4. Run the project
  - Next steps
- [Mobile app development](https://charting-library-docs.xstaging.tv/latest/mobile_specifics.md)
  - Overview
    - Mobile specifics
    - Gestures
  - Mobile applications
  - Frequently Asked Questions
      - The library Android Integration Example demonstrates a white screen. How to fix it?
      - What is the minimum Android version required for the library?
      - How to check the library for errors?
      - How to transfer data from native code to JavaScript code?
      - How to open links in the built-in mobile browser instead of the web view on Android?
      - How to resolve a truncated price and time scales issue?
      - Why can't I input a negative sign (-) using the Android keyboard in the WebView?
- [Product comparison](https://charting-library-docs.xstaging.tv/latest/product-comparison.md)
  - Lightweight Charts™
  - Widgets
- [Troubleshooting](https://charting-library-docs.xstaging.tv/latest/troubleshooting.md)
  - Overview
  - API-specific troubleshooting
  - Memory leaks
    - 1. Verify proper chart cleanup logic
    - 2. Check for high-frequency data updates
    - 3. Isolate the library component
    - 4. Record memory heap snapshot
  - Content Security Policy errors
  - Still stuck?

## Build with AI

- [Build with AI](https://charting-library-docs.xstaging.tv/latest/ai.md)
- [AI-friendly documentation](https://charting-library-docs.xstaging.tv/latest/ai/ai-friendly-docs.md)
  - Overview
  - llms.txt and the docs map
  - Per-page Markdown
  - TypeScript definition files
  - How to use this with AI tools
- [Create AI library assistant](https://charting-library-docs.xstaging.tv/latest/ai/build-ai-assistant.md)
  - Overview
  - File contents and prerequisites
  - How to use
  - Best practices
  - Limitations and disclaimers
- [Agent skills](https://charting-library-docs.xstaging.tv/latest/ai/agent-skills.md)
  - Overview
  - Datafeed skill
    - Datafeed checker
  - Install the skill

## Configuration

- [Widget Constructor](https://charting-library-docs.xstaging.tv/latest/configuration/Widget-Constructor.md)
  - Advanced Charts parameters
    - Widget configuration
    - Chart configuration
    - Data configuration
    - Chart size
    - UI customization
    - Chart features
    - Indicators and drawings
    - Symbol search and comparison
    - Saving and loading chart
      - High-level APIs
      - Low-level API
      - User settings
  - Trading Platform parameters
- [Widget methods](https://charting-library-docs.xstaging.tv/latest/configuration/widget-methods.md)
  - Overview
  - Advanced Charts methods
    - chartReady
    - chart
    - activeChart
    - subscribe / unsubscribe
    - applyOverrides
    - applyStudiesOverrides
    - setSymbol
    - changeTheme
    - onShortcut
    - takeClientScreenshot
    - customThemes
    - closePopupsAndDialogs
  - Trading Platform methods
    - widgetbar
    - watchList
    - news
    - chartsCount
- [Events and subscriptions](https://charting-library-docs.xstaging.tv/latest/configuration/events-and-subscriptions.md)
  - Overview
  - Widget events
  - Chart events
  - Component events
- [Localization](https://charting-library-docs.xstaging.tv/latest/configuration/Localization.md)
  - Set up language
  - Supported languages
  - Multiple languages
  - Unsupported languages
  - Custom translations
  - Right-to-left alignment
- [Accessibility](https://charting-library-docs.xstaging.tv/latest/configuration/accessibility.md)
  - Disclaimer
  - Keyboard navigation
  - Color and contrast
  - Screen reader compatibility
    - Enhanced descriptions
- [Keyboard shortcuts](https://charting-library-docs.xstaging.tv/latest/configuration/Shortcuts.md)
  - Overview
  - Advanced Charts shortcuts
    - Chart
    - Indicators and drawings
  - Trading Platform shortcuts
    - Chart
    - Watchlist
    - Trading
  - Manage shortcuts
    - Transition to key code-based shortcuts
    - Override shortcuts
    - Disable shortcuts
- [Cross-Origin hosting](https://charting-library-docs.xstaging.tv/latest/configuration/Hosting-Library-Cross-Origin.md)
  - Overview
  - 1. Load the standalone script
  - 2. Configure the widget constructor
  - 3. Configure CORS

## Connecting data

- [Connecting data](https://charting-library-docs.xstaging.tv/latest/connecting_data.md)
  - Overview
  - Data integration approaches
    - Datafeed API
    - UDF adapter
  - Implementation example
  - Using specific protocols
  - Connecting data from static files

### Datafeed API

- [Datafeed API](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api.md)
  - Overview
    - Asynchronous callbacks
    - Time units
  - List of methods
- [Required methods](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/required-methods.md)
  - onReady
  - searchSymbols
  - resolveSymbol
    - Multiple symbol resolving
    - Display invalid symbol icon
  - getBars
    - Bar order
    - Correct amount of data
    - Handling non-OHLC data
  - subscribeBars
    - Bar replacement
  - unsubscribeBars
  - Sequence diagrams
- [Datafeed subscriptions](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/datafeed-subscriptions.md)
  - Overview
  - Multiple subscriptions
  - Subscription lifecycle
    - Subscribing for updates
    - Getting updates
    - Unsubscribing from updates
  - Example
- [Trading Platform methods](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/trading-platform-methods.md)
  - getQuotes
  - subscribeQuotes
  - unsubscribeQuotes
  - subscribeDepth
  - unsubscribeDepth
- [Additional methods](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/additional-methods.md)
  - searchSymbolsPaginated
  - getMarks
  - getTimescaleMarks
  - getServerTime
  - getVolumeProfileResolutionForPeriod
- [UDF adapter](https://charting-library-docs.xstaging.tv/latest/connecting_data/UDF.md)
  - Overview
    - Why use UDF
    - Limitations
  - How to use
    - Constructor
  - UDF data format
    - Example
  - UDF endpoints
    - Configuration
      - Request
      - Response
    - Symbol group request
      - Request
      - Response
    - Symbol search
      - Request
      - Response
    - Symbol resolve
      - Request
      - Response
    - Get bars
      - Request
      - Response
    - Marks on the chart
      - Request
      - Response
    - Time scale marks
      - Request
      - Response
    - Server time
      - Request
      - Response
    - Quotes
      - Request
      - Response
- [Symbology](https://charting-library-docs.xstaging.tv/latest/connecting_data/Symbology.md)
  - Symbol name
    - name
    - ticker
    - Letter case
  - Resolutions
  - Time zone
  - Session
    - corrections
  - Extended sessions
    - subsessions
    - subsession_id
    - Update session value
  - Supported price values
  - Price format
    - Decimal format
      - Variable tick size
      - How to display pips
    - Fractional format
      - Fraction of a fraction format

### Time and sessions

- [Time and sessions](https://charting-library-docs.xstaging.tv/latest/connecting_data/time-and-sessions.md)
  - Overview
  - Core principles
    - Configure accurate symbol information
    - Provide bars with UTC timestamps
    - Let the library handle time conversions
  - How to start
  - Troubleshooting
- [Configure resolutions in datafeed](https://charting-library-docs.xstaging.tv/latest/connecting_data/time-and-sessions/configure-datafeed-resolutions.md)
  - Overview
  - 1. Specify supported resolutions
    - Additional resolutions
  - 2. Enable required resolutions
    - Resolution in seconds
    - Resolution in minutes (intraday)
    - Resolution in days
    - Resolution in weeks / months
    - Resolution in ticks
  - 3. Implement method in datafeed
  - Example
- [Trading sessions](https://charting-library-docs.xstaging.tv/latest/connecting_data/time-and-sessions/Trading-Sessions.md)
  - Session formats
    - 24/7 sessions
    - Intraday sessions
    - Overnight sessions
    - Multiple sessions
    - Different sessions for different days
    - First trading day
    - Forex sessions
  - Note about bar timestamps
  - Examples
  - Session history
    - Session switch
- [Extended sessions](https://charting-library-docs.xstaging.tv/latest/connecting_data/time-and-sessions/Extended-Sessions.md)
  - Enable extended sessions
    - Specify the default session type
    - Specify subsession colors
  - Change the session type
    - In UI
    - Using API
  - Configure the datafeed
    - Handle session switch
      - Example
    - Corrections for extended sessions
  - Enable the price line
- [Datafeed: common issues](https://charting-library-docs.xstaging.tv/latest/connecting_data/Datafeed-Issues.md)
  - getBars is called multiple times
  - Bar data is mutable
  - Requested data is outside visible range
  - Requested data is outside the trading session
  - Infinite data requests
  - Time violation
  - Maximum call stack size exceeded
  - Data must have unique times
  - Library shifts bar time
    - Example
  - Internet connection issues
    - For offline applications
  - Quotes are not displayed or refreshed
  - Delays in Trading Platform UI elements
  - New bar doesn't appear after the previous one closes
  - Gaps appear on the chart
    - No data within a trading session
    - No data on a holiday
  - Japanese charts show incorrect time
  - Indicator isn't plotted when the resolution is changed

## UI elements

- [UI elements](https://charting-library-docs.xstaging.tv/latest/ui_elements.md)
  - Top toolbar
  - Chart
  - Drawing toolbar
  - Widget bar
  - Account Manager
- [Chart](https://charting-library-docs.xstaging.tv/latest/ui_elements/Chart.md)
  - Default chart settings
  - Customization
    - Change colors
    - Show/hide chart elements
    - Show/hide gaps on the chart
  - Chart methods
    - Subscribe to events
    - Manage chart
    - Apply overrides
    - Execute action by ID
    - Manage drawings and indicators
    - Enable drag-to-export feature
    - Getters
- [Toolbars](https://charting-library-docs.xstaging.tv/latest/ui_elements/Toolbars.md)
  - Overview
  - Change toolbar style
  - Custom buttons in top toolbar
    - Accessible buttons
- [Resolution](https://charting-library-docs.xstaging.tv/latest/ui_elements/Resolution.md)
  - Overview
  - Resolution format
  - Set up resolution on the chart
    - Default resolution
    - In UI
    - Using API
  - Bar alignment
    - Example
  - Additional settings
    - Disable resolution rebuilding
    - Enable custom resolutions
      - Example
    - Disable resolution changing
- [Symbol Search](https://charting-library-docs.xstaging.tv/latest/ui_elements/Symbol-Search.md)
  - Display symbols
  - Hide Symbol Search
  - Open/close Symbol Search
  - Set request delay
  - Override symbol names
  - Case-insensitive search
  - Filters
  - Symbol grouping
  - Display logos
  - Enable spread operators
- [Legend](https://charting-library-docs.xstaging.tv/latest/ui_elements/Legend.md)
  - Configure legend
    - Symbol logos
    - Open market status
    - Title
    - Last day change values
    - Resolution
  - Visibility customization
    - Hide legend
    - Hide legend buttons
    - Hide context menu
  - Price formatting
  - NaN values in legend
  - Display delayed data information
- [Time zones](https://charting-library-docs.xstaging.tv/latest/ui_elements/timezones.md)
  - Overview
    - Manage time zone
  - Supported time zones
  - Custom time zones
    - GMT-based time zones
      - Examples
- [Price scale](https://charting-library-docs.xstaging.tv/latest/ui_elements/Price-Scale.md)
  - UI interactions
    - Adding price scale
    - Changing position
    - Pinning to scale
    - Inverting price scale
    - Resetting price scale
    - Quick trading
  - Style and default settings
    - Customize price scale appearance
    - Change price scale position
    - Attach indicators to price scale
    - Hide price scale
    - Hide settings button
    - Add labels
    - Enable auto scaling
    - Set mode
    - Set visible price range
  - Price formatting
    - Change decimal sign
    - Use custom formatting
  - Symbol currency
    - Display symbol currency
    - Enable currency conversion
- [Time scale](https://charting-library-docs.xstaging.tv/latest/ui_elements/Time-Scale.md)
  - Time range
  - Time scale API
  - Customize scale appearance
  - Date and time formatting
  - Time frame toolbar
    - Time frame customization
    - Programmatic time frame setting
  - Extended time scale
  - Extended sessions
- [Marks](https://charting-library-docs.xstaging.tv/latest/ui_elements/Marks.md)
  - Marks on the chart
  - Marks on the time scale
  - Example

### Indicators

- [Indicators](https://charting-library-docs.xstaging.tv/latest/ui_elements/indicators.md)
  - Built-in indicators
  - Custom indicators
  - Add an indicator
    - UI
    - API
  - Add and compare new series
    - Enable spread operators
  - Visibility customization
    - Hide indicators
    - Hide volume-based indicators
    - Hide the Volume indicator
    - Limit indicator amount
  - Style customization
  - Indicator API
- [Indicator placement](https://charting-library-docs.xstaging.tv/latest/ui_elements/indicators/indicator-placement.md)
  - Default placement
  - Change the pane
  - Change the price scale
  - Move an indicator to another pane
  - Custom indicator placement
- [Indicators list](https://charting-library-docs.xstaging.tv/latest/ui_elements/indicators/Indicators-List.md)
  - 0-9
  - A
  - B
  - C
  - D
  - E
  - F
  - G
  - H
  - I
  - K
  - L
  - M
  - N
  - O
  - P
  - R
  - S
  - T
  - U
  - V
  - W
  - Z

### Drawings

- [Drawings](https://charting-library-docs.xstaging.tv/latest/ui_elements/drawings.md)
  - Style customization
  - Drawing toolbar
    - Visibility options
    - Favorite tools
    - Custom restrictions
  - Drawing features
    - Templates
  - Drawing API
- [Drawings List](https://charting-library-docs.xstaging.tv/latest/ui_elements/drawings/Drawings-List.md)
  - Tools
    - Trend tools
    - Gann and Fibonacci tools
    - Geometric shapes
    - Annotation tools
    - Chart patterns
    - Predictions and measurement tools
    - Icons
    - Stickers
    - Emojis
  - Actions
- [Drawings API](https://charting-library-docs.xstaging.tv/latest/ui_elements/drawings/drawings-api.md)
  - Create drawings
    - createShape
      - Point
      - Drawing
    - createMultipointShape
    - createExecutionShape
    - createAnchoredShape
  - Attach drawing to indicator
  - Manage drawings
  - Get drawings
  - Remove drawings
    - removeEntity
    - removeAllShapes
  - Drawing events
  - Drawing Groups API
- [Context menu](https://charting-library-docs.xstaging.tv/latest/ui_elements/context-menu.md)
  - Override context menu
    - Using Widget Constructor
      - Examples
      - Determine evoked menu
    - Using API
- [Snapshots](https://charting-library-docs.xstaging.tv/latest/ui_elements/Snapshots.md)
  - Overview
    - Snapshot storage
  - Enable additional menu options
  - Remove button options
  - Hide button
  - Display trading lines
  - Implement your logic
- [Market Status](https://charting-library-docs.xstaging.tv/latest/ui_elements/market-status.md)
  - Session timeline
  - Customize the pop-up
    - Change text
    - Add custom section
  - Disable the pop-up
- [Object tree](https://charting-library-docs.xstaging.tv/latest/ui_elements/object-tree.md)
  - Fix undefined values
- [Watermarks](https://charting-library-docs.xstaging.tv/latest/ui_elements/watermarks.md)
  - Overview
  - Watermark API (recommended)
    - Color and visibility
    - Custom content
  - Settings adapter
- [Panes and Scales Behavior](https://charting-library-docs.xstaging.tv/latest/ui_elements/Panes-And-Scales-Behavior.md)

## Customization

- [Customization overview](https://charting-library-docs.xstaging.tv/latest/customization.md)
  - Customization APIs
  - Commonly customized items
  - Hiding UI elements
  - TradingView logo
  - Limitations
- [Featuresets](https://charting-library-docs.xstaging.tv/latest/customization/Featuresets.md)
  - How to use
  - Simple and complex featuresets
  - Visibility of controls and visual elements
  - Elements placement
  - Behavior
  - Trading Platform

### Overrides

- [Overrides](https://charting-library-docs.xstaging.tv/latest/customization/overrides.md)
  - Chart and drawings
  - Indicators
- [Chart overrides](https://charting-library-docs.xstaging.tv/latest/customization/overrides/chart-overrides.md)
  - paneProperties
    - Chart background color
    - Grid lines
    - Pane separator
    - Legend
    - Margin
    - Crosshair
  - scalesProperties
    - Price scale position
    - Scale colors and fonts
    - Labels on the scale
    - Price scale mode
  - mainSeriesProperties
    - Series visibility
    - Chart styles
    - Session
    - Countdown
    - Price line
    - Additional lines
    - minTick
  - Session highlights
  - Time zone
  - Trading Platform
- [Drawing overrides](https://charting-library-docs.xstaging.tv/latest/customization/overrides/Drawings-Overrides.md)
  - Customize drawings
    - Specify default properties
    - Change default properties on the fly
    - Change the existing drawing
    - Customize a single drawing
    - Customize icons, stickers, and emojis
      - Icons
      - Stickers
      - Emojis
  - List of overrides
- [Indicator overrides](https://charting-library-docs.xstaging.tv/latest/customization/overrides/indicator-overrides.md)
  - Customize indicators
    - Specify default properties
    - Change default properties on the fly
    - Change the existing indicator
    - Customize a single indicator
  - Customize new series
    - Overlay
    - Compare
  - List of overrides
  - Overrides syntax
    - Overview
    - Property path
      - Input property
      - Plot property
      - Plot color property
      - Precision property
    - Ambiguous identifiers
      - Example
- [Trading overrides](https://charting-library-docs.xstaging.tv/latest/customization/overrides/trading-overrides.md)
  - Customize order and position lines
    - Created with Broker API
      - Override properties
    - Created with trading primitives
  - Adjust display of trading features

### Styles

- [Styles](https://charting-library-docs.xstaging.tv/latest/customization/styles.md)
- [Custom themes API](https://charting-library-docs.xstaging.tv/latest/customization/styles/custom-themes.md)
  - Overview
  - Default color palette
  - Specify custom palettes
  - Manage palettes
    - Change palette on the fly
    - Reset palettes
    - Disable the API
  - API limitations
- [CSS color themes](https://charting-library-docs.xstaging.tv/latest/customization/styles/CSS-Color-Themes.md)
  - Connect the CSS file
  - Adjust properties on the fly
  - List of CSS custom properties
    - Pop-up menu properties
- [Theme](https://charting-library-docs.xstaging.tv/latest/customization/theme.md)
  - Theme switching
- [Customization precedence](https://charting-library-docs.xstaging.tv/latest/customization/customization-precedence.md)
  - Approaches
  - Example
- [Common issues](https://charting-library-docs.xstaging.tv/latest/customization/customization-issues.md)
  - General troubleshooting
  - Settings are not applied
  - User settings override default ones
  - Theme is not switched

## Saving and loading charts

- [Saving and loading charts](https://charting-library-docs.xstaging.tv/latest/saving_loading.md)
  - Overview
    - Chart layouts
    - Chart templates
    - Indicator templates
    - Drawing templates
    - Implementation
  - Save drawings separately
  - User settings
  - Additional use cases
    - Save charts automatically
    - Restore last saved chart

### REST API

- [Save and load REST API](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-rest-api.md)
  - Overview
  - Use demo storage
  - Storage example
  - Develop your own storage
  - Manage access to saved charts
- [Chart layout methods](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-rest-api/chart-layout-methods.md)
  - List charts
    - Response content
  - Save chart
    - Request body
    - Response content
  - Save as chart
    - Request body
    - Response content
  - Load chart
    - Response content
  - Delete chart
    - Response content
- [Indicator template methods](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-rest-api/indicator-template-methods.md)
  - List indicator templates
    - Response content
  - Save indicator template
    - Request body
    - Response content
  - Load indicator template
    - Response content
  - Delete indicator templates
    - Response content
- [Drawing methods](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-rest-api/drawing-methods.md)
  - Save drawings
    - Request body
    - Response content
  - Load drawings
    - Response content
- [Drawing template methods](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-rest-api/drawing-template-methods.md)
  - List drawing templates
    - Response content
  - Save drawing template
    - Request body
    - Response content
  - Load drawing template
    - Response content
  - Delete drawing template
    - Response content
- [API handlers for saving and loading](https://charting-library-docs.xstaging.tv/latest/saving_loading/save-load-adapter.md)
  - Overview
  - How to implement
  - Examples
    - localStorage
    - In-memory
- [Low-level API for saving and loading](https://charting-library-docs.xstaging.tv/latest/saving_loading/low-level-api.md)
  - Overview
  - How to implement
  - Hide save/load layout buttons
- [Save drawings separately](https://charting-library-docs.xstaging.tv/latest/saving_loading/saving_drawings_separately.md)
  - Overview
    - Key advantages
    - How to enable
    - How to migrate
      - Migration with low-level API
  - Save load adapter (API handlers)
    - Save request context
      - Sharing mode
    - Load request context
    - Handling deletions
  - REST API
    - Save drawings
    - Load drawings
  - Low-level API methods
    - getLineToolsState
    - applyLineToolsState
    - reloadLineToolsFromServer
  - Customizing the chart save method
  - Understanding the LineToolsAndGroupsState interface
- [Save user settings](https://charting-library-docs.xstaging.tv/latest/saving_loading/user-settings.md)
  - Overview
    - Settings list
    - How to store
  - Settings adapter

## Custom indicators

- [Custom indicators](https://charting-library-docs.xstaging.tv/latest/custom_studies.md)
  - Add indicators
  - Indicator object
  - Examples

### Metainfo

- [Metainfo](https://charting-library-docs.xstaging.tv/latest/custom_studies/metainfo.md)
  - Overview
  - Service information
    - _metainfoVersion
    - id
  - Indicator name
    - description
    - shortDescription
  - Data
    - format
    - inputs
    - symbolSource
  - Visual representation
    - plots
    - ohlcPlots
    - bands
    - filledAreas
  - Appearance and visibility
    - defaults
    - styles
    - palettes
    - is_hidden_study
    - is_price_study
    - linkedToSeries
    - overlayScaleMargins
- [Inputs](https://charting-library-docs.xstaging.tv/latest/custom_studies/metainfo/Custom-Studies-Inputs.md)
  - Overview
  - Define a list of input parameters
  - Specify default values
  - Handle input values in the constructor
  - Group inputs
- [Custom indicators defaults](https://charting-library-docs.xstaging.tv/latest/custom_studies/metainfo/Custom-Studies-Defaults.md)
  - Default Styles
    - Line
    - Shapes
      - Note about shape size
    - Chars
    - Arrows
- [Constructor](https://charting-library-docs.xstaging.tv/latest/custom_studies/custom-indicator-constructor.md)
  - Overview
  - init
  - main
    - Data calculations
    - Output values
  - Example
- [PineJS Utility Functions](https://charting-library-docs.xstaging.tv/latest/custom_studies/PineJS-Utility-Functions.md)
  - Functions ported from Pine
    - na(x)
    - nz(x, y)
    - and(expr1, expr2)
    - or(expr1, expr2)
    - not(expr)
    - max(x1, x2, ..., x10)
    - min(x1, x2, ..., x10)
    - pow(base, exponent)
    - abs(x)
    - log(x)
    - log10(x)
    - sqrt(x)
    - sign(x)
    - exp(x)
    - sin(x)
    - cos(x)
    - tan(x)
    - asin(x)
    - acos(x)
    - atan(x)
    - floor(x)
    - ceil(x)
    - round(x)
    - avg(x1, x2, ..., x10)
    - open(context)
    - high(context)
    - low(context)
    - close(context)
    - hl2(context)
    - hlc3(context)
    - ohlc4(context)
    - volume(context)
    - period(context)
    - tickerid(context)
    - year(context)
    - month(context)
    - weekofyear(context)
    - dayofmonth(context)
    - dayofweek(context)
    - hour(context)
    - minute(context)
    - second(context)
    - iff(condition, then, _else)
    - rising(series, length)
    - falling(series, length)
    - rsi(upper, lower)
    - sum(source, length, context)
    - sma(source, length, context)
    - rma(source, length, context)
    - fixnan(current, context)
    - tr(handle_nan, context)
    - atr(length, context)
    - ema(series, length, context)
    - wma(source, length, context)
    - vwma(source, length, context)
    - swma(source, context)
    - lowestbars(source, length, context)
    - lowest(source, length, context)
    - highestbars(source, length, context)
    - highest(source, length, context)
    - cum(x, context)
    - accdist(context)
    - correlation(source_a, source_b, length, context)
    - stoch(source, high, low, length, context)
    - tsi(source, short_length, long_length, context)
    - cross(x, y, context)
    - linreg(source, length, offset)
    - sar(start, inc, max, context)
    - alma(series, length, offset, sigma)
    - change(source)
    - roc(source, length)
    - dev(source, length, context)
    - stdev(source, length, context)
    - variance(source, length, context)
    - percentrank(source, length)
    - dmi(diLength, adxSmoothingLength, context)
  - Functions specific to the library
- [Custom indicators plots](https://charting-library-docs.xstaging.tv/latest/custom_studies/Custom-Studies-Plots.md)
  - Arrows
  - Chars
  - Colorer
  - DataOffset
  - Line
  - Ohlc
  - Shapes
  - BarColorer
  - BgColorer
  - TextColorer
  - OhlcColorer
- [Custom indicators OHLC plots](https://charting-library-docs.xstaging.tv/latest/custom_studies/Custom-Studies-OHLC-Plots.md)
- [Custom indicators examples](https://charting-library-docs.xstaging.tv/latest/custom_studies/Custom-Studies-Examples.md)
  - Requesting Data for Another Ticker
  - Coloring Bars
  - Custom Styles for Every Point
  - Complex Filled Areas
  - Advanced Shapes Use
  - Advanced Colouring Candles
- [Extending the time scale](https://charting-library-docs.xstaging.tv/latest/custom_studies/Studies-Extending-The-Time-Scale.md)
  - Mapping times
    - Precise mapping
    - Continuous mapping
  - Extending the time scale feature
    - For any custom study
    - For Overlay study

## Trading Platform

- [Trading Platform](https://charting-library-docs.xstaging.tv/latest/trading_terminal.md)
  - Overview
  - Trading Platform features
    - Multiple-chart layout
    - Chart trading
    - Depth of Market
    - Watchlist
    - Details
    - News
    - Account Manager
    - Advanced Order Ticket
    - Buy/Sell buttons and lines
    - Japanese chart types
    - Session Volume Profile
    - Drawing templates
    - Building seconds bars from ticks
  - How to migrate from Advanced Charts
  - See also

### Core concepts

- [Core trading concepts](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts.md)
  - Trading components
    - Broker API
    - Trading Host
    - Datafeed API
  - How to enable trading
    - Implement quote methods
    - Connect Broker API
    - Implement Broker API methods
  - How library gets user's data
  - How components work together
    - 1. Order creation
    - 2. Execution update
    - 3. Equity update
  - Implementation example
- [Quotes](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/quotes.md)
  - Overview
  - Provide quotes
- [Orders](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/orders.md)
  - Overview
  - Order types
  - Bracket orders
  - Order statuses
- [Positions](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/positions.md)
  - Overview
  - Handle and display regular positions
  - Handle multiple positions for one symbol
    - Position netting
    - Multiposition
  - Close positions
    - Partial closing
  - Reverse positions
    - Default reversal
    - Native reversal
  - Add brackets
- [Profit and loss](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/profit-and-loss.md)
  - Overview
  - Provide P&L values
    - Through position object
    - Through plUpdate method
  - Handling position netting
  - Display modes and calculation logic
- [Bracket orders](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/brackets.md)
  - Overview
  - UI interactions
  - Order brackets
    - Place order with brackets
      - Example
    - Execute parent order
      - Example
  - Position brackets
    - Add and modify position brackets
      - Example
    - Execute bracket order
      - Example
  - Multiple exit levels
    - Data structure
    - Backward compatibility
    - Limit number of levels
- [Authentication](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/authentication.md)
  - Authentication approaches
    - Before accessing the app
    - Through the top toolbar button
    - Through Account Manager
  - How the library handles login
- [Trading features configuration](https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts/trading-features-configuration.md)
- [Common Broker API issues](https://charting-library-docs.xstaging.tv/latest/trading_terminal/common-issues.md)
  - Timeout issue
  - Buy/Sell buttons don't work
  - Order and position IDs mismatch
  - Empty fields in bracket controls
  - Symbol quantity is overridden
  - P&L in bracket orders shows 0
  - Individual positions are not displayed on the chart

### Account Manager

- [Account Manager](https://charting-library-docs.xstaging.tv/latest/trading_terminal/account-manager.md)
  - Create Account Manager
  - User accounts
  - Account Summary row
    - Watched values
  - Pages
    - Orders and Positions
    - History
    - Notifications log
    - Custom pages
  - Columns
  - Configure behavior
    - Disable Account Manager
    - Hide Account Manager on startup
- [Value formatters](https://charting-library-docs.xstaging.tv/latest/trading_terminal/account-manager/value-formatters.md)
  - Formatter and dataFields dependency
    - Example
  - Built-in formatters
  - Custom formatters
    - Example
- [Multiple accounts](https://charting-library-docs.xstaging.tv/latest/trading_terminal/account-manager/multiple-accounts.md)
- [Order Ticket](https://charting-library-docs.xstaging.tv/latest/trading_terminal/order-ticket.md)
  - Overview
  - Disable Order Ticket
  - Configure order types
  - Change text for quantity units
  - Add custom fields
  - Enable order preview
  - Enable bracket controls
  - Manage ellipsis menu
    - Default settings
    - Brackets settings
    - Order confirmations
    - Get and set settings
  - Enable crypto brackets settings
  - Enable Time in force menu
  - Enable margin meter
  - Implement custom Order Ticket
- [Depth of Market](https://charting-library-docs.xstaging.tv/latest/trading_terminal/depth-of-market.md)
  - Overview
  - Connect widget
    - 1. Provide data
    - 2. Enable the widget
    - Example
  - Display DOM on start
- [News](https://charting-library-docs.xstaging.tv/latest/trading_terminal/news.md)
  - Overview
  - Enable the widget
  - Connect news
    - RSS feed
    - Custom news source
- [Multiple-chart layout](https://charting-library-docs.xstaging.tv/latest/trading_terminal/multiple-chart-layout.md)
  - Overview
  - Layout types
  - Layout reference
    - 2 charts
    - 3 charts
    - 4 charts
    - 5 charts
    - 6 charts
    - 7 charts
    - 8 charts
  - Change the layout programmatically
  - Interact with a certain chart
  - Resize charts
  - Remove hidden charts
- [Session Volume Profile](https://charting-library-docs.xstaging.tv/latest/trading_terminal/session-volume-profile.md)
  - Overview
    - Chart type
    - Indicator
  - Inputs
  - Customization
  - Datafeed requirements
    - Volume
    - Supported resolutions
    - Detailed data
  - History and performance
    - history_sessions
    - max_total_rows
- [Trading primitives](https://charting-library-docs.xstaging.tv/latest/trading_terminal/Trading-Primitives.md)
  - Overview
  - Create trading primitive
  - Show and hide a primitive
  - Customize appearance
    - Styling reference
      - Colors
      - Fonts
      - Line Styles
- [Watchlist](https://charting-library-docs.xstaging.tv/latest/trading_terminal/Watch-List.md)
  - Overview
  - Enable the widget
  - Watchlist API
    - Symbol resolution
    - Create multiple watchlists
    - Retrieve watchlist data
  - Add sections
  - Store watchlist items
  - Display logos

## Releases

- [Update the library](https://charting-library-docs.xstaging.tv/latest/releases/Update-Library.md)
  - 1. Check a library version
  - 2. Review release notes
  - 3. Download a new version
  - 4. Unzip an archive
  - 5. Run the new version
  - 6. Implement new features
- [Release Notes](https://charting-library-docs.xstaging.tv/latest/releases/release-notes.md)
  - Version 32.2.0
    - New Features \
      - Trading Platform only \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
      - Trading Platform only \
  - Version 32.1.0
    - New Features \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 32.0.0
    - Breaking Changes \
    - New Features \
      - Trading Platform only \
    - Improvements \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 31.2.0
    - New Features \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 31.1.0
    - New Features \
    - Improvements \
    - Bug Fixes \
      - Trading Platform only \
  - Version 31.0.0
    - New Features \
      - Trading Platform only \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 30.3.0
    - New Features \
    - Bug Fixes \
      - Trading Platform only \
  - Version 30.2.0
    - New Features \
      - Trading Platform only \
    - Improvements \
    - Bug Fixes \
    - Documentation \
  - Version 30.1.0
    - New Features \
    - Improvements \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 30.0.0
    - Breaking Changes \
      - Trading Platform only \
    - New Features \
      - Trading Platform only \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 29.6.0
    - Improvements \
  - Version 29.5.0
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
  - Version 29.4.0
    - New Features \
      - Trading Platform only \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
      - Trading Platform only \
    - Documentation \
  - Version 29.3.0
    - New Features \
    - Improvements \
    - Bug Fixes \
    - Documentation \
  - Version 29.2.0
    - New Features \
      - Trading Platform only \
    - Improvements \
    - Bug Fixes \
    - Documentation \
  - Version 29.1.0
    - New Features \
      - Trading Platform only \
    - Improvements \
    - Documentation \
  - Version 29.0.0
    - Breaking Changes \
      - Trading Platform only \
    - New Features \
      - Trading Platform only \
    - Improvements \
      - Trading Platform only \
    - Bug Fixes \
    - Documentation \
  - Version 28.5.0
  - Version 28.4.0
  - Version 28.3.0
  - Version 28.2.0
  - Version 28.1.0
  - Version 28.0.0
  - Version 27.006
  - Version 27.005
  - Version 27.004
  - Version 27.003
  - Version 27.002
  - Version 27.001
  - Version 27
  - Version 26.004
  - Version 26.003
  - Version 26.002
  - Version 26.001
  - Version 26
  - Version 25.002
  - Version 25.001
  - Version 25
  - Version 24.004
  - Version 24.003
  - Version 24.002
  - Version 24.001
  - Version 24
  - Version 23
  - Version 22
  - Version 21

## Resources

- [Best practices](https://charting-library-docs.xstaging.tv/latest/resources/Best-Practices.md)
  - Separate additional features from the library
  - Choose an appropriate data connection approach
  - Provide correct amount of data
  - Consider the chart's size
  - Localize your chart
  - Enable debug logs during development
  - If you face issues
  - Avoid using undocumented features
  - Avoid using demo datafeed on a production website
  - Speed up load times
  - Set minimum expiration time for charting_library.js
- [Frequently Asked Questions](https://charting-library-docs.xstaging.tv/latest/resources/Frequently-Asked-Questions.md)
  - What is the difference between Widgets, Advanced Charts, and Trading Platform?
  - Why Advanced Charts / Trading Platform differs from tradingview.com?
  - How to switch from Advanced Charts to Trading Platform?
  - How to connect data and add new symbols?
  - Why is my data missing or displayed incorrectly?
  - How to specify time properties within the library?
  - Can I use Pine Script® for creating and editing indicators?
  - Does TradingView have access to any user data through the integration?
  - Does the library set cookies?
  - Unsupported features
- [Glossary](https://charting-library-docs.xstaging.tv/latest/resources/glossary.md)
  - Trading terms
    - Bracket order
    - Execution
    - Individual position
    - Limit order
    - Limit price
    - Market order
    - Net position
    - Order
    - Order duration
    - Pip
    - Position
    - Position netting
    - Quotes
    - Stop-loss order
    - Stop order
    - Stop price
    - Take-profit order
    - Tick
  - Technical terms
    - Bar spacing
    - Datafeed
    - Date range
    - Featureset
    - Pane
    - Plot
    - Series
    - Source symbol
    - Spread operators

## Tutorials

- [Overview](https://charting-library-docs.xstaging.tv/latest/tutorials.md)

### Tutorials

- [Tutorials](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials.md)
- [How to enable debug mode](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/enable-debug-mode.md)
  - Enable debug mode for data connection
  - Enable debug mode for trading
  - What's next?

#### Connect data via Datafeed API

- [Connect data via datafeed API](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial.md)
  - Overview
  - Prerequisites
    - Get repository access
    - Use external data source
    - See results on the fly
- [Set up the widget](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/Widget-Setup.md)
  - Overview
  - 1. Install the library runtime
  - 2. Add a container
  - 3. Create the bootstrap
  - Step 4. Build the widget options
  - Next steps
  - Complete code
- [Implement datafeed](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/Datafeed-Implementation.md)
  - Overview
  - How the datafeed works
  - 1. Add the Binance helpers
  - 2. Map resolutions to Binance intervals
  - 3. Create the datafeed and implement onReady
  - 4. Load the symbol catalog
  - 5. Implement searchSymbols
  - 6. Implement resolveSymbol
  - 7. Implement getBars
  - 8. (Optional) Add chart marks
  - Result
  - Next steps
  - Complete code
- [Implement streaming](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/Streaming-Implementation.md)
  - Overview
  - How realtime updates work
  - 1. Implement subscribeBars/unsubscribeBars
  - 2. Set up the shared socket
  - 3. Subscribe and unsubscribe with reference counting
  - 4. Handle incoming messages
  - 5. Reconnect safely
  - Result
  - Complete code
  - What's next?

##### Extend to TP

- [Extend the datafeed to Trading Platform](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/extend-to-trading-platform.md)
  - Overview
  - What is different about Trading Platform
  - Install the Trading Platform runtime
  - The trading page entry point
  - Where to go next
- [Broker integration](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/extend-to-trading-platform/broker-integration.md)
  - Overview
  - How broker wiring works
  - 1. Load the broker sample
  - 2. Describe trading capabilities with broker_config
  - 3. Build the broker factory
  - 4. Pass broker options into the widget
  - Result
  - Complete code
  - Next steps
- [Quotes and the DOM](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/extend-to-trading-platform/quotes-and-dom.md)
  - Overview
  - 1. Provide quotes
    - 1.1. Build a quote from Binance ticker data
    - 1.2. Seed snapshots from REST
    - 1.3. Implement quote methods
    - 1.4. Stream quote updates
  - 2. Connect Depth of market
    - 2.1. Implement subscribeDepth/unsubscribeDepth
    - 2.2. Connect the live Binance depth stream
    - 2.3. Push live or synthetic depth
  - Result
  - Complete code
  - Next steps
- [Save/load, news, and watchlist](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement_datafeed_tutorial/extend-to-trading-platform/save-load-news-watchlist.md)
  - Overview
  - 1. Implement save/load with a localStorage adapter
    - 1.1. Register the adapter
    - 1.2. Understand what the adapter must implement
    - 1.3. Save and load charts
    - 1.4. Save drawings separately
    - 1.5. Trigger auto-save
  - 2. Custom price alerts
    - 2.1. Format prices with the chart's formatter
    - 2.2. Build the alert controller
    - 2.3. Notify through the broker host
  - 3. News via a same-origin RSS proxy
    - 3.1. Define the feed
    - 3.2. Proxy and sanitize the feed server-side
  - 4. Watchlist
  - 5. Toolbar
  - Result
  - Complete code
  - What's next?

#### Implement Broker API

- [Implement Broker API](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement-broker-api.md)
  - Overview
  - Before you start
  - Class scaffold
- [Enable trading UI](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement-broker-api/enable-ui.md)
  - Overview
  - 1. Set up broker in Widget Constructor
  - 2. Define broker connection status
  - 3. Provide user account metadata
  - 4. Set current account
  - 5. Display Account Manager details
  - 6. Add actions to chart context menu actions
  - 7. Enable trading buttons
  - 8. Return symbol information
- [Manage orders](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement-broker-api/manage-orders.md)
  - Overview
  - 1. Store and return orders
  - 2. Return positions and executions
  - 3. Place orders
  - 4. Modify orders
  - 5. Cancel orders
  - Full implementation example
- [Next steps](https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement-broker-api/next-steps.md)
  - Ready to go further?

### How-to guides

- [How-to guides](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides.md)

#### Create a custom indicator

- [How to create a custom indicator](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/create-custom-indicator.md)
  - Before you start
  - Tutorial structure
  - Add a custom indicator to the library
- [Implement metainfo](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/create-custom-indicator/metainfo-implementation.md)
  - 1. Specify service information
  - 2. Specify indicator name
  - 3. Position on the chart
  - 4. Specify visual representation
    - plots
    - styles
    - Style defaults
  - 5. Specify data
    - Data format
    - inputs
    - Input defaults
  - Complete code
- [Implement constructor](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/create-custom-indicator/constructor-implementation.md)
  - 1. Handle method arguments
  - 2. Call setMinimumAdditionalDepth
  - 3. Call new_var
  - 4. Calculate data
    - For SMA
    - For Smoothing Line
  - 5. Return values
  - Complete code
  - Tutorial results
- [How to create custom page in Account Manager](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/create-custom-page-in-account-manager.md)
  - Before you start
  - 1. Set up a delegate in constructor
  - 2. Initialize the first item
  - 3. Create a function for data updates
  - 4. Define custom page
  - 5. Implement chart loading on click
  - What's next?
- [How to add custom button to top toolbar](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/add-custom-button-to-top-toolbar.md)
  - Before you start
  - Add a dropdown button
  - Add a custom button
  - What's next?
- [How to implement a server to host snapshots](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/implement-snapshots-server.md)
  - Before you start
  - Create a server
    - 1. Import required modules
    - 2. Initialize app and create uploads folder
    - 3. Configure Multer
    - 4. Serve uploaded files
    - 5. Handle upload endpoint
    - 6. Start the server
  - How to use the server
  - How to test the server
  - How to connect the server to the library
  - Complete code
- [How to customize mark tooltips](https://charting-library-docs.xstaging.tv/latest/tutorials/how-to-guides/customize-mark-tooltips.md)
  - How it works
  - Before you start
  - 1. Create a minimal component
  - 2. Load the component
  - 3. Return marks with a custom tooltip
  - Full example: a JSON payload renderer
  - Adapt to the chart theme
  - Customize bar mark tooltips
    - Reveal tooltips on click
  - Security considerations
  - Try it out
- [Framework integrations](https://charting-library-docs.xstaging.tv/latest/tutorials/framework-integrations.md)
- [Online playgrounds](https://charting-library-docs.xstaging.tv/latest/tutorials/Online-Editors.md)
  - Starter templates
    - CodePen
    - JSFiddle
  - Important limitations
  - How to set up
    - Using latest version
    - Using specific version

## Type Definitions

- [Charting Library API](https://charting-library-docs.xstaging.tv/charting_library.d.ts)
- [Datafeed API](https://charting-library-docs.xstaging.tv/datafeed-api.d.ts)
- [Broker API](https://charting-library-docs.xstaging.tv/broker-api.d.ts)

## Full Context

- [Complete documentation bundle (single file)](https://charting-library-docs.xstaging.tv/charting-library-context.txt)
