Charting Library
TradingView Charting Library
Interfaces
- AccessList
- AccessListItem
- AccountManagerColumnBase
- AccountManagerInfo
- AccountManagerPage
- AccountManagerSummaryField
- AccountManagerTable
- AccountManagerTableFlags
- ActionDescription
- ActionDescriptionWithCallback
- ActionOptions
- ActionState
- ActionsFactory
- AdditionalSymbolInfoField
- AreaStylePreferences
- AvailableZOrderOperations
- Bar
- BarStylePreferences
- BaseInputFieldValidatorResult
- BaselineStylePreferences
- BracketOrder
- BracketOrderBase
- Brackets
- BrokerConfigFlags
- BrokerCustomUI
- CandleStylePreferences
- ChangeAccountSolution
- ChangeSymbolSolution
- ChangeThemeOptions
- ChartData
- ChartMetaInfo
- ChartPropertiesOverrides
- ChartingLibraryWidgetConstructor
- ChartingLibraryWidgetOptions
- CheckboxFieldMetaInfo
- ClientSnapshotOptions
- ColumnStylePreferences
- CompareSymbol
- ContextMenuItem
- ContextMenuOptions
- ContextMenuPosition
- CreateAnchoredShapeOptions
- CreateContextMenuParams
- CreateHTMLButtonOptions
- CreateMultipointShapeOptions
- CreateShapeOptions
- CreateShapeOptionsBase
- CreateStudyOptions
- CreateStudyTemplateOptions
- CreateTradingViewStyledButtonOptions
- CrossHairMovedEventParams
- CryptoBalance
- CurrencyItem
- CustomAliasedTimezone
- CustomComboBoxItem
- CustomComboBoxMetaInfo
- CustomFieldMetaInfoBase
- CustomFields
- CustomFormatter
- CustomFormatters
- CustomIndicator
- CustomInputFieldMetaInfo
- CustomInputFieldsValues
- CustomStudyFormatterFormat
- CustomTableElementFormatter
- CustomTimezoneInfo
- DOMData
- DOMLevel
- DatafeedConfiguration
- DatafeedQuoteValues
- DatafeedSymbolType
- DefaultContextMenuActionsParams
- DefaultDropdownActionsParams
- DialogParams
- DropdownItem
- DropdownParams
- EditObjectDialogEventParams
- EntityInfo
- ErrorFormatterParseResult
- Exchange
- Execution
- ExportDataOptions
- ExportedData
- Favorites
- FormatterParseResult
- GetNewsResponse
- GrayedObject
- HHistPreferences
- HeikinAshiStylePreferences
- HiLoStylePreferences
- HistoryMetadata
- HollowCandleStylePreferences
- HorizLinePreferences
- IAction
- IBoxedValue
- IBoxedValueReadOnly
- IBrokerCommon
- IBrokerConnectionAdapterFactory
- IBrokerConnectionAdapterHost
- IBrokerTerminal
- IBrokerWithoutRealtime
- IChartWidgetApi
- IChartingLibraryWidget
- IContext
- IContextMenuRenderer
- IDatafeedChartApi
- IDatafeedQuotesApi
- IDelegate
- IDestroyable
- IDropdownApi
- IExecutionLineAdapter
- IExternalDatafeed
- IExternalSaveLoadAdapter
- IFormatter
- ILineDataSourceApi
- IMenuItem
- INewsApi
- INonSeriesStudyBarsResult
- INonSeriesStudyResult
- IObservable
- IObservableValue
- IObservableValueReadOnly
- IOrderLineAdapter
- IPaneApi
- IPineSeries
- IPositionLineAdapter
- IPriceFormatter
- IPriceScaleApi
- IProjectionStudyResult
- ISelectionApi
- ISeparator
- ISeriesApi
- ISettingsAdapter
- IShapesGroupControllerApi
- IStudyApi
- ISubscription
- ISymbolInstrument
- ISymbolValueFormatter
- ITimeScaleApi
- ITimezoneApi
- IUpdatableAction
- IWatchListApi
- IWatchedValue
- IWatchedValueReadonly
- IWidgetbarApi
- IconOptions
- InitialSettingsMap
- InstrumentInfo
- IsTradableResult
- KagiStylePreferences
- LeverageInfo
- LeverageInfoParams
- LeveragePreviewResult
- LeverageSetParams
- LeverageSetResult
- LibraryPineStudy
- LibraryPineStudyConstructor
- LibrarySubsessionInfo
- LibrarySymbolInfo
- LineBreakStylePreferences
- LineStylePreferences
- LoadingScreenOptions
- MappedObject
- Mark
- MarkCustomColor
- MenuSeparator
- MouseEventParams
- NegativeBaseInputFieldValidatorResult
- NewsItem
- NumericFormattingParams
- OrderDialogOptions
- OrderDuration
- OrderDurationMetaInfo
- OrderOrPositionMessage
- OrderPreviewResult
- OrderPreviewSection
- OrderPreviewSectionRow
- OrderRule
- OrderTemplate
- Overrides
- PeriodParams
- PineJS
- PineJSStd
- PineStudyResultComposite
- PipValues
- PlaceOrderResult
- PlacedOrder
- PlacedOrderBase
- PlusClickParams
- PnFStylePreferences
- PolygonPreferences
- Position
- PositionBase
- PositionDialogOptions
- PositionPercents
- PositiveBaseInputFieldValidatorResult
- PreOrder
- PricedPoint
- QuantityMetainfo
- QuoteDataResponse
- QuoteErrorData
- QuoteOkData
- RawStudyMetaInfo
- RawStudyMetaInfoBase
- RenkoStylePreferences
- RestBrokerConnectionInfo
- RssNewsFeedInfo
- RssNewsFeedParams
- SaveChartToServerOptions
- SaveLoadChartRecord
- SavedStateMetaInfo
- SearchSymbolResultItem
- SeriesFieldDescriptor
- SeriesPreferencesMap
- SetVisibleRangeOptions
- SingleBrokerMetaInfo
- SortingParameters
- StandardFormattersDependenciesMapping
- StickedPoint
- StudyArrowsPlotInfo
- StudyArrowsPlotPreferences
- StudyBandInfo
- StudyBandPreferences
- StudyBandStyle
- StudyBarColorerPlotInfo
- StudyBarTimeInputInfo
- StudyBgColorerPlotInfo
- StudyBooleanInputInfo
- StudyCandleBorderColorerPlotInfo
- StudyCandleWickColorerPlotInfo
- StudyCharsPlotInfo
- StudyCharsPlotPreferences
- StudyColorInputInfo
- StudyColorerPlotInfo
- StudyDataOffsetPlotInfo
- StudyDataPlotInfo
- StudyDefaults
- StudyDownColorerPlotInfo
- StudyFieldDescriptor
- StudyFilledAreaGradientColorStyle
- StudyFilledAreaInfo
- StudyFilledAreaSolidColorStyle
- StudyFilledAreaStyleBase
- StudyGraphicsDefaults
- StudyInputBaseInfo
- StudyInputInformation
- StudyInputOptionsTitles
- StudyInputValueItem
- StudyInputsSimple
- StudyLinePlotInfo
- StudyLinePlotPreferences
- StudyNumericInputInfo
- StudyOhlcColorerPlotInfo
- StudyOhlcPlotBarsStylePreferences
- StudyOhlcPlotBaseStylePreferences
- StudyOhlcPlotCandlesStylePreferences
- StudyOhlcPlotInfo
- StudyOhlcStylesInfo
- StudyOrDrawingAddedToChartEventParams
- StudyOverrides
- StudyPaletteColor
- StudyPaletteColorPreferences
- StudyPaletteInfo
- StudyPalettePreferences
- StudyPaletteStyle
- StudyPalettedPlotInfo
- StudyPalettesInfo
- StudyPlotBaseInfo
- StudyPlotBasePreferences
- StudyPlotValueInheritFormat
- StudyPlotValuePrecisionFormat
- StudyPriceInputInfo
- StudyResolutionInputInfo
- StudyResultValueWithOffset
- StudyRgbaColorerPlotInfo
- StudySessionInputInfo
- StudyShapesPlotInfo
- StudyShapesPlotPreferences
- StudySourceInputInfo
- StudyStyleInfo
- StudyStyleInfoDefaults
- StudyStyleValues
- StudyStylesInfo
- StudySymbolInputInfo
- StudyTargetedPlotInfo
- StudyTemplateData
- StudyTemplateMetaInfo
- StudyTextColorerPlotInfo
- StudyTextInputInfo
- StudyTextareaInputInfo
- StudyTimeInputInfo
- StudyUpColorerPlotInfo
- SubscribeEventsMap
- SuccessFormatterParseResult
- SymbolExt
- SymbolInfoPriceSource
- SymbolInputSymbolSource
- SymbolIntervalResult
- SymbolResolveExtension
- SymbolSearchCompleteData
- TableFormatterInputs
- TextWithCheckboxFieldCustomInfo
- TextWithCheckboxFieldMetaInfo
- TextWithCheckboxValue
- TimeFieldDescriptor
- TimeFrameItem
- TimeFramePeriodBack
- TimeFrameTimeRange
- TimePoint
- TimeScaleOptions
- TimescaleMark
- TimezoneInfo
- Trade
- TradeBase
- TradeContext
- TradingCustomization
- TradingDialogOptions
- TradingQuotes
- TradingTerminalWidgetOptions
- TranslateOptions
- UndoOptions
- UndoRedoState
- Unit
- UserTimeFieldDescriptor
- ValueByStyleId
- VertLinePreferences
- VisiblePriceRange
- VisibleTimeRange
- WatchListSymbolList
- WatchListSymbolListData
- WatchListSymbolListMap
- WatchedValueSubscribeOptions
- WidgetBarParams
Enumerations
- ActionId
- ChartStyle
- ClearMarksMode
- ConnectionStatus
- FilledAreaType
- MenuItemType
- NotificationType
- OhlcStudyPlotStyle
- OrderStatus
- OrderStatusFilter
- OrderTicketFocusControl
- OrderType
- ParentType
- PriceScaleMode
- SeriesType
- Side
- StandardFormatterName
- StudyInputType
- StudyPlotDisplayTarget
- StudyPlotType
- StudyTargetPriceScale
- TimeFrameType
- TimeHoursFormat
- VisibilityType
Type Aliases
AccountId
Type
Nominal<string, "AccountID">
AccountManagerColumn
Type
{ [K in StandardFormatterName | FormatterName]: AccountManagerColumnBase<K> }[StandardFormatterName | FormatterName]
ActionMetaInfo
Describes a single action to put it into a dropdown or a context menu.
Type
ActionDescriptionWithCallback | MenuSeparator
AskBid
The Ask and Bid quotes.
Type
Required<Pick<TradingQuotes, "ask" | "bid">>
AvailableSaveloadVersions
Type
"1.0" | "1.1"
CellAlignment
Type
"left" | "right"
ChartActionId
A chart action ID.
Type
"chartProperties" | "compareOrAdd" | "scalesProperties" | "paneObjectTree" | "insertIndicator" | "symbolSearch" | "changeInterval" | "timeScaleReset" | "chartReset" | "seriesHide" | "studyHide" | "lineToggleLock" | "lineHide" | "scaleSeriesOnly" | "drawingToolbarAction" | "stayInDrawingModeAction" | "hideAllMarks" | "showCountdown" | "showSeriesLastValue" | "showSymbolLabelsAction" | "showStudyLastValue" | "showStudyPlotNamesAction" | "undo" | "redo" | "paneRemoveAllStudiesDrawingTools" | "showSymbolInfoDialog"
ChartingLibraryFeatureset
This is the list of all featuresets that work on Charting Library
Type
"use_localstorage_for_settings" | "items_favoriting" | "save_chart_properties_to_local_storage" | "create_volume_indicator_by_default" | "create_volume_indicator_by_default_once" | "volume_force_overlay" | "right_bar_stays_on_scroll" | "constraint_dialogs_movement" | "charting_library_debug_mode" | "side_toolbar_in_fullscreen_mode" | "header_in_fullscreen_mode" | "disable_resolution_rebuild" | "chart_scroll" | "chart_zoom" | "horz_touch_drag_scroll" | "vert_touch_drag_scroll" | "mouse_wheel_scroll" | "pressed_mouse_move_scroll" | "mouse_wheel_scale" | "pinch_scale" | "axis_pressed_mouse_move_scale" | "low_density_bars" | "uppercase_instrument_names" | "no_min_chart_width" | "fix_left_edge" | "lock_visible_time_range_on_resize" | "shift_visible_range_on_new_bar" | "custom_resolutions" | "end_of_period_timescale_marks" | "cropped_tick_marks" | "study_overlay_compare_legend_option" | "study_symbol_ticker_description" | "auto_enable_symbol_labels" | "insert_indicator_dialog_shortcut" | "two_character_bar_marks_labels" | "confirm_overwrite_if_chart_layout_with_name_exists" | "determine_first_data_request_size_using_visible_range" | "move_logo_to_main_pane" | "study_templates" | "datasource_copypaste" | "seconds_resolution" | "tick_resolution" | "secondary_series_extend_time_scale" | "header_widget" | "header_symbol_search" | "symbol_search_hot_key" | "header_resolutions" | "show_interval_dialog_on_key_press" | "header_chart_type" | "header_settings" | "header_indicators" | "header_compare" | "header_undo_redo" | "header_screenshot" | "header_fullscreen_button" | "border_around_the_chart" | "header_saveload" | "left_toolbar" | "control_bar" | "timeframes_toolbar" | "legend_widget" | "display_legend_on_all_charts" | "object_tree_legend_mode" | "edit_buttons_in_legend" | "show_hide_button_in_legend" | "format_button_in_legend" | "delete_button_in_legend" | "context_menus" | "pane_context_menu" | "scales_context_menu" | "legend_context_menu" | "main_series_scale_menu" | "display_market_status" | "remove_library_container_border" | "property_pages" | "show_chart_property_page" | "chart_property_page_scales" | "chart_property_page_trading" | "chart_property_page_right_margin_editor" | "countdown" | "dont_show_boolean_study_arguments" | "hide_last_na_study_output" | "symbol_info" | "timezone_menu" | "snapshot_trading_drawings" | "source_selection_markers" | "go_to_date" | "adaptive_logo" | "show_dom_first_time" | "hide_left_toolbar_by_default" | "chart_style_hilo" | "chart_style_hilo_last_price" | "pricescale_currency" | "pricescale_unit" | "scales_date_format" | "popup_hints" | "save_shortcut" | "show_right_widgets_panel_by_default" | "show_object_tree" | "show_spread_operators" | "hide_exponentiation_spread_operator" | "hide_reciprocal_spread_operator" | "compare_symbol_search_spread_operators" | "studies_symbol_search_spread_operators" | "hide_resolution_in_legend" | "hide_unresolved_symbols_in_legend" | "show_zoom_and_move_buttons_on_touch" | "hide_main_series_symbol_from_indicator_legend" | "hide_price_scale_global_last_bar_value" | "show_average_close_price_line_and_label" | "hide_image_invalid_symbol" | "hide_object_tree_and_price_scale_exchange_label" | "scales_time_hours_format" | "use_na_string_for_not_available_values" | "pre_post_market_sessions" | "show_percent_option_for_right_margin" | "iframe_loading_compatibility_mode" | "use_last_visible_bar_value_in_legend" | "symbol_info_long_description" | "symbol_info_price_source"
ColorTypes
These are defining the types for a background
Type
"solid" | "gradient"
ContextMenuItemsProcessor
Type
(items: readonly IActionVariant[], actionsFactory: ActionsFactory) => Promise<readonly IActionVariant[]>
Type declaration
Context menu items processor signature
Parameters
Name | Type | Description |
---|---|---|
items | readonly IActionVariant[] | an array of items the library wants to display |
actionsFactory | ActionsFactory | factory you could use to create a new items for the context menu. |
Returns
Promise<readonly IActionVariant[]>
ContextMenuRendererFactory
Type
(items: readonly IActionVariant[], params: CreateContextMenuParams, onDestroy: () => void) => Promise<IContextMenuRenderer>
Type declaration
Parameters
Name | Type | Description |
---|---|---|
items | readonly IActionVariant[] | an array of items the library wants to display |
params | CreateContextMenuParams | an object representing where the user right-clicked on (only if there is an existing menu) |
onDestroy | () => void | function that you should call once a created menu is hidden/destroyed |
Returns
Promise<IContextMenuRenderer>
CreateButtonOptions
Type
CreateHTMLButtonOptions | CreateTradingViewStyledButtonOptions
CustomStudyFormatter
Type
Omit<INumberFormatter, "parse">
CustomStudyFormatterFactory
Type
(format: CustomStudyFormatterFormat, symbolInfo: LibrarySymbolInfo | null) => CustomStudyFormatter | null
Type declaration
Factory function that can be implemented to create custom study formatters.
Parameters
Name | Type |
---|---|
format | CustomStudyFormatterFormat |
symbolInfo | LibrarySymbolInfo | null |
Returns
CustomStudyFormatter | null
CustomTableFormatElementFunction
Type
(inputs: TableFormatterInputs<T>) => undefined | string | HTMLElement
Type parameters
Name | Type |
---|---|
T | extends TableFormatterInputValues = TableFormatterInputValues |
Type declaration
A function that takes an TableFormatterInputs object and returns a string
or an HTMLElement
.
Parameters
Name | Type |
---|---|
inputs | TableFormatterInputs<T> |
Returns
undefined | string | HTMLElement
CustomTimezoneId
Identifier for a custom timezone (string).
Type
Nominal<"CustomTimezoneId", string>
CustomTimezones
Type
"Africa/Cairo" | "Africa/Johannesburg" | "Africa/Lagos" | "Africa/Nairobi" | "Africa/Tunis" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/El_Salvador" | "America/Juneau" | "America/Lima" | "America/Los_Angeles" | "America/Mexico_City" | "America/New_York" | "America/Phoenix" | "America/Santiago" | "America/Sao_Paulo" | "America/Toronto" | "America/Vancouver" | "Asia/Almaty" | "Asia/Ashkhabad" | "Asia/Bahrain" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dubai" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Kuwait" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Yangon" | "Atlantic/Reykjavik" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Lisbon" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Riga" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vilnius" | "Europe/Warsaw" | "Europe/Zurich" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Honolulu" | "Pacific/Norfolk" | "US/Mountain"
CustomTranslateFunction
Type
(key: string, options?: TranslateOptions) => string | null
Type declaration
Custom translation function
Parameters
Name | Type | Description |
---|---|---|
key | string | key for string to be translated |
options? | TranslateOptions | - |
Returns
string | null
DateFormat
Type
keyof typeof dateFormatFunctions
DeepWriteable
Type
{ -readonly [P in keyof T]: DeepWriteable<T[P]> }
Type parameters
Name |
---|
T |
Direction
The direction of an execution line. Either buy or sell.
Type
"buy" | "sell"
DomeCallback
Type
(data: DOMData) => void
Type declaration
Parameters
Name | Type |
---|---|
data | DOMData |
Returns
void
DrawingEventType
A event related to a drawing.
- Note that the
properties_changed
event can be emitted beforecreate
event, and that the event isn't debounced (for example dragging a slider for a property will result in this event firing for each movement on the slider), you may want to debounce this within your code. - The
move
event is emitted when a drawing is moved as a whole, whilst thepoints_changed
event is emitted when a single point of the drawing is moved.points_changed
will always fire whenmove
fires but not vice-versa.
Type
"click" | "move" | "remove" | "hide" | "show" | "create" | "properties_changed" | "points_changed"
DrawingToolIdentifier
Type
"arrow" | "cursor" | "dot" | "eraser" | "LineTool5PointsPattern" | "LineToolABCD" | "LineToolArc" | "LineToolArrow" | "LineToolArrowMarkDown" | "LineToolArrowMarker" | "LineToolArrowMarkLeft" | "LineToolArrowMarkRight" | "LineToolArrowMarkUp" | "LineToolBarsPattern" | "LineToolBezierCubic" | "LineToolBezierQuadro" | "LineToolBrush" | "LineToolCallout" | "LineToolCircle" | "LineToolCircleLines" | "LineToolComment" | "LineToolCrossLine" | "LineToolCypherPattern" | "LineToolDateAndPriceRange" | "LineToolDateRange" | "LineToolDisjointAngle" | "LineToolElliottCorrection" | "LineToolElliottDoubleCombo" | "LineToolElliottImpulse" | "LineToolElliottTriangle" | "LineToolElliottTripleCombo" | "LineToolEllipse" | "LineToolExtended" | "LineToolFibChannel" | "LineToolFibCircles" | "LineToolFibRetracement" | "LineToolFibSpeedResistanceArcs" | "LineToolFibSpeedResistanceFan" | "LineToolFibSpiral" | "LineToolFibTimeZone" | "LineToolFibWedge" | "LineToolFixedRangeVolumeProfile" | "LineToolFlagMark" | "LineToolFlatBottom" | "LineToolGannComplex" | "LineToolGannFan" | "LineToolGannFixed" | "LineToolGannSquare" | "LineToolGhostFeed" | "LineToolHeadAndShoulders" | "LineToolHighlighter" | "LineToolHorzLine" | "LineToolHorzRay" | "LineToolInfoLine" | "LineToolInsidePitchfork" | "LineToolNote" | "LineToolNoteAbsolute" | "LineToolParallelChannel" | "LineToolPath" | "LineToolPitchfan" | "LineToolPitchfork" | "LineToolPolyline" | "LineToolPrediction" | "LineToolPriceLabel" | "LineToolPriceNote" | "LineToolPriceRange" | "LineToolProjection" | "LineToolRay" | "LineToolRectangle" | "LineToolRegressionTrend" | "LineToolRiskRewardLong" | "LineToolRiskRewardShort" | "LineToolRotatedRectangle" | "LineToolSchiffPitchfork" | "LineToolSchiffPitchfork2" | "LineToolSignpost" | "LineToolSineLine" | "LineToolText" | "LineToolTextAbsolute" | "LineToolThreeDrivers" | "LineToolTimeCycles" | "LineToolTrendAngle" | "LineToolTrendBasedFibExtension" | "LineToolTrendBasedFibTime" | "LineToolTrendLine" | "LineToolTriangle" | "LineToolTrianglePattern" | "LineToolVertLine"
DropdownUpdateParams
Dropdown options which can be adjusted on an existing menu.
Type
Partial<Omit<DropdownParams, "align">>
EditObjectDialogObjectType
Type
"mainSeries" | "drawing" | "study" | "other"
EmptyCallback
Type
() => void
Type declaration
Returns
void
EntityId
Type
Nominal<string, "EntityId">
ErrorCallback
Type
(reason: string) => void
Type declaration
Parameters
Name | Type |
---|---|
reason | string |
Returns
void
FieldDescriptor
Description of each field of exported data from the chart
Type
TimeFieldDescriptor | UserTimeFieldDescriptor | SeriesFieldDescriptor | StudyFieldDescriptor
FinancialPeriod
Type
"FY" | "FQ" | "FH" | "TTM"
FormatterName
Type
Nominal<string, "FormatterName">
GetMarksCallback
Type
(marks: T[]) => void
Type parameters
Name |
---|
T |
Type declaration
Parameters
Name | Type |
---|---|
marks | T[] |
Returns
void
GetNewsFunction
Type
(symbol: string, callback: (response: GetNewsResponse) => void) => void
Type declaration
Parameters
Name | Type |
---|---|
symbol | string |
callback | (response: GetNewsResponse) => void |
Returns
void
GmtTimezoneId
GMT timezone ID.
In order to conform with the POSIX style, those zone names beginning with "Etc/GMT" have their sign reversed from the standard ISO 8601 convention. In the "Etc" area, zones west of GMT have a positive sign and those east have a negative sign in their name (e.g "Etc/GMT-14" is 14 hours ahead of GMT).
Type
\Etc/GMT${"+" | "-"}${number}${\:${number}\ | ""}\
GroupLockState
Type
"Locked" | "Unlocked" | "Partial"
GroupVisibilityState
Type
"Visible" | "Invisible" | "Partial"
HeaderWidgetButtonsMode
Mode can be of the following:
fullsize
: always full-size buttons on the top toolbaradaptive
: adaptive/auto mode (fullsize if the window width allows and icons on small windows).compact
: icons only buttons on the top toolbar (favorites won't be shown)
Type
"fullsize" | "compact" | "adaptive"
HistoryCallback
Type
(bars: Bar[], meta?: HistoryMetadata) => void
Type declaration
Parameters
Name | Type |
---|---|
bars | Bar[] |
meta? | HistoryMetadata |
Returns
void
IActionVariant
Item variants within a context menu
Type
IBarArray
Type
[number, number, number, number, number, number]
IBasicDataFeed
Type
IDatafeedChartApi & IExternalDatafeed
INumberFormatter
Specific formatter for number
Type
IFormatter<number>
IPineStudyResult
Type
IPineStudyResultTypes<IPineStudyResultSimple>
IPineStudyResultSimple
Type
StudyPrimitiveResult | ISeriesStudyResult | INonSeriesStudyBarsResult | IProjectionStudyResult | INonSeriesStudyResult
IPineStudyResultTypes
Type
TPineStudyResultSimple | PineStudyResultComposite<TPineStudyResultSimple>
Type parameters
Name |
---|
TPineStudyResultSimple |
IProjectionBar
Type
[number, number, number, number, number, number] | [number, number, number, number, number, number, number]
ISeriesStudyResult
Type
[number, number, number, number, number, number, number | undefined, boolean | undefined]
InputFieldValidator
Type
(value: any) => InputFieldValidatorResult
Type declaration
Input field validator
Parameters
Name | Type | Description |
---|---|---|
value | any | value to be validated |
Returns
InputFieldValidatorResult
Type
PositiveBaseInputFieldValidatorResult | NegativeBaseInputFieldValidatorResult
LanguageCode
Type
"ar" | "zh" | "cs" | "da_DK" | "ca_ES" | "nl_NL" | "en" | "et_EE" | "fr" | "de" | "el" | "he_IL" | "hu_HU" | "id_ID" | "it" | "ja" | "ko" | "fa" | "pl" | "pt" | "ro" | "ru" | "sk_SK" | "es" | "sv" | "th" | "tr" | "vi" | "no" | "ms_MY" | "zh_TW"
LayoutType
Type
SingleChartLayoutType | MultipleChartsLayoutType
LegendMode
Type
"horizontal" | "vertical"
LibrarySessionId
Type
"regular" | "extended" | "premarket" | "postmarket"
MarkConstColors
Type
"red" | "green" | "blue" | "yellow"
MultipleChartsLayoutType
Type
"2h" | "2v" | "2-1" | "3s" | "3h" | "3v" | "4" | "6" | "8" | "1-2" | "3r" | "4h" | "4v" | "4s" | "5h" | "6h" | "7h" | "8h" | "1-3" | "2-2" | "2-3" | "1-4" | "5s" | "6c" | "8c"
Nominal
This is the generic type useful for declaring a nominal type, which does not structurally matches with the base type and the other types declared over the same base type
Usage:
Example
type Index = Nominal<number, 'Index'>;
// let i: Index = 42; // this fails to compile
let i: Index = 42 as Index; // OK
Example
type TagName = Nominal<string, 'TagName'>;
Type
T & { [species]: Name }
Type parameters
Name | Type |
---|---|
T | T |
Name | extends string |
OnActionExecuteHandler
Type
(action: IAction) => void
Type declaration
Parameters
Name | Type |
---|---|
action | IAction |
Returns
void
OnActionUpdateHandler
Type
(action: IAction) => void
Type declaration
Parameters
Name | Type |
---|---|
action | IAction |
Returns
void
OnReadyCallback
Type
(configuration: DatafeedConfiguration) => void
Type declaration
Parameters
Name | Type |
---|---|
configuration | DatafeedConfiguration |
Returns
void
Order
Type
OrderTableColumn
Type
AccountManagerColumn & { supportedStatusFilters?: OrderStatusFilter[] }
PageName
Type
"watchlist_details_news" | "data_window" | "object_tree"
PlotShapeId
Plot shape ID.
Type
"shape_arrow_down" | "shape_arrow_up" | "shape_circle" | "shape_cross" | "shape_xcross" | "shape_diamond" | "shape_flag" | "shape_square" | "shape_label_down" | "shape_label_up" | "shape_triangle_down" | "shape_triangle_up"
PriceSource
Type
"open" | "high" | "low" | "close"
QuoteData
Type
QuotesCallback
Type
(data: QuoteData[]) => void
Type declaration
Callback to provide Quote data.
Parameters
Name | Type | Description |
---|---|---|
data | QuoteData[] | Quote Data |
Returns
void
QuotesErrorCallback
Type
(reason: string) => void
Type declaration
Error callback for quote data request.
Parameters
Name | Type | Description |
---|---|---|
reason | string | message describing the reason for the error |
Returns
void
RawStudyMetaInfoId
Type
Nominal<string, "RawStudyMetaInfoId">
RawStudyMetaInformation
Type
Omit<RawStudyMetaInfo, "defaults" | "plots"> & { defaults?: Readonly<DeepPartial<StudyDefaults>> ; plots?: readonly Readonly<StudyPlotInformation>[] }
ResolutionString
Resolution or time interval is a time period of one bar. Charting Library supports tick, intraday (seconds, minutes, hours), and DWM (daily, weekly, monthly) resolutions. The table below describes how to specify different types of resolutions:
Resolution | Format | Example |
---|---|---|
Ticks | xT | 1T — one tick |
Seconds | xS | 1S — one second |
Minutes | x | 1 — one minute |
Hours | x minutes | 60 — one hour |
Days | xD | 1D — one day |
Weeks | xW | 1W — one week |
Months | xM | 1M — one month |
Years | xM months | 12M — one year |
Refer to Resolution for more information.
Type
Nominal<string, "ResolutionString">
ResolveCallback
Type
(symbolInfo: LibrarySymbolInfo) => void
Type declaration
Parameters
Name | Type |
---|---|
symbolInfo | LibrarySymbolInfo |
Returns
void
RssNewsFeedItem
RSS news feed.
Type
RssNewsFeedInfo | RssNewsFeedInfo[]
SearchSymbolsCallback
Type
(items: SearchSymbolResultItem[]) => void
Type declaration
Parameters
Name | Type |
---|---|
items | SearchSymbolResultItem[] |
Returns
void
SeriesEventType
An event related to the series. Currently the only possible value for this argument is price_scale_changed
Type
"price_scale_changed"
SeriesFormat
Type
"price" | "volume"
SeriesFormatterFactory
Type
(symbolInfo: LibrarySymbolInfo | null, minTick: string) => ISymbolValueFormatter | null
Type declaration
Parameters
Name | Type |
---|---|
symbolInfo | LibrarySymbolInfo | null |
minTick | string |
Returns
ISymbolValueFormatter | null
SeriesPriceScale
Where to attach the price scale.
Options are either to the left
, right
, next to an already existing price axis using a reference or no scale
if there are no other scales on the main pane.
Type
"new-left" | "new-right" | "no-scale" | EntityId
SeriesStatusViewSymbolTextSource
Type
"ticker" | "description" | "ticker-and-description" | "long-description"
ServerTimeCallback
Type
(serverTime: number) => void
Type declaration
Parameters
Name | Type |
---|---|
serverTime | number |
Returns
void
SetVisibleTimeRange
A time range to set. The end to
value is optional.
When the optional to
value is omitted then the value will
fallback to the timestamp of the latest bar on the chart.
Type
Omit<VisibleTimeRange, "to"> & Partial<Pick<VisibleTimeRange, "to">>
ShapePoint
Drawing point
Type
StickedPoint | PricedPoint | TimePoint
ShapesGroupId
Type
Nominal<string, "ShapesGroupId">
SingleChartLayoutType
Type
"s"
StudyAvailableConstSources
Type
"open" | "high" | "low" | "close" | "hl2" | "hlc3" | "ohlc4" | "hlcc4"
StudyEventType
An event related to a study.
Type
"remove" | "price_scale_changed" | "paste_study"
StudyFilledAreaStyle
Type
StudyFilledAreaSolidColorStyle | StudyFilledAreaGradientColorStyle
StudyInputId
Type
Nominal<string, "StudyInputId">
StudyInputInfo
Type
StudyBooleanInputInfo | StudyTextInputInfo | StudySymbolInputInfo | StudyResolutionInputInfo | StudySessionInputInfo | StudySourceInputInfo | StudyNumericInputInfo | StudyPriceInputInfo | StudyColorInputInfo | StudyTimeInputInfo | StudyBarTimeInputInfo | StudyTextareaInputInfo
StudyInputInfoList
Type
readonly Readonly<StudyInputInfo>[]
StudyInputValue
The value of a study input.
Type
string | number | boolean
StudyMetaInfo
Type
DeepWriteable<RawStudyMetaInformation> & { id: string }
StudyOhlcPlotPreferences
Type
StudyOhlcPlotBarsStylePreferences | StudyOhlcPlotCandlesStylePreferences
StudyOverrideValueType
Type
string | number | boolean
StudyPlotDisplayMode
Type
Nominal<number, "StudyPlotDisplayTarget"> | StudyPlotDisplayTarget
StudyPlotInfo
Type
StudyPlotInformation
A description of a study plot.
Type
StudyArrowsPlotInfo | StudyCharsPlotInfo | StudyColorerPlotInfo | StudyRgbaColorerPlotInfo | StudyDataPlotInfo | StudyDataOffsetPlotInfo | StudyLinePlotInfo | StudyOhlcPlotInfo | StudyShapesPlotInfo | StudyBarColorerPlotInfo | StudyBgColorerPlotInfo | StudyTextColorerPlotInfo | StudyOhlcColorerPlotInfo | StudyCandleWickColorerPlotInfo | StudyCandleBorderColorerPlotInfo | StudyUpColorerPlotInfo | StudyDownColorerPlotInfo
StudyPlotPreferences
Study plot style preferences.
Type
StudyLinePlotPreferences | StudyShapesPlotPreferences | StudyCharsPlotPreferences | StudyArrowsPlotPreferences
StudyPlotValueFormat
Type
StudyPlotValueInheritFormat | StudyPlotValuePrecisionFormat
StudyPriceScale
Price scale to display a study on.
Possible values are:
new-left
- attach the study to a new left price scalenew-right
- attach the study to a new right price scaleno-scale
- do not attach the study to any price scale. The study will be added in 'No Scale' modeas-series
- attach the study to the price scale where the main series is attached (it is only applicable the study is added to the pane with the main series)
Type
"new-left" | "new-right" | "no-scale" | "as-series"
StudyPrimitiveResult
Type
(number | StudyResultValueWithOffset)[]
SubscribeBarsCallback
Type
(bar: Bar) => void
Type declaration
Parameters
Name | Type |
---|---|
bar | Bar |
Returns
void
SupportedLineTools
Type
"text" | "anchored_text" | "note" | "anchored_note" | "signpost" | "double_curve" | "arc" | "icon" | "emoji" | "arrow_up" | "arrow_down" | "arrow_left" | "arrow_right" | "price_label" | "price_note" | "arrow_marker" | "flag" | "vertical_line" | "horizontal_line" | "cross_line" | "horizontal_ray" | "trend_line" | "info_line" | "trend_angle" | "arrow" | "ray" | "extended" | "parallel_channel" | "disjoint_angle" | "flat_bottom" | "pitchfork" | "schiff_pitchfork_modified" | "schiff_pitchfork" | "balloon" | "comment" | "inside_pitchfork" | "pitchfan" | "gannbox" | "gannbox_square" | "gannbox_fixed" | "gannbox_fan" | "fib_retracement" | "fib_trend_ext" | "fib_speed_resist_fan" | "fib_timezone" | "fib_trend_time" | "fib_circles" | "fib_spiral" | "fib_speed_resist_arcs" | "fib_channel" | "xabcd_pattern" | "cypher_pattern" | "abcd_pattern" | "callout" | "triangle_pattern" | "3divers_pattern" | "head_and_shoulders" | "fib_wedge" | "elliott_impulse_wave" | "elliott_triangle_wave" | "elliott_triple_combo" | "elliott_correction" | "elliott_double_combo" | "cyclic_lines" | "time_cycles" | "sine_line" | "long_position" | "short_position" | "forecast" | "date_range" | "price_range" | "date_and_price_range" | "bars_pattern" | "ghost_feed" | "projection" | "rectangle" | "rotated_rectangle" | "circle" | "ellipse" | "triangle" | "polyline" | "path" | "curve" | "cursor" | "dot" | "arrow_cursor" | "eraser" | "measure" | "zoom" | "brush" | "highlighter" | "regression_trend" | "fixed_range_volume_profile"
SymbolSearchCompleteOverrideFunction
Type
(symbol: string, searchResultItem?: SearchSymbolResultItem) => Promise<SymbolSearchCompleteData>
Type declaration
function to override the symbol input from symbol search dialogs
Parameters
Name | Type | Description |
---|---|---|
symbol | string | input from the symbol search |
searchResultItem? | SearchSymbolResultItem | - |
Returns
Promise<SymbolSearchCompleteData>
SymbolSource
Type
SymbolType
Type
"stock" | "index" | "forex" | "futures" | "bitcoin" | "crypto" | "undefined" | "expression" | "spread" | "cfd" | "economic" | "equity" | "dr" | "bond" | "right" | "warrant" | "fund" | "structured"
TableFormatTextFunction
Type
(inputs: TableFormatterInputs<T>) => string
Type parameters
Name | Type |
---|---|
T | extends TableFormatterInputValues = TableFormatterInputValues |
Type declaration
A function that takes an TableFormatterInputs object and returns a string
.
Parameters
Name | Type |
---|---|
inputs | TableFormatterInputs<T> |
Returns
string
TableFormatterInputValue
Type
any
TableFormatterInputValues
Type
TextInputFieldValidator
Type
(value: string) => InputFieldValidatorResult
Type declaration
Parameters
Name | Type |
---|---|
value | string |
Returns
ThemeName
Type
"Light" | "Dark"
TickMarkType
Type
"Year" | "Month" | "DayOfMonth" | "Time" | "TimeWithSeconds"
TimeFrameValue
Type of timeframe defined in the UI. Can either be a single one TimeFramePeriodBack or a range TimeFrameTimeRange
Examples:
- a timeframe object,
{type, value}
:type
:period-back
.value
: valid timeframe is a number with letter D for days and M for months.
- a range object,
{type, from, to}
type
:time-range
.from
,to
: UNIX timestamps, UTC.
Type
TimeFramePeriodBack | TimeFrameTimeRange
TimeScaleMarkShape
Type
"circle" | "earningUp" | "earningDown" | "earning"
TimeframeOption
Type
string | { from: number ; to: number }
Timezone
Type
"Etc/UTC" | CustomTimezones
TimezoneId
Type
CustomTimezones | "Etc/UTC" | "exchange"
TradableSolutions
TradableSolutions
has one of the following keys:
changeAccount
- id of a sub-account suitable for trading the symbolchangeSymbol
- the symbol suitable for trading with current sub-account
Type
ChangeAccountSolution | ChangeSymbolSolution
TradingDialogCustomField
Type
CheckboxFieldMetaInfo | TextWithCheckboxFieldMetaInfo | CustomComboBoxMetaInfo
TradingTerminalFeatureset
This is the list of all featuresets that work on Trading Terminal (which is an extension of Charting Library)
Type
ChartingLibraryFeatureset | "chart_crosshair_menu" | "support_multicharts" | "header_layouttoggle" | "add_to_watchlist" | "open_account_manager" | "trading_notifications" | "multiple_watchlists" | "show_trading_notifications_history" | "always_pass_called_order_to_modify" | "drawing_templates" | "trading_account_manager" | "right_toolbar" | "order_panel" | "order_info" | "buy_sell_buttons" | "broker_button" | "show_order_panel_on_start" | "order_panel_close_button" | "order_panel_undock" | "chart_hide_close_position_button" | "chart_hide_close_order_button" | "watchlist_import_export" | "dom_widget" | "keep_object_tree_widget_in_right_toolbar" | "show_last_price_and_change_only_in_series_legend" | "show_context_menu_in_crosshair_if_only_one_item" | "watchlist_context_menu " | "hide_right_toolbar" | "hide_right_toolbar_tabs"
VisiblePlotsSet
Type
"ohlcv" | "ohlc" | "c"
WatchListSymbolListAddedCallback
Type
(listId: string, symbols: string[]) => void
Type declaration
Parameters
Name | Type |
---|---|
listId | string |
symbols | string[] |
Returns
void
WatchListSymbolListChangedCallback
Type
(listId: string) => void
Type declaration
Parameters
Name | Type |
---|---|
listId | string |
Returns
void
WatchListSymbolListRemovedCallback
Type
(listId: string) => void
Type declaration
Parameters
Name | Type |
---|---|
listId | string |
Returns
void
WatchListSymbolListRenamedCallback
Type
(listId: string, oldName: string, newName: string) => void
Type declaration
Parameters
Name | Type |
---|---|
listId | string |
oldName | string |
newName | string |
Returns
void
WatchedValueCallback
Type
(value: T) => void
Type parameters
Name |
---|
T |
Type declaration
Parameters
Name | Type |
---|---|
value | T |
Returns
void
Functions
version
Returns a build version string. For example "CL v23.012 (internal id e0d59dc3 @ 2022-08-23T06:07:00.808Z)".
Returns
The build version string.
string
Variables
widget
Type
ChartingLibraryWidgetConstructor
Flags
Const