Featuresets
Featureset is a string literal that allows showing or hiding UI elements and changing the chart's behavior.
How to use
To enable or disable a feature, include it in the enabled_features
or disabled_features
array of the Widget Constructor object.
<script>
new TradingView.widget({
container: 'chartContainer',
locale: 'en',
library_path: 'charting_library/',
datafeed: new Datafeeds.UDFCompatibleDatafeed("https://demo-feed-data.tradingview.com"),
symbol: 'AAPL',
interval: '1D',
enabled_features: ["show_spread_operators"],
disabled_features: ["items_favoriting", "show_object_tree"]
});
</script>
This code sample enables the spread operators in the Symbol Search dialog and disables Add to favorites and Show Object Tree buttons in the UI.
Simple and complex featuresets
Featuresets can be simple and complex where complex consists of the simple ones. Note that disabling complex featureset disables all its simple parts as well.
In the table below, simple featuresets are nested within complex featuresets using indentation.
Featureset | Default state | Description |
---|---|---|
context_menus # | On | Shows any context menu when users right-click anywhere in the UI. |
legend_context_menu # | On | Shows the context menu when users right-click the Legend widget. |
pane_context_menu # | On | Shows the context menu when users right-click the chart. |
scales_context_menu # | On | Shows the context menu when users right-click either Price Scale or Time Scale. |
edit_buttons_in_legend # | On | Shows buttons on the Legend widget. When disabled, hides all buttons except the ellipsis menu. |
delete_button_in_legend # | On | Shows the Remove button on the Legend widget. |
format_button_in_legend # | On | Shows the Settings button on the Legend widget. |
show_hide_button_in_legend # | On | Shows the Hide and Show buttons on the Legend widget. |
header_widget # | On | Shows the header panel and Symbol Search on the chart. |
header_chart_type # | On | Shows the chart type button on the header panel. |
header_compare # | On | Shows the Compare or Add Symbol button on the header panel. |
header_fullscreen_button # | On | Shows the Fullscreen mode button on the header panel. |
header_indicators # | On | Shows the Indicators button on the header panel. |
header_resolutions # | On | Shows the Resolution button on the header panel. |
show_interval_dialog_on_key_press # | On | Opens the Change Interval dialog when users type digits or press the comma key. |
header_screenshot # | On | Shows the Take a snapshot button on the header panel. |
header_settings # | On | Shows the Chart settings button on the header panel. |
header_symbol_search # | On | Shows the Symbol Search button on the header panel. |
header_undo_redo # | On | Shows the Undo/Redo buttons on the header panel. |
header_quick_search # | On | Shows the Quick search button on the header panel. |
symbol_search_hot_key # | On | Allows opening Symbol Search using the typing keys. |
use_localstorage_for_settings # | On | Allows storing chart properties and user settings, including favorites, in the browser's localStorage . Refer to the Customization precedence article to learn more about the application order of localStorage among other approaches. |
save_chart_properties_to_local_storage # | On | Can be disabled to forbid storing chart properties in the localStorage while allowing to save other properties. The other properties include favorites in Advanced Charts, and Watchlist symbols and some panel states in Trading Platform. |
Visibility of controls and visual elements
Featureset | Default state | Description |
---|---|---|
adaptive_logo # | On | Shows the Chart by TradingView text on small-screen devices. |
always_show_legend_values_on_mobile # | Off | Shows legend values when on mobile. Available from version 26. |
border_around_the_chart # | On | Adds a 2px padding to the chart. |
chart_style_hilo # | Off | Adds High-Low option to the chart style controls. |
chart_style_hilo_last_price # | Off | Enables last price line and price axis label on the High-Low chart style. Available from version 24. |
chart_property_page_right_margin_editor # | On | Shows the Right margin field in Settings → Appearance |
chart_property_page_scales # | On | Allows Overrides for the Price Scale. |
clear_price_scale_on_error_or_empty_bars # | On | Clears the pane price scales when the main series has an error or no bars. Available from version 25. |
compare_symbol_search_spread_operators # | Off | Shows the spread operators in the Compare symbol dialog. Note that you must also enable show_spread_operators . |
control_bar # | On | Shows the Zoom In/Out and Scroll to the Left/Right navigation buttons at the bottom of the chart. |
countdown # | On | Shows the Countdown to bar close option on the Price Scale. |
display_data_mode # | Off | Enables an icon and the Data is delayed section in the Legend. |
display_legend_on_all_charts # | Off | Display the Legend widget on all diagrams regardless of the crosshair synchronization. |
display_market_status # | On | Shows the market status on the Legend widget. |
dont_show_boolean_study_arguments # | Off | Shows true and false indicator arguments. |
go_to_date # | On | Shows the Go to option that allows jumping to a particular bar. |
header_saveload # | On | Shows the Save layout and Load layout buttons (the feature is not part of the header_widget featureset). |
hide_image_invalid_symbol # | Off | Hides the image that is shown to illustrate an invalid symbol. |
hide_last_na_study_output # | Off | Shows last N/A indicator output data. |
hide_left_toolbar_by_default # | Off | Shows left toolbar when a user opens the chart for the first time. |
hide_main_series_symbol_from_indicator_legend # | On | Hides the optional symbol input value from the indicator legend if the Main chart symbol option is selected. |
hide_price_scale_global_last_bar_value # | Off | Hides the global last price label on the Price Scale if the last bar is outside of the visible range. |
hide_exponentiation_spread_operator # | Off | Shows the exponentiation spread operator (^) in the Symbol Search dialog. |
hide_reciprocal_spread_operator # | Off | Shows reciprocal spread operator (1/x) in the Symbol Search dialog. |
hide_object_tree_and_price_scale_exchange_label # | Off | Hides the exchange label from the displayed label. |
hide_resolution_in_legend # | Off | Shows the interval (D, 2D, W, M, etc.) in the chart legend and the data window. |
hide_unresolved_symbols_in_legend # | Off | Shows unresolved symbols in the chart legend and the data window. |
items_favoriting # | On | Shows the Add to favorites icon for chart types, drawings, indicators, and resolutions. |
left_toolbar # | On | Shows the Drawings toolbar on the left panel. |
legend_widget # | On | Shows the Legend widget on the top-left corner of any chart. |
main_series_scale_menu # | On | Shows the Settings button in the right-bottom corner of the chart. |
object_tree_legend_mode # | On | Shows the Show object tree button in the legend at a small width. |
pricescale_currency # | Off | Shows the Currency context menu in Chart Settings → Scales. The menu allows selecting the visibility of the currency in which the instrument is traded on the price scale. Refer to the Instrument currency section for more information. |
pricescale_unit # | Off | Shows the Unit context menu in Chart Settings → Scales. The menu allows selecting the visibility of the unit in which the instrument is traded on the Price Scale. |
pre_post_market_sessions # | Off | Enables pre- and post-market session support. For more information, refer to Extended sessions. Available from version 24. |
property_pages # | On | Shows all Settings pages. |
popup_hints # | On | Shows pop-up hints about possible mouse/shortcut/UI actions. |
remove_library_container_border # | On | Sets the border style to 0px and padding to 1px. |
scales_date_format # | On | Shows the Date format selector in Chart settings. |
scales_time_hours_format # | On | Shows the Time hours format selector in Chart settings. Available from version 24. |
show_chart_property_page # | On | Enables the Chart settings page. |
show_average_close_price_line_and_label # | Off | Shows the visibility settings of the label and the average close price line. |
show_dom_first_time # | Off | Shows the DOM panel when a user opens the chart for the first time. |
show_exchange_logos # | Off | Shows logos for the exchanges within the Symbol Search dialog. Available from version 25. |
show_right_widgets_panel_by_default # | On | Opens the right widget toolbar on the first launch. |
show_symbol_logos # | Off | Shows logos for the symbols within Symbol Search and the Watchlist widget. Available from version 25. |
show_symbol_logo_for_compare_studies # | On | Shows the symbol's logo within the legend for compare studies. Note that you must also enable show_symbol_logos and show_symbol_logo_in_legend . Available from version 26. |
show_symbol_logo_in_legend # | On | Display the main symbol's logo within the Legend. Note that you must also enable show_symbol_logos . Available from version 26. |
show_object_tree # | On | Shows the Show Object Tree button on the left or right panel depending on the product and configuration. |
show_percent_option_for_right_margin # | Off | Shows the option to specify the default right margin in percentage in the Appearance → Chart settings dialog. |
show_spread_operators # | Off | Shows the spread operators in the Symbol Search dialog. |
show_zoom_and_move_buttons_on_touch # | Off | On touch devices, shows the zoom and move buttons at the bottom of the chart. |
snapshot_trading_drawings # | Off | Includes orders, positions, and executions in the screenshot. |
source_selection_markers # | On | Enables selection markers for series and indicators. |
studies_symbol_search_spread_operators # | Off | Shows the spread operators for Indicators. Note that you must also enable show_spread_operators . |
symbol_info # | On | Shows the Symbol Info option on the Legend widget. |
symbol_info_long_description # | Off | Enables long symbol descriptions to be shown in the main series and compare studies legends if provided in the symbol info data. |
symbol_info_price_source # | Off | Shows symbol price source in the main series and Compare indicator legends. You should also provide the price_source_id and price_sources properties in the LibrarySymbolInfo object. |
timeframes_toolbar # | On | Shows the Time Frame toolbar at the bottom of the chart. |
timezone_menu # | On | Shows the Time zone context menu from the price scale Settings. |
use_na_string_for_not_available_values # | Off | Shows a literal "N/A" for not available values instead of "∅". Available from version 24. |
Elements placement
Featureset | Default state | Description |
---|---|---|
move_logo_to_main_pane # | Off | Places the logo on the main series pane instead of the bottom pane. |
Behavior
Featureset | Default state | Description |
---|---|---|
accessibility # | On | Enables accessibility features. Adds a keyboard shortcut which turns on keyboard navigation (Alt + Z). |
accessible_keyboard_shortcuts # | Off | Changes the keyboard navigation shortcut from Alt + Z to Tab. Refer to Keyboard navigation for more information. Available from version 27. |
aria_crosshair_price_description # | Off | Announces, via the screen reader, the price when the crosshair is moved on the chart. Currently only supported for the English language. Available from version 27. |
aria_detailed_chart_descriptions # | Off | Generates a more detailed ARIA description of the chart for screen readers when the active chart is changed by the user. The more detailed description includes a brief description of the price values for the main series. ARIA descriptions are currently only provided for the English language. You can use the custom_chart_description_function constructor option if you wish to add support for additional languages. Available from version 27. |
auto_enable_symbol_labels # | On | Shows the symbol name label when comparing symbols. |
axis_pressed_mouse_move_scale # | On | Enables axis scaling with the left mouse button pressed. |
chart_template_storage # | Off | Enables saving/loading chart templates. To store chart templates, implement the logic for API handlers. Available from version 25. |
chart_scroll # | On | Enables chart scrolling. |
chart_zoom # | On | Enables chart zooming. |
charting_library_debug_mode # | Off | Enables logs. |
confirm_overwrite_if_chart_layout_with_name_exists # | Off | By default, many chart layouts can be saved with the same name. If this feature is enabled, the library will prompt to confirm overwriting chart layouts with the same name when saving, renaming, or cloning (Save as). |
create_volume_indicator_by_default # | On | Adds the Volume indicator upon the chart initialization. |
create_volume_indicator_by_default_once # | On | Prevents the Volume indicator from being recreated when an instrument or a resolution is switched. |
constraint_dialogs_movement # | On | Keeps the dialogs within the chart. |
cropped_tick_marks # | On | Shows partially visible price labels on price axis. |
custom_resolutions # | Off | Allows adding custom resolutions in the UI. |
datasource_copypaste # | On | Enables copying of drawings and indicators. |
determine_first_data_request_size_using_visible_range # | Off | By default, the chart requests a small, fixed number of bars for the initial data request when the chart is first created. If this feature is enabled, the library will calculate the request size based on the number of bars that will be visible on the chart. |
disable_resolution_rebuild # | Off | Shows bar time exactly as provided by the datafeed, without adjustments. For more information, refer to Resolution. |
end_of_period_timescale_marks # | Off | Toggles the timeline marks to display the bar's end time. |
fix_left_edge # | Off | Prevents scrolling to the left of the first historical bar. |
header_in_fullscreen_mode # | Off | Enables the header widget DOM element in the full screen mode |
hide_price_scale_if_all_sources_hidden # | Off | Hides the price scale if all indicators or series attached to the price scale are hidden. Available from version 25. |
horz_touch_drag_scroll # | On | Enables the chart to handle the horizontal pointer movements on touch screens. In this case, the webpage is not scrolled. If disabled, the webpage is scrolled instead. Note that if the user starts scrolling the chart vertically or horizontally, scrolling is continued in any direction until the user releases the finger. |
iframe_loading_compatibility_mode # | Off | Enables alternative loading mode for the library, which can be used to support older browsers and a few non-standard browsers. |
insert_indicator_dialog_shortcut # | On | Enables the Open indicator shortcut (/). |
legend_inplace_edit # | On | Enables in-place editing of indicators and series in the Legend. Available from version 27. |
lock_visible_time_range_on_resize # | Off | Prevents changing visible time area on chart resizing. |
lock_visible_time_range_when_adjusting_percentage_right_margin # | Off | Lock the visible range when adjusting the percentage right margin via the settings dialog. This applies when the chart is already at the current default margin position. |
low_density_bars # | Off | Allows zooming in to one bar in the viewport. |
mouse_wheel_scale # | On | Enables series scaling with a mouse wheel. |
mouse_wheel_scroll # | On | Enables chart scrolling with a horizontal mouse wheel. |
no_min_chart_width # | Off | Disables the minimum chart width limit. |
pinch_scale # | On | Enables series scaling with pinch/zoom gestures. This feature is supported on touch devices only. |
pressed_mouse_move_scroll # | On | Enables chart scrolling with the left mouse button pressed. |
request_only_visible_range_on_reset # | Off | When the chart data is reset, this featureset enables re-requesting the data for just the visible range, instead of the entire range of the existing loaded data. Available from version 25. |
right_bar_stays_on_scroll # | On | Determines the behavior of the Zoom feature: the bar under the mouse cursor stays in the same place if this feature is disabled |
save_shortcut # | On | Enables the Save chart layout shortcut (Ctrl + S). |
saveload_separate_drawings_storage # | Off | Enables an alternative saving and loading mode for the library. This mode saves the state of the drawings separately from the chart layout. Available from version 27. |
seconds_resolution # | Off | Enables the support of resolutions in seconds. |
secondary_series_extend_time_scale # | Off | Allows an additional series to extend the time scale. |
shift_visible_range_on_new_bar # | On | If disabled, adding a new bar zooms the chart out preserving the first visible point. Otherwise, when a new bar appears, the chart is scrolled one point to the left. |
side_toolbar_in_fullscreen_mode # | Off | Enables the Drawings toolbar in the full screen mode. |
studies_extend_time_scale # | Off | Enables custom indicators to extend the time scale if canExtendTimeScale is set to true in the indicator's metainfo. Available from version 26. |
study_templates # | Off | Enables a button in the header to load/save Indicator template. |
study_symbol_ticker_description # | Off | Applies the symbol display mode (ticker/description) to the indicator inputs in the status line. |
study_overlay_compare_legend_option # | Off | Applies the symbol display mode (ticker/description) to overlay/compare indicators in the status line. |
tick_resolution # | Off | Enables the support of resolutions in ticks. |
two_character_bar_marks_labels # | Off | Allows displaying up to two characters in bar marks. The default behavior is to only display one character. |
uppercase_instrument_names # | On | When disabled, this feature allows a user to enter case-sensitive symbols. |
use_last_visible_bar_value_in_legend # | Off | By default, the legend shows the most recent "global" bar value. When this featureset is enabled, the rightmost bar in the visible range is used instead. Available from version 25. |
vert_touch_drag_scroll # | On | Enables the chart to handle the vertical pointer movements on touch screens. In this case, the webpage is not scrolled. If disabled, the webpage is scrolled instead. Note that if the user starts scrolling the chart vertically or horizontally, scrolling is continued in any direction until the user releases the finger. |
volume_force_overlay # | On | Places the Volume indicator on the same pane with the main series. |
Trading Platform
info
These featuresets are only available in Trading Platform.
Featureset | Default state | Description |
---|---|---|
add_to_watchlist # | On | Enables the Add symbol to Watchlist option in the menu. |
always_pass_called_order_to_modify # | Off | If a bracket order is modified, the terminal passes its parent order to modifyOrder . The featureset disables this behavior. |
buy_sell_buttons # | On | Shows the Buy/Sell buttons in the Legend. |
broker_button # | On | Shows the Broker button () in the Legend. |
chart_crosshair_menu # | On | Shows the Plus button on the Price Scale for quick trading. |
chart_hide_close_position_button # | Off | Hides the close button for positions. |
chart_hide_close_order_button # | Off | Hides the close button for orders. |
chart_property_page_trading # | On | Shows the Trading section in Chart settings. |
drawing_templates # | On | Enables Drawing Templates on the Drawing toolbar. |
dom_widget # | Off | Enables the DOM widget visibility. |
header_layouttoggle # | On | Shows the Select Layout button in the header. |
hide_right_toolbar # | Off | Hides the right toolbar when initializing the chart to free up space. The toolbar can be shown/hidden later using the WidgetBar API. |
hide_right_toolbar_tabs # | Off | Hides the tabs within the right toolbar. |
keep_object_tree_widget_in_right_toolbar # | Off | Keeps the Object Tree widget in the right toolbar. If the right_toolbar featureset is not enabled, this feature will not work. |
legend_last_day_change # | Off | Adds the Last day change values option to the Chart Settings dialog in the UI. This option allows users to show/hide the last day change values in the main series legend. Available from version 27. |
multiple_watchlists # | On | Enables creating multiple Watchlists. |
open_account_manager # | On | Keeps the Account Manager opened by default. |
order_info # | On | Shows the order information section in the Order dialog. |
order_panel # | On | Shows the Order Ticket. |
order_panel_close_button # | On | Shows the Close Order Panel button. |
order_panel_undock # | On | Shows the Undock button in the Order Panel settings. |
prefer_symbol_name_over_fullname # | On | Uses the symbol name instead of the exchange:name combination throughout the UI. Available from version 27.003 |
right_toolbar # | On | Shows the right toolbar with buttons. |
show_last_price_and_change_only_in_series_legend # | Off | Shows only the last price and change values in the main series legend. |
show_order_panel_on_start # | Off | Shows the Order Panel when the chart opens. |
show_symbol_logo_in_account_manager # | On | Displays the symbol's logo within the Account Manager panel. Note that you must also enable show_symbol_logos . Available from version 26. |
show_trading_notifications_history # | On | Enables the Notifications log tab on the bottom panel. |
support_multicharts # | On | Enables context menu actions (Clone, Sync) related to Multiple charts layout. |
trading_account_manager # | On | Shows the Account Manager widget. |
trading_notifications # | On | Shows trading notifications on the chart. |
watchlist_context_menu # | On | Enables context menu support in the Watchlist. |
watchlist_import_export # | On | Enables Watchlist export and import. |
watchlist_sections # | On | Display UI (buttons and context menu options) for creating sections within the watchlist. Available from version 26.1. |