# Trading Platform

## Overview

[Trading Platform](https://github.com/tradingview/trading_platform "The repository is private.")&nbsp;🔐&nbsp;(access is [restricted](https://charting-library-docs.xstaging.tv/latest/quick-start.md#1-get-access "Click to open the 'Getting Access' section.")) is a standalone client-side solution that provides trading capabilities. Trading Platform is based on [Advanced Charts](https://charting-library-docs.xstaging.tv/latest/introduction.md) and contains all its [features](https://charting-library-docs.xstaging.tv/latest/introduction.md#key-features).

If you already use Advanced Charts and want to get started with Trading Platform, refer to the [How to migrate from Advanced Charts](#how-to-migrate-from-advanced-charts) guide. Otherwise, you should refer to [Quick start](https://charting-library-docs.xstaging.tv/latest/quick-start.md) to start the implementation from scratch.

## Trading Platform features

### Multiple-chart layout

Users can display up to 8 charts on one layout using the *Select Layout* button on the top toolbar.
Charts can be synchronized by a symbol, [interval (resolution)](https://charting-library-docs.xstaging.tv/latest/ui_elements/Resolution.md), crosshair, time, and [date range](https://charting-library-docs.xstaging.tv/latest/resources/glossary.md#date-range).

Selecting multiple-chart layouts is enabled by default.
If you want to disable this option,
add the [`header_layouttoggle`] and [`support_multicharts`] featuresets to the [`disabled_features`] array of the [Widget Constructor].

### Chart trading

Orders, positions, potential income and loss are displayed on the chart in Trading Platform. Users can place orders right from the chart. To enable chart trading, implement the [Broker API]. Then use the [`broker_factory`](../api/interfaces/Charting_Library.TradingTerminalWidgetOptions.md#broker_factory) method in [Widget Constructor] to pass the implementation to the library.

### Depth of Market

The Depth of Market (DOM) widget supports frequent data updates and shows the volume for each price.
Data is displayed in static mode.
This means that the price series is fixed, while the current price moves within, above, or below the designated range.

Users can also place orders right from the widget.
Refer to [Depth of Market](https://charting-library-docs.xstaging.tv/latest/trading_terminal/depth-of-market.md) for more information.

### Watchlist

The Watchlist widget allows users to track their favorite symbols and switch quickly between the corresponding charts. Users can create multiple lists and sort symbols by their names, price changes, and volumes. Refer to [Watchlist](https://charting-library-docs.xstaging.tv/latest/trading_terminal/Watch-List.md) for more information.

![Watchlist widget](/img/watchlist-widget.png)

### Details

The Details widget displays a certain symbol's information such as bid/ask prices, trading hours, and a price range during the day. To display the widget, you should enable the [`details`](../api/interfaces/Charting_Library.WidgetBarParams.md#details) property in the [`widgetbar`](../api/interfaces/Charting_Library.TradingTerminalWidgetOptions.md#widgetbar) settings. The widget requires quote data that you should send using the corresponding methods in the [Datafeed API](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/trading-platform-methods.md#getquotes) or [UDF](https://charting-library-docs.xstaging.tv/latest/connecting_data/UDF.md#quotes).

![Details widget](/img/details-widget.png)

### News

The News widget displays news on a certain symbol. You can fetch news using RSS or the library's API. Refer to [News](https://charting-library-docs.xstaging.tv/latest/trading_terminal/news.md) for more information.

![News widget](/img/news-widget.png)

### Account Manager

The Account Manager (Trading Panel) widget displays information from your broker account, such as orders, positions, an account balance, and more. Users can manage their orders and positions from the widget. You can add custom tabs and tables to the widget. Refer to [Account Manager](https://charting-library-docs.xstaging.tv/latest/trading_terminal/account-manager.md) for more information.

### Advanced Order Ticket

The Advanced Order Ticket dialog allows users to place different types of orders, including trailing stop, stop-loss, bracket orders, and more. To open this dialog, users should click the _Trade_ button in [_Account Manager_](#account-manager).

You can add custom fields, enable an order preview, or implement your own custom Order Ticket.
Refer to [Order Ticket](https://charting-library-docs.xstaging.tv/latest/trading_terminal/order-ticket.md) for more information.

### Buy/Sell buttons and lines

The Buy/Sell buttons are displayed next to the [legend](https://charting-library-docs.xstaging.tv/latest/ui_elements/Legend.md). Click the buttons to open [Order Ticket](#advanced-order-ticket) and place orders instantly. Trading Platform also supports bid/ask price lines on the chart.

### Japanese chart types

Trading Platform includes all chart types available in Advanced Charts and additional types listed below:

- Renko
- Point-and-Figure
- Line Break
- Kagi

### Drawing templates

Trading Platform allows users to create drawing templates. For more information, refer to the [Drawings](https://charting-library-docs.xstaging.tv/latest/ui_elements/drawings.md#templates) article.

### Building seconds bars from ticks

Trading Platform can build seconds bars from ticks. For more information, refer to [`build_seconds_from_ticks`].

## How to migrate from Advanced Charts

If you want to migrate from Advanced Charts to Trading Platform, you should replace the `charting_library` folder in your project with the same folder from the [trading_platform](https://github.com/tradingview/trading_platform "The repository is private.")&nbsp;🔐&nbsp;(access is [restricted](https://charting-library-docs.xstaging.tv/latest/quick-start.md#1-get-access "Click to open the 'Getting Access' section.")) repository.
At this point, you will have additional chart types (Renko, Point-and-Figure, Line Break, and Kagi), the synchronized multiple-chart layout, and an empty [Account Manager](https://charting-library-docs.xstaging.tv/latest/trading_terminal/account-manager.md).

![Default Trading Platform features](/img/tt_default_features.png)

To enable the [Watchlist](#watchlist), [Details](#details), [Order Ticket](#advanced-order-ticket), [News](#news), and [Depth of Market](#depth-of-market) widgets, you need to implement the Datafeed API methods related to [trading](https://charting-library-docs.xstaging.tv/latest/connecting_data/datafeed-api/trading-platform-methods.md). You should also enable the corresponding [featuresets](https://charting-library-docs.xstaging.tv/latest/customization/Featuresets.md#trading-platform) or the [Widget Constructor](https://charting-library-docs.xstaging.tv/latest/configuration/Widget-Constructor.md#trading-platform-parameters) parameters. If you want to add [trading capabilities](#chart-trading), you should implement the [Broker API]. The part of the Trading Platform implementation is shown in the [`trading.html`](https://github.com/tradingview/trading_platform/blob/master/trading.html "The repository is private.")&nbsp;🔐&nbsp;(access is [restricted](https://charting-library-docs.xstaging.tv/latest/quick-start.md#1-get-access "Click to open the 'Getting Access' section.")) file.

Pay attention that data for the legend is requested in the [`getQuotes`](../connecting_data/datafeed-api/trading-platform-methods.md#getquotes) method on the **[mobile version](https://charting-library-docs.xstaging.tv/latest/mobile_specifics.md) of Trading Platform**. If this method is not implemented, you may see the `N/A` values instead of prices.

## See also

For more information on how to integrate Trading Platform, refer to the following articles:

- [Core trading concepts]: learn about the trading components, how they integrate into the chart widget, and how they work together.
- [Implement Broker API]: follow the step-by-step tutorial that walks you through implementing the required methods to enable basic trading functionality.
- [Widget Constructor](https://charting-library-docs.xstaging.tv/latest/api/interfaces/Charting_Library.TradingTerminalWidgetOptions): check the Widget Constructor parameters specific to Trading Platform.

[Broker API]: https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts.md#broker-api
[Core trading concepts]: https://charting-library-docs.xstaging.tv/latest/trading_terminal/trading-concepts.md
[`disabled_features`]: https://charting-library-docs.xstaging.tv/latest/api/interfaces/Charting_Library.ChartingLibraryWidgetOptions#disabled_features
[`header_layouttoggle`]: https://charting-library-docs.xstaging.tv/latest/customization/Featuresets.md#header_layouttoggle
[Implement Broker API]: https://charting-library-docs.xstaging.tv/latest/tutorials/tutorials/implement-broker-api.md
[`support_multicharts`]: https://charting-library-docs.xstaging.tv/latest/customization/Featuresets.md#support_multicharts
[Widget Constructor]: https://charting-library-docs.xstaging.tv/latest/configuration/Widget-Constructor.md
[`build_seconds_from_ticks`]: https://charting-library-docs.xstaging.tv/latest/api/interfaces/Charting_Library.LibrarySymbolInfo#build_seconds_from_ticks

---

## Sitemap

- [All documentation pages](https://charting-library-docs.xstaging.tv/llms.txt)
- [Full page map with headings](https://charting-library-docs.xstaging.tv/docs_map.md)
