/** * TradingView Advanced Charts * @packageDocumentation * @module Charting Library */ // Generated by dts-bundle-generator v9.5.1 declare const LINESTYLE_DASHED = 2; declare const LINESTYLE_DOTTED = 1; declare const LINESTYLE_SOLID = 0; /* eslint-disable jsdoc/require-jsdoc */ declare const dateFormatFunctions: { readonly "qq 'yy": (date: Date, local: boolean) => string; readonly "qq yyyy": (date: Date, local: boolean) => string; readonly "dd MMM 'yy": (date: Date, local: boolean) => string; readonly "MMM 'yy": (date: Date, local: boolean) => string; readonly "MMM dd, yyyy": (date: Date, local: boolean) => string; readonly "MMM d, yyyy": (date: Date, local: boolean) => string; readonly "MMM yyyy": (date: Date, local: boolean) => string; readonly "MMM dd": (date: Date, local: boolean) => string; readonly "dd MMM": (date: Date, local: boolean) => string; readonly "yyyy-MM-dd": (date: Date, local: boolean) => string; readonly "yy-MM-dd": (date: Date, local: boolean) => string; readonly "yy/MM/dd": (date: Date, local: boolean) => string; readonly "yyyy/MM/dd": (date: Date, local: boolean) => string; readonly "dd-MM-yyyy": (date: Date, local: boolean) => string; readonly "dd-MM-yy": (date: Date, local: boolean) => string; readonly "dd/MM/yy": (date: Date, local: boolean) => string; readonly "dd/MM/yyyy": (date: Date, local: boolean) => string; readonly "MM/dd/yy": (date: Date, local: boolean) => string; readonly "MM/dd/yyyy": (date: Date, local: boolean) => string; }; /* eslint-enable jsdoc/require-jsdoc */ declare enum ColorType { Solid = "solid", Gradient = "gradient" } declare enum DisconnectType { LogOut = 0, FailedRestoring = 1, Offline = 2, APIError = 3, TwoFactorRequired = 4, CancelAuthorization = 5, TimeOutForAuthorization = 6, OauthError = 7, BrokenConnection = 8, Reconnect = 9, FailedSignIn = 10 } declare enum PlotSymbolSize { Auto = "auto", Tiny = "tiny", Small = "small", Normal = "normal", Large = "large", Huge = "huge" } declare enum StopType { StopLoss = 0, TrailingStop = 1, GuaranteedStop = 2 } export declare const enum BottomWidgetBarMode { Minimized = "minimized", Normal = "normal", Maximized = "maximized" } export declare const enum PaneSize { Tiny = "tiny", Small = "small", Medium = "medium", Large = "large" } export declare const enum PropertyKeyType { DefaultsKey = 1, StateKey = 2, TemplateKey = 4 } export declare const enum SearchInitiationPoint { SymbolSearch = "symbolSearch", Watchlist = "watchlist", Compare = "compare", IndicatorInputs = "indicatorInputs" } export declare const enum SharingMode { NotShared = 0, SharedInLayout = 1, GloballyShared = 2 } export declare const enum Status { Offline = 0, Resolving = 1, Loading = 2, Ready = 3, InvalidSymbol = 4, Snapshot = 5, EOD = 6, Pulse = 7, Delayed = 8, DelayedSteaming = 9, NoBars = 10, Replay = 11, Error = 12, CalculationError = 13, UnsupportedResolution = 14 } export declare const widget: ChartingLibraryWidgetConstructor; export declare enum ActionId { ChartAddIndicatorToAllCharts = "Chart.AddIndicatorToAllCharts", ChartAddSymbolToWatchList = "Chart.AddSymbolToWatchList", ChartApplyIndicatorsToAllCharts = "Chart.ApplyIndicatorsToAllCharts", ChartIndicatorAddFavorites = "Chart.Indicator.AddFavorites", ChartChangeTimeZone = "Chart.ChangeTimeZone", ChartClipboardCopyPrice = "Chart.Clipboard.CopyPrice", ChartClipboardCopyLineTools = "Chart.Clipboard.CopyLineTools", ChartClipboardCopySource = "Chart.Clipboard.CopySource", ChartClipboardPasteSource = "Chart.Clipboard.PasteSource", ChartCrosshairLockVerticalCursor = "Chart.Crosshair.LockVerticalCursor", ChartCrosshairPlusButtonDrawHorizontalLine = "Chart.Crosshair.PlusButton.DrawHorizontalLine", ChartCustomActionId = "Chart.CustomActionId", ChartDialogsShowChangeInterval = "Chart.Dialogs.ShowChangeInterval", ChartDialogsShowChangeSymbol = "Chart.Dialogs.ShowChangeSymbol", ChartDialogsShowCompareOrAddSymbol = "Chart.Dialogs.ShowCompareOrAddSymbol", ChartDialogsShowGeneralSettings = "Chart.Dialogs.ShowGeneralSettings", ChartDialogsShowGeneralSettingsLegendTab = "Chart.Dialogs.ShowGeneralSettings.LegendTab", ChartDialogsShowGeneralSettingsSymbolTab = "Chart.Dialogs.ShowGeneralSettings.SymbolTab", ChartDialogsShowGeneralScalesTab = "Chart.Dialogs.ShowGeneralSettings.ScalesTab", ChartDialogsShowGoToDate = "Chart.Dialogs.ShowGoToDate", ChartDialogsShowInsertIndicators = "Chart.Dialogs.ShowInsertIndicators", ChartDialogsShowSymbolInfo = "Chart.Dialogs.ShowSymbolInfo", ChartDrawingToolbarToggleVisibility = "Chart.DrawingToolbar.ToggleVisibility", ChartExternalActionId = "Chart.ExternalActionId", ChartFavoriteDrawingToolsToolbarHide = "Chart.FavoriteDrawingToolsToolbar.Hide", ChartIndicatorShowSettingsDialog = "Chart.Indicator.ShowSettingsDialog", ChartLegendToggleLastDayChangeValuesVisibility = "Chart.Legend.ToggleLastDayChangeValuesVisibility", ChartLegendToggleBarChangeValuesVisibility = "Chart.Legend.ToggleBarChangeValuesVisibility", ChartLegendToggleBarChangeColor = "Chart.Legend.ToggleBarChangeColor", ChartLegendTogglePriceSourceVisibility = "Chart.Legend.TogglePriceSourceVisibility", ChartLegendToggleIndicatorArgumentsVisibility = "Chart.Legend.ToggleIndicatorArgumentsVisibility", ChartLegendToggleIndicatorTitlesVisibility = "Chart.Legend.ToggleIndicatorTitlesVisibility", ChartLegendToggleIndicatorValuesVisibility = "Chart.Legend.ToggleIndicatorValuesVisibility", ChartLegendToggleOhlcValuesVisibility = "Chart.Legend.ToggleOhlcValuesVisibility", ChartLegendToggleOpenMarketStatusVisibility = "Chart.Legend.ToggleOpenMarketStatusVisibility", ChartLegendToggleSymbolVisibility = "Chart.Legend.ToggleSymbolVisibility", ChartLegendToggleVolumeVisibility = "Chart.Legend.ToggleVolumeVisibility", ChartLines = "Chart.Lines", ChartLinesToggleBidAskLinesVisibility = "Chart.Lines.ToggleBidAskLinesVisibility", ChartLinesToggleHighLowLinesVisibility = "Chart.Lines.ToggleHighLowLinesVisibility", ChartLinesToggleAverageLineVisibility = "Chart.Lines.ToggleAverageLineVisibility", ChartLinesTogglePrePostMarketPriceLineVisibility = "Chart.Lines.TogglePrePostMarketPriceLineVisibility", ChartLinesToggleSeriesPrevCloseLineVisibility = "Chart.Lines.ToggleSeriesPrevCloseLineVisibility", ChartLinesToggleSeriesPriceLineVisibility = "Chart.Lines.ToggleSeriesPriceLineVisibility", ChartLineToolBarsPatternToggleFlipped = "Chart.LineTool.BarsPattern.ToggleFlipped", ChartLineToolBarsPatternToggleMirrored = "Chart.LineTool.BarsPattern.ToggleMirrored", ChartLineToolRiskRewardReverse = "Chart.LineTool.RiskReward.Reverse", ChartLineToolClone = "Chart.LineTool.Clone", ChartLineToolCreateLimitOrderFromState = "Chart.LineTool.CreateLimitOrderFromState", ChartLineToolElliotChangeDegreeProperty = "Chart.LineTool.Elliot.ChangeDegreeProperty", ChartLineToolNoSync = "Chart.LineTool.NoSync", ChartLineToolPitchforkChangeTypeToInside = "Chart.LineTool.Pitchfork.ChangeTypeToInside", ChartLineToolPitchforkChangeTypeToModifiedSchiff = "Chart.LineTool.Pitchfork.ChangeTypeToModifiedSchiff", ChartLineToolPitchforkChangeTypeToOriginal = "Chart.LineTool.Pitchfork.ChangeTypeToOriginal", ChartLineToolPitchforkChangeTypeToSchiff = "Chart.LineTool.Pitchfork.ChangeTypeToSchiff", ChartLineToolSyncInLayout = "Chart.LineTool.SyncInLayout", ChartLineToolTemplates = "Chart.LineTool.Templates", ChartLineToolTemplatesApply = "Chart.LineTool.Templates.Apply", ChartLineToolTemplatesApplyDefaults = "Chart.LineTool.Templates.ApplyDefaults", ChartLineToolTemplatesSaveAs = "Chart.LineTool.Templates.SaveAs", ChartLineToolToolbarChangeFontSizeProperty = "Chart.LineTool.Toolbar.ChangeFontSizeProperty", ChartLineToolToolbarChangeLineStyleToDashed = "Chart.LineTool.Toolbar.ChangeLineStyleToDashed", ChartLineToolToolbarChangeLineStyleToDotted = "Chart.LineTool.Toolbar.ChangeLineStyleToDotted", ChartLineToolToolbarChangeLineStyleToSolid = "Chart.LineTool.Toolbar.ChangeLineStyleToSolid", ChartMarksToggleVisibility = "Chart.Marks.ToggleVisibility", ChartMoveChartInLayout = "Chart.MoveChartInLayout", ChartMoveChartInLayoutBack = "Chart.MoveChartInLayout.Back", ChartMoveChartInLayoutForward = "Chart.MoveChartInLayout.Forward", ChartObjectTreeShow = "Chart.ObjectTree.Show", ChartDataWindowShow = "Chart.DataWindow.Show", ChartPaneControlsDeletePane = "Chart.PaneControls.DeletePane", ChartPaneControlsMaximizePane = "Chart.PaneControls.MaximizePane", ChartPaneControlsMinimizePane = "Chart.PaneControls.MinimizePane", ChartPaneControlsMovePaneDown = "Chart.PaneControls.MovePaneDown", ChartPaneControlsMovePaneUp = "Chart.PaneControls.MovePaneUp", ChartPaneControlsCollapsePane = "Chart.PaneControls.CollapsePane", ChartPaneControlsRestorePane = "Chart.PaneControls.RestorePane", ChartPriceScaleLabels = "Chart.PriceScale.Labels", ChartPriceScaleLabelsToggleBidAskLabelsVisibility = "Chart.PriceScale.Labels.ToggleBidAskLabelsVisibility", ChartPriceScaleLabelsToggleHighLowPriceLabelsVisibility = "Chart.PriceScale.Labels.ToggleHighLowPriceLabelsVisibility", ChartPriceScaleLabelsToggleAveragePriceLabelVisibility = "Chart.PriceScale.Labels.ToggleAveragePriceLabelVisibility", ChartPriceScaleLabelsToggleIndicatorsNameLabelsVisibility = "Chart.PriceScale.Labels.ToggleIndicatorsNameLabelsVisibility", ChartPriceScaleLabelsToggleIndicatorsValueLabelsVisibility = "Chart.PriceScale.Labels.ToggleIndicatorsValueLabelsVisibility", ChartPriceScaleLabelsToggleNoOverlappingLabelsVisibility = "Chart.PriceScale.Labels.ToggleNoOverlappingLabelsVisibility", ChartPriceScaleLabelsToggleSeriesLastValueVisibility = "Chart.PriceScale.Labels.ToggleSeriesLastValueVisibility", ChartPriceScaleLabelsToggleSymbolNameLabelsVisibility = "Chart.PriceScale.Labels.ToggleSymbolNameLabelsVisibility", ChartPriceScaleLabelsToggleSymbolPrevCloseValueVisibility = "Chart.PriceScale.Labels.ToggleSymbolPrevCloseValueVisibility", ChartPriceScaleMergeAllScales = "Chart.PriceScale.MergeAllScales", ChartPriceScaleMergeAllScalesToLeft = "Chart.PriceScale.MergeAllScalesToLeft", ChartPriceScaleMergeAllScalesToRight = "Chart.PriceScale.MergeAllScalesToRight", ChartPriceScaleMoveToLeft = "Chart.PriceScale.MoveToLeft", ChartPriceScaleMoveToRight = "Chart.PriceScale.MoveToRight", ChartPriceScaleReset = "Chart.PriceScale.Reset", ChartPriceScaleToggleAddOrderPlusButtonVisibility = "Chart.PriceScale.ToggleAddOrderPlusButtonVisibility", ChartPriceScaleToggleAutoScale = "Chart.PriceScale.ToggleAutoScale", ChartPriceScaleToggleAutoScaleSeriesOnly = "Chart.PriceScale.ToggleAutoScaleSeriesOnly", ChartPriceScaleToggleCountdownToBarCloseVisibility = "Chart.PriceScale.ToggleCountdownToBarCloseVisibility", ChartPriceScaleToggleIndexedTo100 = "Chart.PriceScale.ToggleIndexedTo100", ChartPriceScaleToggleInvertScale = "Chart.PriceScale.ToggleInvertScale", ChartPriceScaleToggleLogarithmic = "Chart.PriceScale.ToggleLogarithmic", ChartPriceScaleTogglePercentage = "Chart.PriceScale.TogglePercentage", ChartPriceScaleToggleRegular = "Chart.PriceScale.ToggleRegular", ChartRedo = "Chart.Redo", ChartRemoveAllIndicators = "Chart.RemoveAllIndicators", ChartRemoveAllIndicatorsAndLineTools = "Chart.RemoveAllIndicatorsAndLineTools", ChartRemoveAllLineTools = "Chart.RemoveAllLineTools", ChartScalesReset = "Chart.Scales.Reset", ChartScalesToggleLockPriceToBarRatio = "Chart.Scales.ToggleLockPriceToBarRatio", ChartScrollToLineTool = "Chart.ScrollToLineTool", ChartSelectedObjectHide = "Chart.SelectedObject.Hide", ChartSelectedObjectRemove = "Chart.SelectedObject.Remove", ChartSelectedObjectShow = "Chart.SelectedObject.Show", ChartSelectedObjectShowSettingsDialog = "Chart.SelectedObject.ShowSettingsDialog", ChartSelectedObjectInsertRowTable = "Chart.SelectedObject.InsertRowTable", ChartSelectedObjectInsertColumnTable = "Chart.SelectedObject.InsertColumnTable", ChartSelectedObjectRemoveRowTable = "Chart.SelectedObject.RemoveRowTable", ChartSelectedObjectRemoveColumnTable = "Chart.SelectedObject.RemoveColumnTable", ChartSelectedObjectToggleLocked = "Chart.SelectedObject.ToggleLocked", ChartSelectedObjectToggleAnchored = "Chart.SelectedObject.ToggleAnchored", ChartSeriesPriceScaleToggleAutoScale = "Chart.Series.PriceScale.ToggleAutoScale", ChartSeriesPriceScaleToggleIndexedTo100 = "Chart.Series.PriceScale.ToggleIndexedTo100", ChartSeriesPriceScaleToggleInvertPriceScale = "Chart.Series.PriceScale.ToggleInvertPriceScale", ChartSeriesPriceScaleToggleLogarithmic = "Chart.Series.PriceScale.ToggleLogarithmic", ChartSeriesPriceScaleTogglePercentage = "Chart.Series.PriceScale.TogglePercentage", ChartSeriesPriceScaleToggleRegular = "Chart.Series.PriceScale.ToggleRegular", ChartSessionBreaksToggleVisibility = "Chart.SessionBreaks.ToggleVisibility", ChartSetSession = "Chart.SetSession", ChartSourceChangePriceScale = "Chart.Source.ChangePriceScale", ChartSourceMergeDown = "Chart.Source.MergeDown", ChartSourceMergeUp = "Chart.Source.MergeUp", ChartSourceMoveToNoScale = "Chart.Source.MoveToNoScale", ChartSourceMoveToOtherScale = "Chart.Source.MoveToOtherScale", ChartSourceMoveToPane = "Chart.Source.MoveToPane", ChartSourceUnmergeDown = "Chart.Source.UnmergeDown", ChartSourceUnmergeUp = "Chart.Source.UnmergeUp", ChartSourceVisualOrder = "Chart.Source.VisualOrder", ChartSourceVisualOrderBringForward = "Chart.Source.VisualOrder.BringForward", ChartSourceVisualOrderBringToFront = "Chart.Source.VisualOrder.BringToFront", ChartSourceVisualOrderSendBackward = "Chart.Source.VisualOrder.SendBackward", ChartSourceVisualOrderSendToBack = "Chart.Source.VisualOrder.SendToBack", ChartSourceResetInputPoints = "Chart.Source.ResetInputPoints", ChartOpenTableView = "Chart.OpenTableView", ChartTimeScaleReset = "Chart.TimeScale.Reset", ChartUndo = "Chart.Undo", ChartSourceIntervalsVisibility = "Chart.Source.IntervalsVisibility", ChartSourceIntervalsVisibilityCurrentAndAbove = "Chart.Source.IntervalsVisibility.CurrentAndAbove", ChartSourceIntervalsVisibilityCurrentAndBelow = "Chart.Source.IntervalsVisibility.CurrentAndBelow", ChartSourceIntervalsVisibilityOnlyCurrent = "Chart.Source.IntervalsVisibility.Current", ChartSourceIntervalsVisibilityAll = "Chart.Source.IntervalsVisibility.All", ObjectsTreeCreateGroup = "ObjectsTree.CreateGroup", ObjectsTreeRemoveItem = "ObjectsTree.RemoveItem", ObjectsTreeRenameItem = "ObjectsTree.RenameItem", ObjectsTreeToggleItemLocked = "ObjectsTree.ToggleItemLocked", ObjectsTreeToggleItemVisibility = "ObjectsTree.ToggleItemVisibility", TradingAddOrder = "Trading.AddOrder", TradingCancelOrder = "Trading.CancelOrder", TradingClosePosition = "Trading.ClosePosition", TradingCustomActionId = "Trading.CustomActionId", TradingDOMPlaceLimitOrder = "Trading.DOMPlaceLimitOrder", TradingDOMPlaceMarketOrder = "Trading.DOMPlaceMarketOrder", TradingDOMPlaceStopLimitOrder = "Trading.DOMPlaceStopLimitOrder", TradingDOMPlaceStopOrder = "Trading.DOMPlaceStopOrder", TradingEditOrder = "Trading.EditOrder", TradingModifyPosition = "Trading.ModifyPosition", TradingReversePosition = "Trading.ReversePosition", TradingSellBuyButtonsToggleVisibility = "Trading.SellBuyButtonsToggleVisibility", TradingTradeFromChart = "Trading.TradeFromChart", TradingNoOverlapMode = "Trading.NoOverlapMode", WatchlistAddSelectedSymbolsToCompare = "Watchlist.AddSelectedSymbolsToCompare ", WatchlistAddSymbolToCompare = "Watchlist.AddSymbolToCompare", WatchlistAddSymbolToSection = "Watchlist.AddSymbolToSection", WatchlistAddSymbol = "Watchlist.AddSymbol", WatchlistRemoveSection = "Watchlist.RemoveSection", WatchlistRenameSection = "Watchlist.RenameSection" } export declare enum ChartStyle { Bar = 0, Candle = 1, Line = 2, Area = 3, Renko = 4, Kagi = 5, PnF = 6, LineBreak = 7, HeikinAshi = 8, HollowCandle = 9, Baseline = 10, HiLo = 12, Column = 13, LineWithMarkers = 14, Stepline = 15, HLCArea = 16, VolCandle = 19, HLCBars = 21 } /** * Mode to clear the marks on the chart. */ export declare enum ClearMarksMode { /** Will clear both bar marks AND timescale marks - default value */ All = 0, /** Will only clear bar marks */ BarMarks = 1, /** Will only clear timescale marks */ TimeScaleMarks = 2 } export declare enum ConnectionStatus { Connected = 1, Connecting = 2, Disconnected = 3, Error = 4 } /** * Filled area type. */ export declare enum FilledAreaType { /** * Filled area type for plots. */ TypePlots = "plot_plot", /** * Filled area type for bands. */ TypeHlines = "hline_hline" } /** * Histogram Direction. * * Will determine which side of the chart that the histogram appears on. */ export declare enum HHistDirection { LeftToRight = "left_to_right", RightToLeft = "right_to_left" } /** * An enum describing a plot style. */ export declare enum LineStudyPlotStyle { /** * Line plot style. */ Line = 0, /** * Histogram plot style. */ Histogram = 1, /** * Cross plot style. */ Cross = 3, /** * Area plot style. */ Area = 4, /** * Column plot style. */ Columns = 5, /** * Circles plot style. */ Circles = 6, /** * Line with breaks plot style. */ LineWithBreaks = 7, /** * Area with breaks plot style. */ AreaWithBreaks = 8, /** * Step line plot style. */ StepLine = 9, /** * Step line with diamonds plot style. */ StepLineWithDiamonds = 10, /** * Step line with breaks, like LineWithBreaks */ StepLineWithBreaks = 11 } /** * A line style. */ export declare enum LineStyle { /** * Solid line style. */ Solid = 0, /** * Dotted line style. */ Dotted = 1, /** * Dashed line style. */ Dashed = 2 } export declare enum MarkLocation { AboveBar = "AboveBar", BelowBar = "BelowBar", Top = "Top", Bottom = "Bottom", Right = "Right", Left = "Left", Absolute = "Absolute", AbsoluteUp = "AbsoluteUp", AbsoluteDown = "AbsoluteDown" } /** * Market status for the symbol. */ export declare enum MarketStatus { Open = "market", Pre = "pre_market", Post = "post_market", Close = "out_of_session", Holiday = "holiday" } export declare enum MenuItemType { Separator = "separator", Action = "action" } export declare enum NotificationType { Error = 0, Success = 1 } export declare enum OhlcStudyPlotStyle { OhlcBars = "ohlc_bars", OhlcCandles = "ohlc_candles" } export declare enum OrderOrPositionMessageType { Information = "information", Warning = "warning", Error = "error" } export declare enum OrderStatus { Canceled = 1, Filled = 2, Inactive = 3, Placing = 4, Rejected = 5, Working = 6 } export declare enum OrderStatusFilter { All = 0, Canceled = 1, Filled = 2, Inactive = 3, Rejected = 5, Working = 6 } export declare enum OrderTicketFocusControl { LimitPrice = 1, StopPrice = 2, TakeProfit = 3, StopLoss = 4, Quantity = 5 } export declare enum OrderType { Limit = 1, Market = 2, Stop = 3, StopLimit = 4 } /** * Plot line style */ export declare enum OverrideLineStyle { /** * Solid line style. */ Solid = 0, /** * Dotted line style. */ Dotted = 1, /** * Dashed line style. */ Dashed = 2 } /** * Last value label mode. */ export declare enum OverridePriceAxisLastValueMode { /** * Price and % value. */ LastPriceAndPercentageValue = 0, /** * Value according to scale. */ LastValueAccordingToScale = 1 } export declare enum ParentType { Order = 1, Position = 2, IndividualPosition = 3 } export declare enum PlDisplay { Money = 0, Pips = 1, Percentage = 2 } export declare enum PriceScaleMode { /** Normal mode of the price scale */ Normal = 0, /** Logarithmic mode of the price scale */ Log = 1, /** Percentage mode of the price scale */ Percentage = 2, /** Indexed to 100 mode of the price scale */ IndexedTo100 = 3 } export declare enum SeriesType { Bars = 0, Candles = 1, Line = 2, Area = 3, HeikenAshi = 8, HollowCandles = 9, Baseline = 10, HiLo = 12, Column = 13, LineWithMarkers = 14, Stepline = 15, HLCArea = 16, VolCandle = 19, HLCBars = 21, Renko = 4, Kagi = 5, PointAndFigure = 6, LineBreak = 7 } export declare enum Side { Buy = 1, Sell = -1 } /** * Enumeration of the built-in formatters for the Account Manager columns. * Refer to the [Value formatters](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters) section for more information. */ export declare enum StandardFormatterName { Date = "date", DateOrDateTime = "dateOrDateTime", Default = "default", Fixed = "fixed", FixedInCurrency = "fixedInCurrency", VariablePrecision = "variablePrecision", FormatQuantity = "formatQuantity", FormatPrice = "formatPrice", FormatPriceForexSup = "formatPriceForexSup", FormatExitLevels = "formatExitLevels", FormatPriceInCurrency = "formatPriceInCurrency", IntegerSeparated = "integerSeparated", LocalDate = "localDate", LocalDateOrDateTime = "localDateOrDateTime", Percentage = "percentage", ColoredPercentage = "coloredPercentage", Pips = "pips", Profit = "profit", ProfitInInstrumentCurrency = "profitInInstrumentCurrency", ProfitInPercent = "profitInPercent", Side = "side", PositionSide = "positionSide", Status = "status", Symbol = "symbol", Text = "text", Type = "type", MarginPercent = "marginPercent", Empty = "empty" } export declare enum StudyInputType { Integer = "integer", Float = "float", Price = "price", Bool = "bool", Text = "text", Symbol = "symbol", Session = "session", Source = "source", Resolution = "resolution", Time = "time", BarTime = "bar_time", Color = "color", Textarea = "text_area" } export declare enum StudyPlotDisplayTarget { None = 0, Pane = 1, DataWindow = 2, PriceScale = 4, StatusLine = 8, All = 4294967295 } export declare enum StudyPlotType { Line = "line", Colorer = "colorer", BarColorer = "bar_colorer", BgColorer = "bg_colorer", TextColorer = "text_colorer", OhlcColorer = "ohlc_colorer", CandleWickColorer = "wick_colorer", CandleBorderColorer = "border_colorer", UpColorer = "up_colorer", DownColorer = "down_colorer", Shapes = "shapes", Chars = "chars", Arrows = "arrows", Data = "data", DataOffset = "dataoffset", OhlcOpen = "ohlc_open", OhlcHigh = "ohlc_high", OhlcLow = "ohlc_low", OhlcClose = "ohlc_close" } export declare enum StudyTargetPriceScale { Right = 0, Left = 1, NoScale = 2 } export declare enum TimeFrameType { PeriodBack = "period-back", TimeRange = "time-range" } export declare enum TimeHoursFormat { TwentyFourHours = "24-hours", TwelveHours = "12-hours" } export declare enum TradedGroupHorizontalAlignment { Left = 0, Center = 1, Right = 2 } export declare enum VisibilityType { AlwaysOn = "alwaysOn", VisibleOnMouseOver = "visibleOnMouseOver", AlwaysOff = "alwaysOff" } /** * Returns a build version string. For example "CL v23.012 (internal id e0d59dc3 @ 2022-08-23T06:07:00.808Z)". * * @returns The build version string. */ export declare function version(): string; /** * 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; * // let i: Index = 42; // this fails to compile * let i: Index = 42 as Index; // OK * @example * type TagName = Nominal; */ export declare type Nominal = T & { /* eslint-disable-next-line jsdoc/require-jsdoc */ [Symbol.species]: Name; }; /** * Override properties for the Abcd drawing tool. */ export interface AbcdLineToolOverrides { /** Default value: `false` */ "linetoolabcd.bold": boolean; /** Default value: `#089981` */ "linetoolabcd.color": string; /** Default value: `12` */ "linetoolabcd.fontsize": number; /** Default value: `false` */ "linetoolabcd.italic": boolean; /** Default value: `2` */ "linetoolabcd.linewidth": number; /** Default value: `#ffffff` */ "linetoolabcd.textcolor": string; } /** * Overrides for the 'Accelerator Oscillator' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AcceleratorOscillatorIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `histogram` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#000080` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Defines a whitelist / blacklist of studies or drawing tools. */ export interface AccessList { /** * List type. * Supported values are: * `black` (all listed items should be disabled), * `white` (only the listed items should be enabled). */ type: "black" | "white"; /** Array of items which should be considered part of the access list */ tools: AccessListItem[]; } export interface AccessListItem { /** * Name of the study / drawing tool. * Use the same name as seen in the UI for drawings, * and use the same names as in the pop-ups for indicators. */ name: string; /** * Whether this study should be visible but look as if it's disabled. * If the study is grayed out and user clicks it, then the `onGrayedObjectClicked` function is called. */ grayed?: boolean; } /** Column properties for the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/) pages. */ export interface AccountManagerColumnBase { /** Column title. It will be displayed in the table's header row. */ label: string; /** * Horizontal alignment of the cell value. The default value is `left`. * * | Alignment | Description | * |--------------|----------------| * | left | It aligns the cell value to the left. | * | right | It aligns the cell value to the right. | */ alignment?: CellAlignment; /** Unique column identifier. */ id: string; /** * Defines a formatter to be applied for data formatting, which can either belong to the `StandardFormatterName` or `FormatterName` type. * If no specific formatter is set, the value is displayed as is. * * Default formatter names are enumerated in {@link StandardFormatterName}. * Refer to the [Built-in formatters](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#built-in-formatters) section to see the full list of formatters. * * You can also create custom formatters using the {@link AccountManagerInfo.customFormatters} property. */ formatter?: TFormatterName; /** * The `dataFields` array contains fields from an order/position data object. * `dataFields` is used to generate the values displayed in a column. * The displayed value in the column updates only when the corresponding values in the data object change. * * If no {@link formatter} is specified, the displayed values will be space-separated in the column. * When a `formatter` is defined, it processes only the specified values. * If an empty array is assigned to `dataFields`, the `formatter` will receive the entire data object. * * **Example** * * - For a column with `dataFields` set as `['avgPrice', 'qty']`, the displayed value updates only when the `avgPrice` or `qty` values in the data object change. * - For a column with an empty `dataFields` array, the displayed value updates if any values in the data object change. */ dataFields: TFormatterName extends StandardFormatterName ? StandardFormattersDependenciesMapping[TFormatterName] : string[]; /** * Data object key that is used for data sorting. * * If `sortProp` is not provided, the first element of the `dataFields` array will be used. * If the `dataFields` array is empty, the column sorting will be unavailable. */ sortProp?: string; /** When set to `true` will prevent column sorting. */ notSortable?: boolean; /** Tooltip string for the column. */ help?: string; /** * `highlightDiff` can be set with [`StandardFormatterName.FormatPrice`](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#formatPrice) * and [`StandardFormatterName.FormatPriceForexSup`](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#formatPriceForexSup) formatters to highlight the changes of the field. * If `highlightDiff is `true`, the custom formatters will also get previous values. */ highlightDiff?: boolean; /** Setting `notHideable` to `true` prevents the column from being hidden. */ notHideable?: boolean; /** Setting `hideByDefault` to `true` hides the column by default. */ hideByDefault?: boolean; /** Key of the row object that is used to get the tooltip to display when hovering over a cell. * The tooltip property refers to an object whose keys are property names and * values are the corresponding tooltips. */ tooltipProperty?: string; /** If set to `true`, the first character of every word in the sentence in the column * will be capitalized. The default value is `true`. */ isCapitalize?: boolean; /** Setting `showZeroValues` to `true` hides any zero values. The default value is `true`. */ showZeroValues?: boolean; } /** * The information object that is used to build the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/). */ export interface AccountManagerInfo { /** Name of the broker */ accountTitle: string; /** * Custom fields that are always displayed at the top-right corner of the Account Manager. * Refer to the [Account Summary row](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#account-summary-row) section for more information. */ summary: AccountManagerSummaryField[]; /** * An optional array for defining [custom formatters](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#custom-formatters). * Each formatter description is an object with the following fields: * * - `name` ({@link FormatterName}): Unique formatter name. * * - `formatText` ({@link TableFormatTextFunction}): * Function that is used for formatting a cell value to a string. * The `formatText` field is required because it is used to generate exported data. * You can return an empty string if you do not need this function. * * - `formatElement` ({@link CustomTableFormatElementFunction} | `undefined`): * Optional function that is used for formatting a cell value to a string or an HTML element. * * If the `formatElement` function is provided, it only handles the formatting of displayed values. * Otherwise the `formatText` function is used. * For optimal performance, it is recommended to only use `formatText` if you intend to display only string values. * * **Example** * ```ts * { * name: 'closeButton' as FormatterName, // Typecast to FormatterName. Use constant in real code * formatText: () => '', // Returns an empty string because we don't need to display this in the exported data * formatElement: ({ values: [id] }: TableFormatterInputs<[id: string]>) => { * const button = document.createElement('button'); * * button.innerText = 'Close'; * * button.addEventListener('click', () => { * event.stopPropagation(); * * closePosition(id); * }); * * return button; * }, * } * ``` */ customFormatters?: CustomTableElementFormatter[]; /** An array of data objects that create columns for the [Orders](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#orders-and-positions) page. * You can display any field of an {@link Order} * or add your own fields to an order object and display them. */ orderColumns: OrderTableColumn[]; /** Optional sorting of the orders table. */ orderColumnsSorting?: SortingParameters; /** * An array of data objects that create columns for the [History](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#history) page, which displays all orders from previous sessions. * This page is enabled by default and requires the {@link IBrokerTerminal.ordersHistory} method to be implemented. * To hide the page, set {@link BrokerConfigFlags.supportOrdersHistory} to `false`. */ historyColumns?: AccountManagerColumn[]; /** Optional sorting of the table on the [History](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#history) page. */ historyColumnsSorting?: SortingParameters; /** * An array of data objects that create columns for the [Positions](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#orders-and-positions) page. * You can display any field of a {@link Position} * or add your own fields to a position object and display them. */ positionColumns?: AccountManagerColumn[]; /** * You can display any field of an {@link IndividualPosition} * or add your own fields to an individualPosition object and display them. */ individualPositionColumns?: AccountManagerColumn[]; /** Adds [custom pages](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/#custom-pages) to the Account Manager. Each page is a set of tables. */ pages: AccountManagerPage[]; /** Optional list of statuses to be used in the orders filter. Default list is used if it hasn't been set. */ possibleOrderStatuses?: OrderStatus[]; /** Margin used */ marginUsed?: IWatchedValue; /** * A function for creating a custom [context menu](https://www.tradingview.com/charting-library-docs/latest/ui_elements/context-menu) for positions and orders in the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/). * @param contextMenuEvent - MouseEvent or TouchEvent object passed by a browser * @param activePageActions - array of `ActionMetaInfo` items for the current page * @returns `Promise` that is resolved with an array of `ActionMetaInfo` */ contextMenuActions?(contextMenuEvent: MouseEvent | TouchEvent, activePageActions: ActionMetaInfo[]): Promise; } /** A description of an additional Account Manager tab. */ export interface AccountManagerPage { /** Unique identifier of a page */ id: string; /** Page title. It is the tab name. */ title: string; /** It is possible to display one or more tables in this tab. */ tables: AccountManagerTable[]; /** Controls whether the number of items is displayed on a custom page. Set to `true` to display the count, or `false` to hide it. */ displayCounterInTab?: boolean; } /** Custom field that will always be shown above the pages of the Account manager */ export interface AccountManagerSummaryField { /** Text to display for the summary field */ text: string; /** A WatchedValue object that can be used to read the state of field. */ wValue: IWatchedValueReadonly; /** * Name of the formatter to be used for data formatting. If `formatter` is not * set the value is displayed as is. Formatter can be a default or a custom one. */ formatter?: StandardFormatterName; /** Optional parameter which can be set to display the field by default. */ isDefault?: boolean; /** An optional parameter with text explaining the contents of this field. */ informerMessage?: string; } /** * Account Summary table meta-info * **NOTE**: make sure that you have a unique string `id` field in each row to identify it. */ export interface AccountManagerTable { /** Unique identifier of a table. */ id: string; /** Optional title of a table. */ title?: string; /** Table columns */ columns: AccountManagerColumn[]; /** Optional sorting of the table. If set, then the table will be sorted by these parameters, if the user has not enabled sorting by a specific column. */ initialSorting?: SortingParameters; /** This delegate is used to watch the data changes and update the table. * Pass new account manager data row by row to the `fire` method of the delegate. */ changeDelegate: ISubscription<(data: {}) => void>; /** This delegate is used to watch the data deletions and update the table. * Pass the id of the row that needs to be deleted to the `fire` method of the delegate. */ deleteDelegate?: ISubscription<(id: string) => void>; /** Option flags for the table. */ flags?: AccountManagerTableFlags; /** * This function is used to request table data. It should return Promise (or Deferred) and resolve it with an array of data rows. * * Each row is an object. Keys of this object are column names with the corresponding values. * * There is a predefined field `isTotalRow` which can be used to mark a row that should be at the bottom of the table. * @param paginationLastId - Last pagination id */ getData(paginationLastId?: string | number): Promise<{}[]>; } /** Boolean options for the account manager table */ export interface AccountManagerTableFlags { /** Does the table support pagination */ supportPagination?: boolean; } export interface AccountMetainfo { /** * Account ID */ id: AccountId; /** * Account Name */ name: string; /** * Account Type */ type?: "live" | "demo"; /** * Currency */ currency?: string; /** * Currency Sign (Prefix) */ currencySign?: string; } /** * Overrides for the 'Accumulation/Distribution' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AccumulationDistributionIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#2196F3` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Accumulative Swing Index' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AccumulativeSwingIndexIndicatorOverrides { /** Default value: `15` */ "asi.display": number; /** Default value: `0` */ "asi.linestyle": number; /** Default value: `1` */ "asi.linewidth": number; /** Default value: `line` */ "asi.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "asi.trackprice": boolean; /** Default value: `0` */ "asi.transparency": number; /** Default value: `#2196F3` */ "asi.color": string; [key: string]: StudyOverrideValueType; } export interface ActionDescription { /** Displayed text for action */ text?: "-" | string; /** Is a menu separator */ separator?: boolean; /** Keyboard shortcut for the action. Displayed as hint text. */ shortcut?: string; /** Tooltip text to be displayed when hovering over the action item. */ tooltip?: string; /** Value of the checkbox. */ checked?: boolean; /** Getter to retrieve the current checkbox value. */ checkedStateSource?: () => boolean; /** Whether menu action represents a checkbox state. Set it to true if you need a checkbox. */ checkable?: boolean; /** Whether the action is enabled. Set to false to disabled the action. */ enabled?: boolean; /** External link (url) which will be opened upon clicking the menu item. */ externalLink?: boolean; /** * A string of SVG icon for an action. A string should be a string representation of SVG (not a path/URL). */ icon?: string; } /** Menu action which provides a callback function to be executed. Action is executed when user clicks the item. */ export interface ActionDescriptionWithCallback extends ActionDescription { /** Action to be executed when user clicks the menu item. */ action: (a?: ActionDescription) => void; } export interface ActionOptions extends Partial>, Pick { /** * A function which will be called when an action should be executed (e.g. when a user clicks on the item). */ onExecute?: OnActionExecuteHandler; } export interface ActionState { /** * Human-readable, non-unique ID of an action item. Similar to {@link label}, but language-agnostic. */ actionId: ActionId; /** Is active */ active: boolean; /** * Text title of an action */ label: string; /** * Text title of an action consisting of several styled sections. If not defined then {@link label} is used instead. */ styledLabel?: StyledText[]; /** * Whether an action is disabled or not (disabled actions are usually cannot be executed and displayed grayed out) */ disabled: boolean; /** * Sub-items of an action */ subItems: IActionVariant[]; /** * Whether an action should have a checkbox next to it. */ checkable: boolean; /** * If {@link checkable} is `true` then whether current state is checked or not. */ checked: boolean; /** * A hint of an action. */ hint?: string; /** * A string of SVG icon for an action. A string should be a string representation of SVG (not a path/URL). */ icon?: string; /** * If {@link checkable} is `true` then an icon to be used when {@link checked} is `true`. */ iconChecked?: string; /** * Whether an action is still in loading state (it means that it's data is not ready yet). * Usually in this case a spinner/loader will be displayed instead of this action. */ loading: boolean; /** * A string that represents a shortcut hint for this action. */ shortcutHint?: string; /** * A flag indicating whether the menu should remain open after clicking on the item. * When `true` the menu will remain open. */ doNotCloseOnClick: boolean; /** * This flag indicates that this action is static content only and is not interactive. */ noInteractive?: boolean; } export interface ActionsFactory { /** * Creates an action with provided options. */ createAction: (options: ActionOptions) => IAction; /** * Creates an action that will wait for a promise to get its options. * In terms of GUI until a promise is resolved the loader/spinner will be displayed. */ createAsyncAction: (loader: () => Promise) => IAction; /** * Creates a separator item. */ createSeparator: () => ISeparator; } /** * Custom symbol info fields to be shown in the Security Info dialog. */ export interface AdditionalSymbolInfoField { /** the name of the new symbol info */ title: string; /** used to look up a property from the symbol info returned from the chart's datafeed */ propertyName: string; } /** * Overrides for the 'Advance/Decline' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AdvanceDeclineIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#2196F3` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Anchored VWAP' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AnchoredVWAPIndicatorOverrides { /** Default value: `#4caf50` */ "background #1.color": string; /** Default value: `95` */ "background #1.transparency": number; /** Default value: `true` */ "background #1.visible": boolean; /** Default value: `15` */ "vwap.display": number; /** Default value: `#1e88e5` */ "vwap.color": string; /** Default value: `0` */ "vwap.linestyle": number; /** Default value: `1` */ "vwap.linewidth": number; /** Default value: `line` */ "vwap.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "vwap.trackprice": boolean; /** Default value: `0` */ "vwap.transparency": number; /** Default value: `15` */ "lower band #1.display": number; /** Default value: `#4caf50` */ "lower band #1.color": string; /** Default value: `0` */ "lower band #1.linestyle": number; /** Default value: `1` */ "lower band #1.linewidth": number; /** Default value: `line` */ "lower band #1.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "lower band #1.trackprice": boolean; /** Default value: `0` */ "lower band #1.transparency": number; /** Default value: `15` */ "lower band #2.display": number; /** Default value: `#808000` */ "lower band #2.color": string; /** Default value: `0` */ "lower band #2.linestyle": number; /** Default value: `1` */ "lower band #2.linewidth": number; /** Default value: `line` */ "lower band #2.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "lower band #2.trackprice": boolean; /** Default value: `0` */ "lower band #2.transparency": number; /** Default value: `15` */ "lower band #3.display": number; /** Default value: `#00897b` */ "lower band #3.color": string; /** Default value: `0` */ "lower band #3.linestyle": number; /** Default value: `1` */ "lower band #3.linewidth": number; /** Default value: `line` */ "lower band #3.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "lower band #3.trackprice": boolean; /** Default value: `0` */ "lower band #3.transparency": number; /** Default value: `15` */ "upper band #1.display": number; /** Default value: `#4caf50` */ "upper band #1.color": string; /** Default value: `0` */ "upper band #1.linestyle": number; /** Default value: `1` */ "upper band #1.linewidth": number; /** Default value: `line` */ "upper band #1.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "upper band #1.trackprice": boolean; /** Default value: `0` */ "upper band #1.transparency": number; /** Default value: `15` */ "upper band #2.display": number; /** Default value: `#808000` */ "upper band #2.color": string; /** Default value: `0` */ "upper band #2.linestyle": number; /** Default value: `1` */ "upper band #2.linewidth": number; /** Default value: `line` */ "upper band #2.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "upper band #2.trackprice": boolean; /** Default value: `0` */ "upper band #2.transparency": number; /** Default value: `15` */ "upper band #3.display": number; /** Default value: `#00897b` */ "upper band #3.color": string; /** Default value: `0` */ "upper band #3.linestyle": number; /** Default value: `1` */ "upper band #3.linewidth": number; /** Default value: `line` */ "upper band #3.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "upper band #3.trackprice": boolean; /** Default value: `0` */ "upper band #3.transparency": number; [key: string]: StudyOverrideValueType; } /** * Override properties for the Anchoredvp drawing tool. */ export interface AnchoredvpLineToolOverrides { /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBars2.colors.0": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBars2.colors.1": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBars2.valuesColor": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBarsVA.colors.0": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBarsVA.colors.1": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.hhists.histBarsVA.valuesColor": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.horizlines.pocLines.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.horizlines.vahLines.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.horizlines.valLines.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.graphics.polygons.histBoxBg.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.styles.developingPoc.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.styles.developingVAHigh.color": string; /** Default value: `undefined` */ "linetoolanchoredvp.styles.developingVALow.color": string; } /** * Override properties for the Anchoredvwap drawing tool. */ export interface AnchoredvwapLineToolOverrides { /** Default value: `#4caf50` */ "linetoolanchoredvwap.areaBackground.backgroundColor": string; /** Default value: `true` */ "linetoolanchoredvwap.areaBackground.fillBackground": boolean; /** Default value: `95` */ "linetoolanchoredvwap.areaBackground.transparency": number; /** Default value: `#4caf50` */ "linetoolanchoredvwap.filledAreasStyle.Background_1.color": string; /** Default value: `95` */ "linetoolanchoredvwap.filledAreasStyle.Background_1.transparency": number; /** Default value: `true` */ "linetoolanchoredvwap.filledAreasStyle.Background_1.visible": boolean; /** Default value: `Standard Deviation` */ "linetoolanchoredvwap.inputs.Bands Calculation Mode": string; /** Default value: `1` */ "linetoolanchoredvwap.inputs.bands_multiplier": number; /** Default value: `2` */ "linetoolanchoredvwap.inputs.bands_multiplier_2": number; /** Default value: `3` */ "linetoolanchoredvwap.inputs.bands_multiplier_3": number; /** Default value: `true` */ "linetoolanchoredvwap.inputs.calculate_stDev": boolean; /** Default value: `false` */ "linetoolanchoredvwap.inputs.calculate_stDev_2": boolean; /** Default value: `false` */ "linetoolanchoredvwap.inputs.calculate_stDev_3": boolean; /** Default value: `hlc3` */ "linetoolanchoredvwap.inputs.source": string; /** Default value: `0` */ "linetoolanchoredvwap.inputs.start_time": number; /** Default value: `default` */ "linetoolanchoredvwap.precision": string; /** Default value: `#4caf50` */ "linetoolanchoredvwap.styles.LowerBand.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.LowerBand.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.LowerBand.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.LowerBand.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand.transparency": number; /** Default value: `#808000` */ "linetoolanchoredvwap.styles.LowerBand_2.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.LowerBand_2.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_2.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.LowerBand_2.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_2.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.LowerBand_2.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_2.transparency": number; /** Default value: `#00897b` */ "linetoolanchoredvwap.styles.LowerBand_3.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.LowerBand_3.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_3.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.LowerBand_3.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_3.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.LowerBand_3.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.LowerBand_3.transparency": number; /** Default value: `#4caf50` */ "linetoolanchoredvwap.styles.UpperBand.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.UpperBand.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.UpperBand.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.UpperBand.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand.transparency": number; /** Default value: `#808000` */ "linetoolanchoredvwap.styles.UpperBand_2.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.UpperBand_2.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_2.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.UpperBand_2.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_2.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.UpperBand_2.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_2.transparency": number; /** Default value: `#00897b` */ "linetoolanchoredvwap.styles.UpperBand_3.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.UpperBand_3.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_3.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.UpperBand_3.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_3.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.UpperBand_3.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.UpperBand_3.transparency": number; /** Default value: `#1e88e5` */ "linetoolanchoredvwap.styles.VWAP.color": string; /** Default value: `15` */ "linetoolanchoredvwap.styles.VWAP.display": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.VWAP.linestyle": number; /** Default value: `1` */ "linetoolanchoredvwap.styles.VWAP.linewidth": number; /** Default value: `0` */ "linetoolanchoredvwap.styles.VWAP.plottype": number; /** Default value: `false` */ "linetoolanchoredvwap.styles.VWAP.trackPrice": boolean; /** Default value: `0` */ "linetoolanchoredvwap.styles.VWAP.transparency": number; } /** * Override properties for the Arc drawing tool. */ export interface ArcLineToolOverrides { /** Default value: `rgba(233, 30, 99, 0.2)` */ "linetoolarc.backgroundColor": string; /** Default value: `#e91e63` */ "linetoolarc.color": string; /** Default value: `true` */ "linetoolarc.fillBackground": boolean; /** Default value: `2` */ "linetoolarc.linewidth": number; /** Default value: `80` */ "linetoolarc.transparency": number; } export interface AreaStylePreferences { /** Top color of the gradient fill. Must be an RGBA color string (e.g., `"rgba(255, 0, 0, 0.5)"`). */ color1: string; /** Bottom color of the gradient fill. Must be an RGBA color string (e.g., `"rgba(255, 0, 0, 0.5)"`). */ color2: string; /** Line color. Must be a simple color string (e.g., `"red"`, `"#FF0000"`). */ linecolor: string; /** Line Style {@link LineStyle} */ linestyle: number; /** Line width */ linewidth: number; /** * Transparency. Range [0..100] * `0` - fully opaque, * `100` - fully transparent. * * **Note**: Rather use `rgba` color string for setting transparency. */ transparency: number; } /** * Overrides for the 'Arnaud Legoux Moving Average' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ArnaudLegouxMovingAverageIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#2196F3` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Aroon' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AroonIndicatorOverrides { /** Default value: `15` */ "upper.display": number; /** Default value: `0` */ "upper.linestyle": number; /** Default value: `1` */ "upper.linewidth": number; /** Default value: `line` */ "upper.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "upper.trackprice": boolean; /** Default value: `0` */ "upper.transparency": number; /** Default value: `#FB8C00` */ "upper.color": string; /** Default value: `15` */ "lower.display": number; /** Default value: `0` */ "lower.linestyle": number; /** Default value: `1` */ "lower.linewidth": number; /** Default value: `line` */ "lower.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "lower.trackprice": boolean; /** Default value: `0` */ "lower.transparency": number; /** Default value: `#2196F3` */ "lower.color": string; [key: string]: StudyOverrideValueType; } /** * Override properties for the Arrow drawing tool. */ export interface ArrowLineToolOverrides { /** Default value: `false` */ "linetoolarrow.alwaysShowStats": boolean; /** Default value: `false` */ "linetoolarrow.bold": boolean; /** Default value: `false` */ "linetoolarrow.extendLeft": boolean; /** Default value: `false` */ "linetoolarrow.extendRight": boolean; /** Default value: `14` */ "linetoolarrow.fontsize": number; /** Default value: `center` */ "linetoolarrow.horzLabelsAlign": string; /** Default value: `false` */ "linetoolarrow.italic": boolean; /** Default value: `0` */ "linetoolarrow.leftEnd": number; /** Default value: `#2962FF` */ "linetoolarrow.linecolor": string; /** Default value: `0` */ "linetoolarrow.linestyle": number; /** Default value: `2` */ "linetoolarrow.linewidth": number; /** Default value: `1` */ "linetoolarrow.rightEnd": number; /** Default value: `false` */ "linetoolarrow.showAngle": boolean; /** Default value: `false` */ "linetoolarrow.showBarsRange": boolean; /** Default value: `false` */ "linetoolarrow.showDateTimeRange": boolean; /** Default value: `false` */ "linetoolarrow.showDistance": boolean; /** Default value: `false` */ "linetoolarrow.showMiddlePoint": boolean; /** Default value: `false` */ "linetoolarrow.showPercentPriceRange": boolean; /** Default value: `false` */ "linetoolarrow.showPipsPriceRange": boolean; /** Default value: `false` */ "linetoolarrow.showPriceLabels": boolean; /** Default value: `false` */ "linetoolarrow.showPriceRange": boolean; /** Default value: `2` */ "linetoolarrow.statsPosition": number; /** Default value: `#2962FF` */ "linetoolarrow.textcolor": string; /** Default value: `bottom` */ "linetoolarrow.vertLabelsAlign": string; } /** * Override properties for the Arrowmarkdown drawing tool. */ export interface ArrowmarkdownLineToolOverrides { /** Default value: `#CC2F3C` */ "linetoolarrowmarkdown.arrowColor": string; /** Default value: `false` */ "linetoolarrowmarkdown.bold": boolean; /** Default value: `#CC2F3C` */ "linetoolarrowmarkdown.color": string; /** Default value: `14` */ "linetoolarrowmarkdown.fontsize": number; /** Default value: `false` */ "linetoolarrowmarkdown.italic": boolean; /** Default value: `true` */ "linetoolarrowmarkdown.showLabel": boolean; } /** * Override properties for the Arrowmarker drawing tool. */ export interface ArrowmarkerLineToolOverrides { /** Default value: `#1E53E5` */ "linetoolarrowmarker.backgroundColor": string; /** Default value: `true` */ "linetoolarrowmarker.bold": boolean; /** Default value: `16` */ "linetoolarrowmarker.fontsize": number; /** Default value: `false` */ "linetoolarrowmarker.italic": boolean; /** Default value: `#1E53E5` */ "linetoolarrowmarker.textColor": string; } /** * Override properties for the Arrowmarkleft drawing tool. */ export interface ArrowmarkleftLineToolOverrides { /** Default value: `#2962FF` */ "linetoolarrowmarkleft.arrowColor": string; /** Default value: `false` */ "linetoolarrowmarkleft.bold": boolean; /** Default value: `#2962FF` */ "linetoolarrowmarkleft.color": string; /** Default value: `14` */ "linetoolarrowmarkleft.fontsize": number; /** Default value: `false` */ "linetoolarrowmarkleft.italic": boolean; /** Default value: `true` */ "linetoolarrowmarkleft.showLabel": boolean; } /** * Override properties for the Arrowmarkright drawing tool. */ export interface ArrowmarkrightLineToolOverrides { /** Default value: `#2962FF` */ "linetoolarrowmarkright.arrowColor": string; /** Default value: `false` */ "linetoolarrowmarkright.bold": boolean; /** Default value: `#2962FF` */ "linetoolarrowmarkright.color": string; /** Default value: `14` */ "linetoolarrowmarkright.fontsize": number; /** Default value: `false` */ "linetoolarrowmarkright.italic": boolean; /** Default value: `true` */ "linetoolarrowmarkright.showLabel": boolean; } /** * Override properties for the Arrowmarkup drawing tool. */ export interface ArrowmarkupLineToolOverrides { /** Default value: `#089981` */ "linetoolarrowmarkup.arrowColor": string; /** Default value: `false` */ "linetoolarrowmarkup.bold": boolean; /** Default value: `#089981` */ "linetoolarrowmarkup.color": string; /** Default value: `14` */ "linetoolarrowmarkup.fontsize": number; /** Default value: `false` */ "linetoolarrowmarkup.italic": boolean; /** Default value: `true` */ "linetoolarrowmarkup.showLabel": boolean; } export interface AvailableZOrderOperations { /** 'Bring Forward' is possible */ bringForwardEnabled: boolean; /** 'Bring to Front' is possible */ bringToFrontEnabled: boolean; /** 'Send Backward' is possible */ sendBackwardEnabled: boolean; /** 'Send to Back' is possible */ sendToBackEnabled: boolean; } /** * Overrides for the 'Average Directional Index' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AverageDirectionalIndexIndicatorOverrides { /** Default value: `15` */ "adx.display": number; /** Default value: `0` */ "adx.linestyle": number; /** Default value: `1` */ "adx.linewidth": number; /** Default value: `line` */ "adx.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "adx.trackprice": boolean; /** Default value: `0` */ "adx.transparency": number; /** Default value: `#FF5252` */ "adx.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Average Price' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AveragePriceIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#2196F3` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Average True Range' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AverageTrueRangeIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#801922` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Awesome Oscillator' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface AwesomeOscillatorIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `histogram` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#000080` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Balance of Power' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface BalanceofPowerIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#FF5252` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Override properties for the Balloon drawing tool. */ export interface BalloonLineToolOverrides { /** Default value: `rgba(156, 39, 176, 0.7)` */ "linetoolballoon.backgroundColor": string; /** Default value: `rgba(156, 39, 176, 0)` */ "linetoolballoon.borderColor": string; /** Default value: `#ffffff` */ "linetoolballoon.color": string; /** Default value: `14` */ "linetoolballoon.fontsize": number; /** Default value: `30` */ "linetoolballoon.transparency": number; } /** * Bar data point */ export interface Bar { /** Bar time. * Amount of **milliseconds** since Unix epoch start in **UTC** timezone. * `time` for daily, weekly, and monthly bars is expected to be a trading day (not session start day) at 00:00 UTC. * The library adjusts time according to `session` from {@link LibrarySymbolInfo}. */ time: number; /** Opening price */ open: number; /** High price */ high: number; /** Low price */ low: number; /** Closing price */ close: number; /** Trading Volume */ volume?: number; } export interface BarState { isLast(): boolean; } export interface BarStylePreferences { /** Up bar color */ upColor: string; /** Down bar color */ downColor: string; /** Bar color determined by previous close value */ barColorsOnPrevClose: boolean; /** Whether to draw opening value for bar */ dontDrawOpen: boolean; /** Draw thin bars. Default - `true` */ thinBars: boolean; } /** * Override properties for the Barspattern drawing tool. */ export interface BarspatternLineToolOverrides { /** Default value: `#2962FF` */ "linetoolbarspattern.color": string; /** Default value: `false` */ "linetoolbarspattern.flipped": boolean; /** Default value: `false` */ "linetoolbarspattern.mirrored": boolean; /** Default value: `0` */ "linetoolbarspattern.mode": number; } export interface BaseInputFieldValidatorResult { /** Is the base input value valid */ valid: boolean; } export interface BaselineStylePreferences { /** Top fill color of positive area */ topFillColor1: string; /** Bottom fill color of positive area */ topFillColor2: string; /** Top fill color of negative area */ bottomFillColor1: string; /** Bottom fill color of negative area */ bottomFillColor2: string; /** Positive area line color */ topLineColor: string; /** Negative area line color */ bottomLineColor: string; /** Baseline line color */ baselineColor: string; /** Positive area line width */ topLineWidth: number; /** Negative area line width */ bottomLineWidth: number; /** Top line style */ topLineStyle: number; /** Bottom line style */ bottomLineStyle: number; /** * Transparency. Range [0..100] * `0` - fully opaque, * `100` - fully transparent. * * **Note**: Rather use `rgba` color string for setting transparency. */ transparency: number; /** Baseline level percentage */ baseLevelPercentage: number; } /** * Override properties for the Beziercubic drawing tool. */ export interface BeziercubicLineToolOverrides { /** Default value: `rgba(103, 58, 183, 0.2)` */ "linetoolbeziercubic.backgroundColor": string; /** Default value: `false` */ "linetoolbeziercubic.extendLeft": boolean; /** Default value: `false` */ "linetoolbeziercubic.extendRight": boolean; /** Default value: `false` */ "linetoolbeziercubic.fillBackground": boolean; /** Default value: `0` */ "linetoolbeziercubic.leftEnd": number; /** Default value: `#673ab7` */ "linetoolbeziercubic.linecolor": string; /** Default value: `0` */ "linetoolbeziercubic.linestyle": number; /** Default value: `2` */ "linetoolbeziercubic.linewidth": number; /** Default value: `0` */ "linetoolbeziercubic.rightEnd": number; /** Default value: `80` */ "linetoolbeziercubic.transparency": number; } /** * Override properties for the Bezierquadro drawing tool. */ export interface BezierquadroLineToolOverrides { /** Default value: `rgba(41, 98, 255, 0.2)` */ "linetoolbezierquadro.backgroundColor": string; /** Default value: `false` */ "linetoolbezierquadro.extendLeft": boolean; /** Default value: `false` */ "linetoolbezierquadro.extendRight": boolean; /** Default value: `false` */ "linetoolbezierquadro.fillBackground": boolean; /** Default value: `0` */ "linetoolbezierquadro.leftEnd": number; /** Default value: `#2962FF` */ "linetoolbezierquadro.linecolor": string; /** Default value: `0` */ "linetoolbezierquadro.linestyle": number; /** Default value: `2` */ "linetoolbezierquadro.linewidth": number; /** Default value: `0` */ "linetoolbezierquadro.rightEnd": number; /** Default value: `50` */ "linetoolbezierquadro.transparency": number; } /** * Overrides for the 'Bollinger Bands %B' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface BollingerBandsBIndicatorOverrides { /** Default value: `#26A69A` */ "hlines background.color": string; /** Default value: `90` */ "hlines background.transparency": number; /** Default value: `true` */ "hlines background.visible": boolean; /** Default value: `#787B86` */ "upperlimit.color": string; /** Default value: `2` */ "upperlimit.linestyle": number; /** Default value: `1` */ "upperlimit.linewidth": number; /** Default value: `true` */ "upperlimit.visible": boolean; /** Default value: `1` */ "upperlimit.value": number; /** Default value: `#787B86` */ "lowerlimit.color": string; /** Default value: `2` */ "lowerlimit.linestyle": number; /** Default value: `1` */ "lowerlimit.linewidth": number; /** Default value: `true` */ "lowerlimit.visible": boolean; /** Default value: `0` */ "lowerlimit.value": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `true` */ "plot.visible": boolean; /** Default value: `#22AB94` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Bollinger Bands' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface BollingerBandsIndicatorOverrides { /** Default value: `#2196F3` */ "plots background.color": string; /** Default value: `95` */ "plots background.transparency": number; /** Default value: `true` */ "plots background.visible": boolean; /** Default value: `0` */ "median.linestyle": number; /** Default value: `1` */ "median.linewidth": number; /** Default value: `line` */ "median.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "median.trackprice": boolean; /** Default value: `0` */ "median.transparency": number; /** Default value: `true` */ "median.visible": boolean; /** Default value: `#FF6D00` */ "median.color": string; /** Default value: `0` */ "upper.linestyle": number; /** Default value: `1` */ "upper.linewidth": number; /** Default value: `line` */ "upper.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "upper.trackprice": boolean; /** Default value: `0` */ "upper.transparency": number; /** Default value: `true` */ "upper.visible": boolean; /** Default value: `#2196F3` */ "upper.color": string; /** Default value: `0` */ "lower.linestyle": number; /** Default value: `1` */ "lower.linewidth": number; /** Default value: `line` */ "lower.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "lower.trackprice": boolean; /** Default value: `0` */ "lower.transparency": number; /** Default value: `true` */ "lower.visible": boolean; /** Default value: `#2196F3` */ "lower.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Bollinger Bands Width' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface BollingerBandsWidthIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#FF6D00` */ "plot.color": string; [key: string]: StudyOverrideValueType; } export interface BoolInputOptions extends CommonInputOptions { } /** * An object that contains information about a bracket order. */ export interface BracketOrder extends BracketOrderBase, CustomFields { } export interface BracketOrderBase extends PlacedOrderBase { /** If an order is a bracket, it should contain an ID of a parent order/position. */ parentId: string; /** Type of the bracket's parent. */ parentType: ParentType; /** Exit level ID. The way we distinguish exit levels */ exitLevelId?: string; } export interface Brackets { /** Stop loss */ stopLoss?: number; /** Guaranteed Stop */ guaranteedStop?: number; /** Take Profit */ takeProfit?: number; /** Trailing Stop Pips */ trailingStopPips?: number; /** * [Exit levels](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/brackets#multiple-exit-levels) associated with the position/order. * Used when {@link BrokerConfigFlags.supportMultipleExitLevels} is enabled. */ exitLevels?: ExitLevel[]; } export interface BrokerConfigFlags { /** * Changes _Amount_ to _Quantity_ in Order Ticket. * @default false */ showQuantityInsteadOfAmount?: boolean; /** * Enables order brackets: take-profit and stop-loss. * @default false */ supportOrderBrackets?: boolean; /** * Enables stop loss orders. If this flag is set to `true`, the library displays stop loss orders and a user can place a stop loss order using the Order Ticket. * If you set this flag to `false`, the {@link BrokerConfigFlags.supportTrailingStop} and/or {@link BrokerConfigFlags.supportGuaranteedStop} flag should be set to `true`. * If the `supportStopLoss`, `supportTrailingStop`, and `supportGuaranteedStop` flags are set to `false`, the default value will be used. * @default true */ supportStopLoss?: boolean; /** * Enables trailing stop orders. * If you set this flag to `true`, the library displays trailing stop orders and a user can place a trailing stop order using the Order Ticket. * @default false */ supportTrailingStop?: boolean; /** * Enables guaranteed stop loss orders. * If you set this flag to `true`, the library displays guaranteed stop orders and a user can place a guaranteed stop order using the Order Ticket. * @default false */ supportGuaranteedStop?: boolean; /** * Enables [positions](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions). * This flag requires the [`positions`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerTerminal#positions) method to be implemented. * If you set `supportPositions` to `false`, the _Positions_ tab in the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/) will be hidden. * @default true */ supportPositions?: boolean; /** * Enables position brackets: take-profit and stop-loss orders. * If you set `supportPositionBrackets` to `true`, the library displays an _Edit_ button for positions and _Edit position..._ in the position's context menu. * This flag requires the {@link IBrokerTerminal.editPositionBrackets} method to be implemented. * @default false */ supportPositionBrackets?: boolean; /** * Enables brackets for individual positions: take-profit and stop-loss orders. * If you set this flag to `true`, the library displays an _Edit_ button for individual positions and _Edit position..._ in the individual position's context menu. * This flag requires the {@link IBrokerTerminal.editIndividualPositionBrackets} method to be implemented. * * Ensure {@link BrokerConfigFlags.supportPositionBrackets} is set to `false`. * If `supportPositionBrackets` is enabled, it takes precedence, and individual positions will not be displayed on the chart. * @default false */ supportIndividualPositionBrackets?: boolean; /** * Enables [position netting](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#position-netting). * This flag requires the [`positions`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerTerminal#positions) and [`individualPositions`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerTerminal#individualpositions) method to be implemented. * * If you set this flag to `true`, the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/) will have two tabs: _Individual Positions_ and _Net Positions_. * * @default false */ supportPositionNetting?: boolean; /** * Enables [position closing](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#close-positions). * - If `supportClosePosition` is set to `false`, positions are closed using [market orders](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/orders#order-types) of the opposite side. The library calls the {@link IBrokerTerminal.placeOrder} method, passing the `isClose` property set to `true` in the `PreOrder` object. * - If `supportClosePosition` is set to `true`, the library calls the {@link IBrokerTerminal.closePosition} method. * @default false */ supportClosePosition?: boolean; /** * Enables individual [position closing](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#close-positions). * This flag requires the {@link IBrokerTerminal.closeIndividualPosition} method to be implemented. * @default false */ supportCloseIndividualPosition?: boolean; /** * Enables order price editing. * If you set this flag to `false`, the price control in the [_Order Ticket_](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) will be disabled when users modify orders. * * To completely disable the ability to modify an order (including hiding the _Modify_ button and disabling drag-and-drop actions on the chart), this flag must be set to `false` in conjunction with {@link BrokerConfigFlags.supportEditAmount} and {@link BrokerConfigFlags.supportModifyBrackets}. * @default true */ supportModifyOrderPrice?: boolean; /** * Enables order quantity editing. * If you set this flag to `false`, the quantity control in the [_Order Ticket_](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) will be disabled when users modify orders. * * To completely disable the ability to modify an order (including hiding the _Modify_ button and disabling drag-and-drop actions on the chart), this flag must be set to `false` in conjunction with {@link BrokerConfigFlags.supportModifyOrderPrice} and {@link BrokerConfigFlags.supportModifyBrackets}. * @default true */ supportEditAmount?: boolean; /** * Enables [order brackets](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/brackets) editing. * If you set this flag to `false`, the bracket's control in the [_Order Ticket_](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) will be disabled, * and the _Modify_ button will be hidden from the chart and in the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/). * * To completely disable the ability to modify an order (including hiding the _Modify_ button and disabling drag-and-drop actions on the chart), this flag must be set to `false` in conjunction with {@link BrokerConfigFlags.supportModifyOrderPrice} and {@link BrokerConfigFlags.supportEditAmount}. * @default true */ supportModifyBrackets?: boolean; /** * Enables Level 2 data for the [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/depth-of-market) widget. * This flag requires the [`subscribeDepth`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/trading-platform-methods#subscribedepth) and [`unsubscribeDepth`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/trading-platform-methods#unsubscribedepth) methods to be implemented. * @default false */ supportLevel2Data?: boolean; /** * Enables [multiple positions](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#multiposition) for one instrument at the same time. * * Note that if the flag is set to `true`: * - The [default reversal](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#default-reversal) in the library does not work. You need to implement the [native reversal](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#native-reversal) on your backend side. * - The _Flatten_ button in the [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/depth-of-market) widget will be disabled. * @default false */ supportMultiposition?: boolean; /** * Allows using your own [profit and loss](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/profit-and-loss) (P&L) values for positions. * By default, `supportPLUpdate` is set to `true`. * This means you should calculate the P&L value for a position and [provide values](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/profit-and-loss#provide-pl-values) to the library. * * If `supportPLUpdate` is set to `false`, the library automatically calculates P&L values as the difference between the current trade and the average position price. * However, we recommend using your own P&L calculations for positions. * This helps avoid any discrepancies between the P&L values of the account and positions due to potential delays. * @default true */ supportPLUpdate?: boolean; /** * Enables [position reversing](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#reverse-positions). * If `supportReversePosition` is set to `false`, the _Reverse Position_ button will be hidden from the UI. * @default false */ supportReversePosition?: boolean; /** * Enables [native](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#native-reversal) position reversing. You should implement the {@link IBrokerTerminal.reversePosition} method to process reversing on your backend side. * Note that the {@link supportReversePosition} flag should be set to `true` to enable the reverse option in the UI. * * If `supportNativeReversePosition` is set to `false`, the library handles reversing using the built-in mechanism. For more information, refer to the [Default reversal](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#default-reversal) section. * @default false */ supportNativeReversePosition?: boolean; /** * Enables market orders type in the Order Ticket. * @default true */ supportMarketOrders?: boolean; /** * Enables limit orders type in the Order Ticket. * @default true */ supportLimitOrders?: boolean; /** * Enables stop orders type in the Order Ticket. * @default true */ supportStopOrders?: boolean; /** * Enables stop-limit orders type in the Order Ticket. * @default false */ supportStopLimitOrders?: boolean; /** * Enables demo live switcher. * @default true */ supportDemoLiveSwitcher?: boolean; /** * Enables brackets for market orders. * @default true */ supportMarketBrackets?: boolean; /** * Enables symbol searching. * @default false */ supportSymbolSearch?: boolean; /** * Allows modifying existing [order duration](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#enable-time-in-force-menu). * @default false */ supportModifyDuration?: boolean; /** * Allows modifying trailing stop orders. * @default true */ supportModifyTrailingStop?: boolean; /** * Allows margin. * If `supportMargin` is set to `true`, you should call {@link IBrokerConnectionAdapterHost.marginAvailableUpdate} when the Trading Platform subscribes to margin available updates using {@link IBrokerTerminal.subscribeMarginAvailable}. * @default false */ supportMargin?: boolean; /** * Allows providing the estimated commission, fees, margin, and other order information before placing the order without actually placing it. * This information will be displayed in the _Order confirmation_ dialog. * * This flag requires the {@link IBrokerTerminal.previewOrder} method to be implemented and `confirmId` parameter to be passed in the {@link IBrokerTerminal.placeOrder} method. * Refer to [Enable order preview](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#add-custom-fields) for more information. * @default false */ supportPlaceOrderPreview?: boolean; /** * Allows providing the estimated commission, fees, margin, and other order information before modifying the order without actually modifying it. * This information will be displayed in the _Order confirmation_ dialog. * * This flag requires the {@link IBrokerTerminal.previewOrder} method to be implemented and `confirmId` parameter to be passed in the {@link IBrokerTerminal.modifyOrder} method. * Refer to [Enable order preview](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#add-custom-fields) for more information. * @default false */ supportModifyOrderPreview?: boolean; /** * Enables trading with leverage. * If the flag is set to `true`, you should calculate the leverage using the {@link IBrokerTerminal.leverageInfo} method. * @default false */ supportLeverage?: boolean; /** * Displays a leverage button in the UI. * Note that you should also enable the {@link BrokerConfigFlags.supportLeverage} flag. * If `supportLeverageButton` is set to `true`, the leverage input field appears in the Order Ticket. * Clicking the input field activates a dedicated Leverage Dialog. * @default true */ supportLeverageButton?: boolean; /** * Enables the _Orders History_ tab in the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/). * This flag requires the [`ordersHistory`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerTerminal#ordershistory) method to be implemented. * The method should return a list of orders with the `filled`, `cancelled`, and `rejected` statuses from previous trade sessions. * * To disable order history, set `supportOrdersHistory` to `false`. * @default true */ supportOrdersHistory?: boolean; /** * Enables adding brackets to the existing order. * @default true */ supportAddBracketsToExistingOrder?: boolean; /** * Allows getting crypto balances for an account. * Balances are displayed as the first table of the _Account Summary_ tab. * Use the flag for crypto currencies only. * This flag requires the {@link IBrokerConnectionAdapterHost.cryptoBalanceUpdate} method to be implemented. * @default false */ supportBalances?: boolean; /** * Closing a position cancels its brackets. * @default false */ closePositionCancelsOrders?: boolean; /** * `Stop Loss` and `Take Profit` are added or removed only together for a position. * @default false */ supportOnlyPairPositionBrackets?: boolean; /** * `Stop Loss` and `Take Profit` are added or removed only together for an order. * @default false */ supportOnlyPairOrderBrackets?: boolean; /** * Enables cryptocurrency trading (exchanging). * This flag switches the Order Ticket to Crypto Exchange mode, * which provides additional controls for entering the quantity in either the base or quote currency. * @default false */ supportCryptoExchangeOrderTicket?: boolean; /** * This flag automatically switches Order Ticket to the Crypto Exchange mode if symbol type is `crypto` * @default false */ supportSymbolSpecificCryptoOrderTicket?: boolean; /** * Enables displaying Profit & Loss values in instrument currency. * @default false */ positionPLInInstrumentCurrency?: boolean; /** * Enables the display of Risk in Currency control value in instrument currency for brackets. * @default false */ showRiskInInstrumentCurrency?: boolean; /** * Enables [partial position closing](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#partial-closing). * This flag requires the {@link IBrokerTerminal.closePosition} method to be implemented. * @default false */ supportPartialClosePosition?: boolean; /** * Enables [partial individual position closing](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#partial-closing). * This flag requires the {@link IBrokerTerminal.closeIndividualPosition} method to be implemented. * @default false */ supportPartialCloseIndividualPosition?: boolean; /** * Modifies the confirmation dialog text for closing a bracket order. * When set to `true`, the text explicitly states that cancelling a bracket order will also cancel its associated pair. * When set to `false`, the text will include the ID of the singular bracket order being cancelled. * * Note that the library does not cancel orders itself. * You should implement the {@link IBrokerTerminal.cancelOrder} or {@link IBrokerTerminal.cancelOrders } method. * @default false */ supportCancellingBothBracketsOnly?: boolean; /** * Enables crypto brackets. * @default false */ supportCryptoBrackets?: boolean; /** * Enables the _Notifications log_ tab in the [Account Manager](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/). * @default true */ showNotificationsLog?: boolean; /** * Whether stop orders should behave like Market-if-Touched in both directions. * Enabling this flag prevents the check of stop price direction from the stop limit Order Ticket. * @default false */ supportStopOrdersInBothDirections?: boolean; /** * Whether stop-limit orders should behave like Limit-if-Touched in both directions. * Enabling this flag prevents the check of stop price direction from the stop limit Order Ticket. */ supportStopLimitOrdersInBothDirections?: boolean; /** * Whether the integration supports limit price validation in the order ticket to eliminate the possibility to place * an order on the wrong side of the market that will most likely trigger and get filled immediately. */ supportStrictCheckingLimitOrderPrice?: boolean; /** * If set to `true`, executions are displayed on the chart. * This flag requires the [`executions`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerTerminal#executions) method to be implemented. * @default true */ supportExecutions?: boolean; /** * Allows modifying order type. * @default false */ supportModifyOrderType?: boolean; /** * Enables closing of individual positions in FIFO order. * @default false */ requiresFIFOCloseIndividualPositions?: boolean; /** * Enables [multiple exit levels](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/brackets#multiple-exit-levels) (multiple take-profit and stop-loss orders) for a single parent order or position. * When enabled, the [Order Ticket](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) allows users to *Add level* for brackets. */ supportMultipleExitLevels?: boolean; /** * Allows brokers to add their own parameters that will be displayed in Order info. * @default false */ supportCustomOrderInfo?: boolean; /** * Allows brokers to send position closing information that will be displayed in Close Position Dialog * @default false */ supportPreviewClosePosition?: boolean; } export interface BrokerCustomUI { /** * Shows Order Ticket to create or modify an order and executes handler if Buy/Sell/Modify is pressed. * @param {OrderTemplate|Order} order - order to be placed or modified * @param {OrderTicketFocusControl} [focus] - Control to focus on when dialog is opened */ showOrderDialog?: (order: OrderTemplate | Order, focus?: OrderTicketFocusControl) => Promise; /** * Shows the Position Dialog * @param {Position|IndividualPosition} position - position to be placed or modified * @param {Brackets} brackets - brackets for the position * @param {OrderTicketFocusControl} [focus] - Control to focus on when dialog is opened */ showPositionDialog?: (position: Position | IndividualPosition, brackets: Brackets, focus?: OrderTicketFocusControl) => Promise; /** * Shows a confirmation dialog and executes handler if YES/OK is pressed. * @param {Order} order - order to be cancelled */ showCancelOrderDialog?: (order: Order) => Promise; /** * Shows the Close Position Dialog. * @param {Position|IndividualPosition} position - position to be closed */ showClosePositionDialog?: (position: Position | IndividualPosition) => Promise; /** * Shows the Reverse Position Dialog. * @param {Position} position - position to be reversed */ showReversePositionDialog?: (position: Position) => Promise; } /** * Override properties that can be used within {@link TradingCustomization.brokerOrder} of the {@link TradingTerminalWidgetOptions.trading_customization} object. * * These properties follow a hierarchical naming pattern: `{Side}.{State}.{Element}.{Property}`. * Refer to [Override properties](https://www.tradingview.com/charting-library-docs/latest/customization/overrides/trading-overrides#override-properties) section for a detailed explanation of this naming pattern. */ export interface BrokerOrderOverrides { "buy.normal.borderBackgroundColor": string; "buy.normal.borderColor": string; "buy.normal.close.activeColor": string; "buy.normal.close.backgroundColor": string; "buy.normal.close.iconColor": string; "buy.normal.confirm.activeColor": string; "buy.normal.confirm.backgroundColor": string; "buy.normal.confirm.borderColor": string; "buy.normal.confirm.disableBackgroundColor": string; "buy.normal.confirm.disableTextColor": string; "buy.normal.confirm.textColor": string; "buy.normal.disabledLineColor": string; "buy.normal.informer.backgroundColor": string; "buy.normal.informer.iconColor": string; "buy.normal.lineColor": string; "buy.normal.negativePlColor": string; "buy.normal.pointBackgroundColor": string; "buy.normal.pointShadowColor": string; "buy.normal.positivePlColor": string; "buy.normal.qty.activeColor": string; "buy.normal.qty.backgroundColor": string; "buy.normal.qty.dividerColor": string; "buy.normal.qty.textColor": string; "buy.normal.text.backgroundColor": string; "buy.normal.text.buttonTextColor": string; "buy.normal.text.dividerColor": string; "buy.normal.text.textColor": string; "buy.normal.text.activeColor": string; "buy.disabled.borderBackgroundColor": string; "buy.disabled.borderColor": string; "buy.disabled.close.activeColor": string; "buy.disabled.close.backgroundColor": string; "buy.disabled.close.iconColor": string; "buy.disabled.confirm.activeColor": string; "buy.disabled.confirm.backgroundColor": string; "buy.disabled.confirm.borderColor": string; "buy.disabled.confirm.disableBackgroundColor": string; "buy.disabled.confirm.disableTextColor": string; "buy.disabled.confirm.textColor": string; "buy.disabled.disabledLineColor": string; "buy.disabled.informer.backgroundColor": string; "buy.disabled.informer.iconColor": string; "buy.disabled.lineColor": string; "buy.disabled.negativePlColor": string; "buy.disabled.pointBackgroundColor": string; "buy.disabled.pointShadowColor": string; "buy.disabled.positivePlColor": string; "buy.disabled.qty.activeColor": string; "buy.disabled.qty.backgroundColor": string; "buy.disabled.qty.dividerColor": string; "buy.disabled.qty.textColor": string; "buy.disabled.text.backgroundColor": string; "buy.disabled.text.buttonTextColor": string; "buy.disabled.text.dividerColor": string; "buy.disabled.text.textColor": string; "buy.disabled.text.activeColor": string; "sell.normal.borderBackgroundColor": string; "sell.normal.borderColor": string; "sell.normal.close.activeColor": string; "sell.normal.close.backgroundColor": string; "sell.normal.close.iconColor": string; "sell.normal.confirm.activeColor": string; "sell.normal.confirm.backgroundColor": string; "sell.normal.confirm.borderColor": string; "sell.normal.confirm.disableBackgroundColor": string; "sell.normal.confirm.disableTextColor": string; "sell.normal.confirm.textColor": string; "sell.normal.disabledLineColor": string; "sell.normal.informer.backgroundColor": string; "sell.normal.informer.iconColor": string; "sell.normal.lineColor": string; "sell.normal.negativePlColor": string; "sell.normal.pointBackgroundColor": string; "sell.normal.pointShadowColor": string; "sell.normal.positivePlColor": string; "sell.normal.qty.activeColor": string; "sell.normal.qty.backgroundColor": string; "sell.normal.qty.dividerColor": string; "sell.normal.qty.textColor": string; "sell.normal.text.backgroundColor": string; "sell.normal.text.buttonTextColor": string; "sell.normal.text.dividerColor": string; "sell.normal.text.textColor": string; "sell.normal.text.activeColor": string; "sell.disabled.borderBackgroundColor": string; "sell.disabled.borderColor": string; "sell.disabled.close.activeColor": string; "sell.disabled.close.backgroundColor": string; "sell.disabled.close.iconColor": string; "sell.disabled.confirm.activeColor": string; "sell.disabled.confirm.backgroundColor": string; "sell.disabled.confirm.borderColor": string; "sell.disabled.confirm.disableBackgroundColor": string; "sell.disabled.confirm.disableTextColor": string; "sell.disabled.confirm.textColor": string; "sell.disabled.disabledLineColor": string; "sell.disabled.informer.backgroundColor": string; "sell.disabled.informer.iconColor": string; "sell.disabled.lineColor": string; "sell.disabled.negativePlColor": string; "sell.disabled.pointBackgroundColor": string; "sell.disabled.pointShadowColor": string; "sell.disabled.positivePlColor": string; "sell.disabled.qty.activeColor": string; "sell.disabled.qty.backgroundColor": string; "sell.disabled.qty.dividerColor": string; "sell.disabled.qty.textColor": string; "sell.disabled.text.backgroundColor": string; "sell.disabled.text.buttonTextColor": string; "sell.disabled.text.dividerColor": string; "sell.disabled.text.textColor": string; "sell.disabled.text.activeColor": string; "takeProfit.normal.borderBackgroundColor": string; "takeProfit.normal.borderColor": string; "takeProfit.normal.close.activeColor": string; "takeProfit.normal.close.backgroundColor": string; "takeProfit.normal.close.iconColor": string; "takeProfit.normal.confirm.activeColor": string; "takeProfit.normal.confirm.backgroundColor": string; "takeProfit.normal.confirm.borderColor": string; "takeProfit.normal.confirm.disableBackgroundColor": string; "takeProfit.normal.confirm.disableTextColor": string; "takeProfit.normal.confirm.textColor": string; "takeProfit.normal.disabledLineColor": string; "takeProfit.normal.informer.backgroundColor": string; "takeProfit.normal.informer.iconColor": string; "takeProfit.normal.lineColor": string; "takeProfit.normal.negativePlColor": string; "takeProfit.normal.pointBackgroundColor": string; "takeProfit.normal.pointShadowColor": string; "takeProfit.normal.positivePlColor": string; "takeProfit.normal.qty.activeColor": string; "takeProfit.normal.qty.backgroundColor": string; "takeProfit.normal.qty.dividerColor": string; "takeProfit.normal.qty.textColor": string; "takeProfit.normal.text.backgroundColor": string; "takeProfit.normal.text.buttonTextColor": string; "takeProfit.normal.text.dividerColor": string; "takeProfit.normal.text.textColor": string; "takeProfit.normal.text.activeColor": string; "takeProfit.normal.text.hintAreaColor": string; "takeProfit.normal.movingBackgroundColor": string; "takeProfit.disabled.borderBackgroundColor": string; "takeProfit.disabled.borderColor": string; "takeProfit.disabled.close.activeColor": string; "takeProfit.disabled.close.backgroundColor": string; "takeProfit.disabled.close.iconColor": string; "takeProfit.disabled.confirm.activeColor": string; "takeProfit.disabled.confirm.backgroundColor": string; "takeProfit.disabled.confirm.borderColor": string; "takeProfit.disabled.confirm.disableBackgroundColor": string; "takeProfit.disabled.confirm.disableTextColor": string; "takeProfit.disabled.confirm.textColor": string; "takeProfit.disabled.disabledLineColor": string; "takeProfit.disabled.informer.backgroundColor": string; "takeProfit.disabled.informer.iconColor": string; "takeProfit.disabled.lineColor": string; "takeProfit.disabled.negativePlColor": string; "takeProfit.disabled.pointBackgroundColor": string; "takeProfit.disabled.pointShadowColor": string; "takeProfit.disabled.positivePlColor": string; "takeProfit.disabled.qty.activeColor": string; "takeProfit.disabled.qty.backgroundColor": string; "takeProfit.disabled.qty.dividerColor": string; "takeProfit.disabled.qty.textColor": string; "takeProfit.disabled.text.backgroundColor": string; "takeProfit.disabled.text.buttonTextColor": string; "takeProfit.disabled.text.dividerColor": string; "takeProfit.disabled.text.textColor": string; "takeProfit.disabled.text.activeColor": string; "takeProfit.disabled.text.hintAreaColor": string; "takeProfit.disabled.movingBackgroundColor": string; "stopLoss.normal.borderBackgroundColor": string; "stopLoss.normal.borderColor": string; "stopLoss.normal.close.activeColor": string; "stopLoss.normal.close.backgroundColor": string; "stopLoss.normal.close.iconColor": string; "stopLoss.normal.confirm.activeColor": string; "stopLoss.normal.confirm.backgroundColor": string; "stopLoss.normal.confirm.borderColor": string; "stopLoss.normal.confirm.disableBackgroundColor": string; "stopLoss.normal.confirm.disableTextColor": string; "stopLoss.normal.confirm.textColor": string; "stopLoss.normal.disabledLineColor": string; "stopLoss.normal.informer.backgroundColor": string; "stopLoss.normal.informer.iconColor": string; "stopLoss.normal.lineColor": string; "stopLoss.normal.negativePlColor": string; "stopLoss.normal.pointBackgroundColor": string; "stopLoss.normal.pointShadowColor": string; "stopLoss.normal.positivePlColor": string; "stopLoss.normal.qty.activeColor": string; "stopLoss.normal.qty.backgroundColor": string; "stopLoss.normal.qty.dividerColor": string; "stopLoss.normal.qty.textColor": string; "stopLoss.normal.text.backgroundColor": string; "stopLoss.normal.text.buttonTextColor": string; "stopLoss.normal.text.dividerColor": string; "stopLoss.normal.text.textColor": string; "stopLoss.normal.text.activeColor": string; "stopLoss.normal.text.hintAreaColor": string; "stopLoss.normal.movingBackgroundColor": string; "stopLoss.disabled.borderBackgroundColor": string; "stopLoss.disabled.borderColor": string; "stopLoss.disabled.close.activeColor": string; "stopLoss.disabled.close.backgroundColor": string; "stopLoss.disabled.close.iconColor": string; "stopLoss.disabled.confirm.activeColor": string; "stopLoss.disabled.confirm.backgroundColor": string; "stopLoss.disabled.confirm.borderColor": string; "stopLoss.disabled.confirm.disableBackgroundColor": string; "stopLoss.disabled.confirm.disableTextColor": string; "stopLoss.disabled.confirm.textColor": string; "stopLoss.disabled.disabledLineColor": string; "stopLoss.disabled.informer.backgroundColor": string; "stopLoss.disabled.informer.iconColor": string; "stopLoss.disabled.lineColor": string; "stopLoss.disabled.negativePlColor": string; "stopLoss.disabled.pointBackgroundColor": string; "stopLoss.disabled.pointShadowColor": string; "stopLoss.disabled.positivePlColor": string; "stopLoss.disabled.qty.activeColor": string; "stopLoss.disabled.qty.backgroundColor": string; "stopLoss.disabled.qty.dividerColor": string; "stopLoss.disabled.qty.textColor": string; "stopLoss.disabled.text.backgroundColor": string; "stopLoss.disabled.text.buttonTextColor": string; "stopLoss.disabled.text.dividerColor": string; "stopLoss.disabled.text.textColor": string; "stopLoss.disabled.text.activeColor": string; "stopLoss.disabled.text.hintAreaColor": string; "stopLoss.disabled.movingBackgroundColor": string; } /** * Override properties that can be used within {@link TradingCustomization.brokerPosition} of the {@link TradingTerminalWidgetOptions.trading_customization} object. * * These properties follow a hierarchical naming pattern: `{Side}.{State}.{Element}.{Property}`. * Refer to [Override properties](https://www.tradingview.com/charting-library-docs/latest/customization/overrides/trading-overrides#override-properties) section for a detailed explanation of this naming pattern. */ export interface BrokerPositionOverrides { "buy.normal.borderBackgroundColor": string; "buy.normal.borderColor": string; "buy.normal.close.activeColor": string; "buy.normal.close.backgroundColor": string; "buy.normal.close.iconColor": string; "buy.normal.confirm.activeColor": string; "buy.normal.confirm.backgroundColor": string; "buy.normal.confirm.borderColor": string; "buy.normal.confirm.disableBackgroundColor": string; "buy.normal.confirm.disableTextColor": string; "buy.normal.confirm.textColor": string; "buy.normal.disabledLineColor": string; "buy.normal.informer.backgroundColor": string; "buy.normal.informer.iconColor": string; "buy.normal.lineColor": string; "buy.normal.negativePlColor": string; "buy.normal.pointBackgroundColor": string; "buy.normal.pointShadowColor": string; "buy.normal.positivePlColor": string; "buy.normal.qty.activeColor": string; "buy.normal.qty.backgroundColor": string; "buy.normal.qty.dividerColor": string; "buy.normal.qty.textColor": string; "buy.normal.reverse.activeColor": string; "buy.normal.reverse.backgroundColor": string; "buy.normal.reverse.borderColor": string; "buy.normal.reverse.iconColor": string; "buy.normal.text.backgroundColor": string; "buy.normal.text.dividerColor": string; "buy.normal.text.textColor": string; "buy.disabled.borderBackgroundColor": string; "buy.disabled.borderColor": string; "buy.disabled.close.activeColor": string; "buy.disabled.close.backgroundColor": string; "buy.disabled.close.iconColor": string; "buy.disabled.confirm.activeColor": string; "buy.disabled.confirm.backgroundColor": string; "buy.disabled.confirm.borderColor": string; "buy.disabled.confirm.disableBackgroundColor": string; "buy.disabled.confirm.disableTextColor": string; "buy.disabled.confirm.textColor": string; "buy.disabled.disabledLineColor": string; "buy.disabled.informer.backgroundColor": string; "buy.disabled.informer.iconColor": string; "buy.disabled.lineColor": string; "buy.disabled.negativePlColor": string; "buy.disabled.pointBackgroundColor": string; "buy.disabled.pointShadowColor": string; "buy.disabled.positivePlColor": string; "buy.disabled.qty.activeColor": string; "buy.disabled.qty.backgroundColor": string; "buy.disabled.qty.dividerColor": string; "buy.disabled.qty.textColor": string; "buy.disabled.reverse.activeColor": string; "buy.disabled.reverse.backgroundColor": string; "buy.disabled.reverse.borderColor": string; "buy.disabled.reverse.iconColor": string; "buy.disabled.text.backgroundColor": string; "buy.disabled.text.dividerColor": string; "buy.disabled.text.textColor": string; "sell.normal.borderBackgroundColor": string; "sell.normal.borderColor": string; "sell.normal.close.activeColor": string; "sell.normal.close.backgroundColor": string; "sell.normal.close.iconColor": string; "sell.normal.confirm.activeColor": string; "sell.normal.confirm.backgroundColor": string; "sell.normal.confirm.borderColor": string; "sell.normal.confirm.disableBackgroundColor": string; "sell.normal.confirm.disableTextColor": string; "sell.normal.confirm.textColor": string; "sell.normal.disabledLineColor": string; "sell.normal.informer.backgroundColor": string; "sell.normal.informer.iconColor": string; "sell.normal.lineColor": string; "sell.normal.negativePlColor": string; "sell.normal.pointBackgroundColor": string; "sell.normal.pointShadowColor": string; "sell.normal.positivePlColor": string; "sell.normal.qty.activeColor": string; "sell.normal.qty.backgroundColor": string; "sell.normal.qty.dividerColor": string; "sell.normal.qty.textColor": string; "sell.normal.reverse.activeColor": string; "sell.normal.reverse.backgroundColor": string; "sell.normal.reverse.borderColor": string; "sell.normal.reverse.iconColor": string; "sell.normal.text.backgroundColor": string; "sell.normal.text.dividerColor": string; "sell.normal.text.textColor": string; "sell.disabled.borderBackgroundColor": string; "sell.disabled.borderColor": string; "sell.disabled.close.activeColor": string; "sell.disabled.close.backgroundColor": string; "sell.disabled.close.iconColor": string; "sell.disabled.confirm.activeColor": string; "sell.disabled.confirm.backgroundColor": string; "sell.disabled.confirm.borderColor": string; "sell.disabled.confirm.disableBackgroundColor": string; "sell.disabled.confirm.disableTextColor": string; "sell.disabled.confirm.textColor": string; "sell.disabled.disabledLineColor": string; "sell.disabled.informer.backgroundColor": string; "sell.disabled.informer.iconColor": string; "sell.disabled.lineColor": string; "sell.disabled.negativePlColor": string; "sell.disabled.pointBackgroundColor": string; "sell.disabled.pointShadowColor": string; "sell.disabled.positivePlColor": string; "sell.disabled.qty.activeColor": string; "sell.disabled.qty.backgroundColor": string; "sell.disabled.qty.dividerColor": string; "sell.disabled.qty.textColor": string; "sell.disabled.reverse.activeColor": string; "sell.disabled.reverse.backgroundColor": string; "sell.disabled.reverse.borderColor": string; "sell.disabled.reverse.iconColor": string; "sell.disabled.text.backgroundColor": string; "sell.disabled.text.dividerColor": string; "sell.disabled.text.textColor": string; } /** * Override properties for the Brush drawing tool. */ export interface BrushLineToolOverrides { /** Default value: `#00bcd4` */ "linetoolbrush.backgroundColor": string; /** Default value: `false` */ "linetoolbrush.fillBackground": boolean; /** Default value: `0` */ "linetoolbrush.leftEnd": number; /** Default value: `#00bcd4` */ "linetoolbrush.linecolor": string; /** Default value: `2` */ "linetoolbrush.linewidth": number; /** Default value: `0` */ "linetoolbrush.rightEnd": number; /** Default value: `5` */ "linetoolbrush.smooth": number; /** Default value: `50` */ "linetoolbrush.transparency": number; } /** * Override properties for the Callout drawing tool. */ export interface CalloutLineToolOverrides { /** Default value: `rgba(0, 151, 167, 0.7)` */ "linetoolcallout.backgroundColor": string; /** Default value: `false` */ "linetoolcallout.bold": boolean; /** Default value: `#0097A7` */ "linetoolcallout.bordercolor": string; /** Default value: `#ffffff` */ "linetoolcallout.color": string; /** Default value: `14` */ "linetoolcallout.fontsize": number; /** Default value: `false` */ "linetoolcallout.italic": boolean; /** Default value: `2` */ "linetoolcallout.linewidth": number; /** Default value: `50` */ "linetoolcallout.transparency": number; /** Default value: `false` */ "linetoolcallout.wordWrap": boolean; /** Default value: `200` */ "linetoolcallout.wordWrapWidth": number; } export interface CandleStyleNonThemePreferences { /** Whether to draw the candle wick */ drawWick: boolean; /** Whether to draw the candle body border */ drawBorder: boolean; /** Bar color determined by previous close value */ barColorsOnPrevClose: boolean; /** Whether to draw the candle body */ drawBody: boolean; } export interface CandleStylePreferences extends CandleStyleNonThemePreferences { /** Body color for an up candle */ upColor: string; /** Body color for a down candle */ downColor: string; /** Candle border color */ borderColor: string; /** Up candle border color */ borderUpColor: string; /** Down candle border color */ borderDownColor: string; /** Candle wick color */ wickColor: string; /** Up candle wick color */ wickUpColor: string; /** Down candle wick color */ wickDownColor: string; } /** * Overrides for the 'Chaikin Money Flow' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ChaikinMoneyFlowIndicatorOverrides { /** Default value: `#787B86` */ "zero.color": string; /** Default value: `2` */ "zero.linestyle": number; /** Default value: `1` */ "zero.linewidth": number; /** Default value: `true` */ "zero.visible": boolean; /** Default value: `0` */ "zero.value": number; /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#43A047` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Chaikin Oscillator' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ChaikinOscillatorIndicatorOverrides { /** Default value: `#787B86` */ "zero.color": string; /** Default value: `2` */ "zero.linestyle": number; /** Default value: `1` */ "zero.linewidth": number; /** Default value: `true` */ "zero.visible": boolean; /** Default value: `0` */ "zero.value": number; /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#EC407A` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Chaikin Volatility' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ChaikinVolatilityIndicatorOverrides { /** Default value: `#787B86` */ "zero.color": string; /** Default value: `2` */ "zero.linestyle": number; /** Default value: `1` */ "zero.linewidth": number; /** Default value: `true` */ "zero.visible": boolean; /** Default value: `0` */ "zero.value": number; /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#AB47BC` */ "plot.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Chande Kroll Stop' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ChandeKrollStopIndicatorOverrides { /** Default value: `15` */ "long.display": number; /** Default value: `0` */ "long.linestyle": number; /** Default value: `1` */ "long.linewidth": number; /** Default value: `line` */ "long.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "long.trackprice": boolean; /** Default value: `0` */ "long.transparency": number; /** Default value: `#2196F3` */ "long.color": string; /** Default value: `15` */ "short.display": number; /** Default value: `0` */ "short.linestyle": number; /** Default value: `1` */ "short.linewidth": number; /** Default value: `line` */ "short.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "short.trackprice": boolean; /** Default value: `0` */ "short.transparency": number; /** Default value: `#FF6D00` */ "short.color": string; [key: string]: StudyOverrideValueType; } /** * Overrides for the 'Chande Momentum Oscillator' indicator. * * Use these properties to customize indicator via {@link IChartWidgetApi.createStudy} and {@link IStudyApi.applyOverrides}. */ export interface ChandeMomentumOscillatorIndicatorOverrides { /** Default value: `15` */ "plot.display": number; /** Default value: `0` */ "plot.linestyle": number; /** Default value: `1` */ "plot.linewidth": number; /** Default value: `line` */ "plot.plottype": LineStudyPlotStyleName; /** Default value: `false` */ "plot.trackprice": boolean; /** Default value: `0` */ "plot.transparency": number; /** Default value: `#2196F3` */ "plot.color": string; [key: string]: StudyOverrideValueType; } export interface ChangeAccountSolution { /** id of a sub-account suitable for trading the symbol */ changeAccount: AccountId; } export interface ChangeSymbolSolution { /** the symbol suitable for trading with current sub-account */ changeSymbol: string; } export interface ChangeThemeOptions { /** Disable undo for the theme change */ disableUndo: boolean; } /** * Saved chart data */ export interface ChartData { /** unique ID of the chart (may be `undefined` if it wasn't saved before) */ id?: string | number; /** name of the chart */ name: string; /** symbol of the chart */ symbol: string; /** resolution of the chart */ resolution: ResolutionString; /** content of the chart */ content: string; /** UNIX time when the chart was last modified. Date and time will be displayed in the Load layout dialog. */ timestamp: number; } export interface ChartDescriptionContext { /** Style of chart */ chartType: SeriesType; /** Name of chart style */ chartTypeName: string; /** Symbol's description from the Symbol Info */ description?: string; /** Symbol identifier, typically the symbols ticker or name defined in the Symbol Info */ symbol: string; /** Symbol's exchange */ exchange?: string; /** Symbol's ticker identifier */ ticker?: string; /** Visible time range */ visibleRange: VisibleTimeRange; /** Visible data. Only included if [aria_detailed_chart_descriptions](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#aria_detailed_chart_descriptions) featureset is enabled */ visibleData?: ExportedData; /** The complete Symbol Info for the chart's main series */ symbolInfo: LibrarySymbolInfo | null; /** Index of the current chart within a multi-chart layout */ chartIndex: number; /** Number of visible charts in the current layout */ chartCount: number; /** Symbol's default price formatter */ priceFormatter: ISymbolValueFormatter; /** Resolution (interval) of the chart */ interval: ResolutionString; /** Is the resolution (interval) intraday */ isIntraday: boolean; } /** * Meta information about a saved chart */ export interface ChartMetaInfo { /** unique ID of the chart. */ id: number | string; /** name of the chart */ name: string; /** symbol of the chart */ symbol: string; /** resolution of the chart */ resolution: ResolutionString; /** UNIX time when the chart was last modified */ timestamp: number; } /** * Property overrides that can be used with {@link IChartingLibraryWidget.applyOverrides}. */ export interface ChartPropertiesOverrides { /** * Override values. */ [key: string]: string | number | boolean; /** * A timezone ID. The default value depends on the locale. */ "timezone": TimezoneId; /** * A price scale selection strategy. Determines where price scales should be placed: on the left, on the right, or spread evenly (auto). * * @default 'auto' */ "priceScaleSelectionStrategyName": "left" | "right" | "auto"; /** * Pane background type. In the dark theme, the default value is 'gradient'. * * @default 'solid' */ "paneProperties.backgroundType": ColorTypes; /** * Pane background color. * * @default '#ffffff' */ "paneProperties.background": string; /** * Pane background gradient start color. * * @default '#ffffff' */ "paneProperties.backgroundGradientStartColor": string; /** * Pane background gradient end color. * * @default '#ffffff' */ "paneProperties.backgroundGradientEndColor": string; /** * Pane vertical grid color. * * @default 'rgba(42, 46, 57, 0.06)' */ "paneProperties.vertGridProperties.color": string; /** * Pane vertical grid line style. * * @default LineStyle.Solid */ "paneProperties.vertGridProperties.style": OverrideLineStyle; /** * Pane horizontal grid color. * * @default 'rgba(42, 46, 57, 0.06)' */ "paneProperties.horzGridProperties.color": string; /** * Pane horizontal grid line style. * * @default LineStyle.Solid */ "paneProperties.horzGridProperties.style": OverrideLineStyle; /** * Pane grid line mode. * * @default "both" */ "paneProperties.gridLinesMode": GridLinesMode; /** * Crosshair color. * * @default '#9598A1' */ "paneProperties.crossHairProperties.color": string; /** * Crosshair style. * * @default LineStyle.Dashed */ "paneProperties.crossHairProperties.style": OverrideLineStyle; /** * Crosshair transparency. To use this property, specify `paneProperties.crossHairProperties.color` with a **hexadecimal** value such as `#ff0000`. Otherwise, transparency is not applied. * * @default 0 */ "paneProperties.crossHairProperties.transparency": number; /** * Crosshair width. * * @default 1 */ "paneProperties.crossHairProperties.width": number; /** * Pane auto scaling top margin percentage. * * @default 10 */ "paneProperties.topMargin": number; /** * Pane auto scaling bottom margin percentage. * * @default 8 */ "paneProperties.bottomMargin": number; /** * Pane separator color. * * @default '#EBEBEB' */ "paneProperties.separatorColor": string; /** * Study legend input values visibility. * * @default true */ "paneProperties.legendProperties.showStudyArguments": boolean; /** * Study legend title visibility. * * @default true */ "paneProperties.legendProperties.showStudyTitles": boolean; /** * Toggle the visibility for all studies legend values. * * @default true */ "paneProperties.legendProperties.showStudyValues": boolean; /** * Series legend title visibility. * * @default true */ "paneProperties.legendProperties.showSeriesTitle": boolean; /** * Study legend OHLC values visibility. * * @default true */ "paneProperties.legendProperties.showSeriesOHLC": boolean; /** * Adds the ability to show daily changes in the chart legend. * * @default false */ "paneProperties.legendProperties.showLastDayChange": boolean; /** * Series legend change value visibility. * * @default true */ "paneProperties.legendProperties.showBarChange": boolean; /** * Series series legend close value visibility when on mobile. * * @default true */ "paneProperties.legendProperties.showSeriesLegendCloseOnMobile": boolean; /** * Series legend volume value visibility. * * @default false */ "paneProperties.legendProperties.showVolume": boolean; /** * Legend background visibility. * * @default true */ "paneProperties.legendProperties.showBackground": boolean; /** * Legend background transparency percentage. * * @default 50 */ "paneProperties.legendProperties.backgroundTransparency": number; /** * Scales (axis) border line color. * * @default 'rgba(42, 46, 57, 0)' */ "scalesProperties.lineColor": string; /** * Scales (axis) text color. * * @default '#131722' */ "scalesProperties.textColor": string; /** * Scales (axis) font size. * * @default 12 */ "scalesProperties.fontSize": number; /** * Series last value label visibility. * * @default true */ "scalesProperties.showSeriesLastValue": boolean; /** * Series last value label display mode. * * @default PriceAxisLastValueMode.LastValueAccordingToScale */ "scalesProperties.seriesLastValueMode": OverridePriceAxisLastValueMode; /** * Study label value label visibility. * * @default true */ "scalesProperties.showStudyLastValue": boolean; /** * Symbol name label visibility. * * @default false */ "scalesProperties.showSymbolLabels": boolean; /** * Study plot labels visibility. * * @default false */ "scalesProperties.showStudyPlotLabels": boolean; /** * Bid/ask labels visibility. * * @default false */ "scalesProperties.showBidAskLabels": boolean; /** * Pre/post market price labels visibility. * * @default true */ "scalesProperties.showPrePostMarketPriceLabel": boolean; /** * Sets the highlight color of the scales when adding a drawing. * * @default 'rgba(41, 98, 255, 0.25)' */ "scalesProperties.axisHighlightColor": string; /** * Configures the background color of a label shown on an axis scale when a drawing is selected. * * @default '#2962FF' */ "scalesProperties.axisLineToolLabelBackgroundColorCommon": string; /** * Dynamically changes the background color of all labels on the price scale when a drawing is in motion. * * @default '#143EB3' */ "scalesProperties.axisLineToolLabelBackgroundColorActive": string; /** * Price scale crosshair label visibility. * * @default true */ "scalesProperties.showPriceScaleCrosshairLabel": boolean; /** * Time scale crosshair label visibility. * * @default true */ "scalesProperties.showTimeScaleCrosshairLabel": boolean; /** * Crosshair label light theme background color. * * @default '#131722' */ "scalesProperties.crosshairLabelBgColorLight": string; /** * Crosshair label dark theme background color. * * @default '#363A45' */ "scalesProperties.crosshairLabelBgColorDark": string; /** * When enabled, autoscaling considers only the main series prices and ignores other series added with the _Compare_ button. * * @default false */ "scalesProperties.scaleSeriesOnly": boolean; /** * Main series chart style. * * @default ChartStyle.Candle */ "mainSeriesProperties.style": ChartStyle; /** * Displays the countdown to the bar closing on the price scale. Available only for [intraday](https://www.tradingview.com/charting-library-docs/latest/connecting_data/time-and-sessions/configure-datafeed-resolutions#resolution-in-minutes-intraday) resolutions. * * @default false */ "mainSeriesProperties.showCountdown": boolean; /** * Main series bid & ask visibility * * @default false */ "mainSeriesProperties.bidAsk.visible": boolean; /** * Style of the line for bid & ask * * @default LineStyle.Dotted */ "mainSeriesProperties.bidAsk.lineStyle": OverrideLineStyle; /** * Width of the line for bid & ask * * @default 1 */ "mainSeriesProperties.bidAsk.lineWidth": number; /** * Color line for the bid * * @default '#2962FF' */ "mainSeriesProperties.bidAsk.bidLineColor": string; /** * Color line for the ask * * @default '#F7525F' */ "mainSeriesProperties.bidAsk.askLineColor": string; /** * High/low price lines visibility. * * @default false */ "mainSeriesProperties.highLowAvgPrice.highLowPriceLinesVisible": boolean; /** * High/low price lines label visibility. * * @default false */ "mainSeriesProperties.highLowAvgPrice.highLowPriceLabelsVisible": boolean; /** * Average close price lines visibility. * * @default false */ "mainSeriesProperties.highLowAvgPrice.averageClosePriceLineVisible": boolean; /** * Average close price lines label visibility. * * @default false */ "mainSeriesProperties.highLowAvgPrice.averageClosePriceLabelVisible": boolean; /** * High/low price lines color. * * @default "" */ "mainSeriesProperties.highLowAvgPrice.highLowPriceLinesColor": string; /** * * High/low price lines width. * * @default 1 */ "mainSeriesProperties.highLowAvgPrice.highLowPriceLinesWidth": number; /** * * Average close price lines color. * * @default "" */ "mainSeriesProperties.highLowAvgPrice.averagePriceLineColor": string; /** * * Average close price lines width. * * @default 1 */ "mainSeriesProperties.highLowAvgPrice.averagePriceLineWidth": number; /** * Main series visibility. * * @default true */ "mainSeriesProperties.visible": boolean; /** * Sessions to display on the chart. Use `'extended'` to include pre- and post-market subsessions. See the [Extended Sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/time-and-sessions/Extended-Sessions) guide for more info. * * @default 'regular' */ "mainSeriesProperties.sessionId": "regular" | "extended"; /** * Main series price line visibility. * * @default true */ "mainSeriesProperties.showPriceLine": boolean; /** * * Main series price line width. * * @default 1 */ "mainSeriesProperties.priceLineWidth": number; /** * Main series price line color. * * @default "" */ "mainSeriesProperties.priceLineColor": string; /** * Main series previous close price line visibility. * * @default false */ "mainSeriesProperties.showPrevClosePriceLine": boolean; /** * Main series previous close price line width. * * @default 1 */ "mainSeriesProperties.prevClosePriceLineWidth": number; /** * Main series previous close price line color. * * @default "#555555" */ "mainSeriesProperties.prevClosePriceLineColor": string; /** * Main series minimum tick behaviour. * * @default "default" * * @example * * ```javascript * // reset minTick to default * tvWidget.applyOverrides({ 'mainSeriesProperties.minTick': 'default' }); * * // Set main series minTick to { priceScale: 10000, minMove: 1, frac: false } * tvWidget.applyOverrides({ 'mainSeriesProperties.minTick': '10000,1,false' }); * * // Set default minTick for overlay studies to { priceScale: 10000, minMove: 1, frac: false } * tvWidget.applyStudiesOverrides({ 'overlay.minTick': '10000,1,false' }); * ``` */ "mainSeriesProperties.minTick": string; /** * Main series legend exchange visibility. * * @default true */ "mainSeriesProperties.statusViewStyle.showExchange": boolean; /** * Main series legend interval visibility. * * @default true */ "mainSeriesProperties.statusViewStyle.showInterval": boolean; /** * Main series legend text style. * * @default "description" */ "mainSeriesProperties.statusViewStyle.symbolTextSource": SeriesStatusViewSymbolTextSource; /** * Main series candle style up color. * * @default "#089981" */ "mainSeriesProperties.candleStyle.upColor": string; /** * Main series candle style down color. * * @default "#F23645" */ "mainSeriesProperties.candleStyle.downColor": string; /** * Main series candle style wick visibility. * * @default true */ "mainSeriesProperties.candleStyle.drawWick": boolean; /** * Main series candle style border visibility. * * @default true */ "mainSeriesProperties.candleStyle.drawBorder": boolean; /** * * Main series candle style border color. * * @default "#378658" */ "mainSeriesProperties.candleStyle.borderColor": string; /** * * Main series candle style border up color. * * @default "#089981" */ "mainSeriesProperties.candleStyle.borderUpColor": string; /** * Main series candle style border down color. * * @default "#F23645" */ "mainSeriesProperties.candleStyle.borderDownColor": string; /** * Main series candle style wick color. * * @default "#737375" */ "mainSeriesProperties.candleStyle.wickColor": string; /** * Main series candle style wick up color. * * @default "#089981" */ "mainSeriesProperties.candleStyle.wickUpColor": string; /** * Main series candle style wick down color. * * @default "#F23645" */ "mainSeriesProperties.candleStyle.wickDownColor": string; /** * * Main series candle style color on previous close behaviour. * * @default false */ "mainSeriesProperties.candleStyle.barColorsOnPrevClose": boolean; /** * Main series candle style body visibility. * * @default true */ "mainSeriesProperties.candleStyle.drawBody": boolean; /** * Main series volume candle style up color. * * @default "#089981" */ "mainSeriesProperties.volCandlesStyle.upColor": string; /** * Main series volume candle style down color. * * @default "#F23645" */ "mainSeriesProperties.volCandlesStyle.downColor": string; /** * Main series volume candle style wick visibility. * * @default true */ "mainSeriesProperties.volCandlesStyle.drawWick": boolean; /** * Main series volume candle style border visibility. * * @default true */ "mainSeriesProperties.volCandlesStyle.drawBorder": boolean; /** * * Main series volume candle style border color. * * @default "#378658" */ "mainSeriesProperties.volCandlesStyle.borderColor": string; /** * * Main series volume candle style border up color. * * @default "#089981" */ "mainSeriesProperties.volCandlesStyle.borderUpColor": string; /** * Main series volume candle style border down color. * * @default "#F23645" */ "mainSeriesProperties.volCandlesStyle.borderDownColor": string; /** * Main series volume candle style wick color. * * @default "#737375" */ "mainSeriesProperties.volCandlesStyle.wickColor": string; /** * Main series volume candle style wick up color. * * @default "#089981" */ "mainSeriesProperties.volCandlesStyle.wickUpColor": string; /** * Main series volume candle style wick down color. * * @default "#F23645" */ "mainSeriesProperties.volCandlesStyle.wickDownColor": string; /** * * Main series volume candle style color on previous close behaviour. * * @default false */ "mainSeriesProperties.volCandlesStyle.barColorsOnPrevClose": boolean; /** * Main series volume candle style body visibility. * * @default true */ "mainSeriesProperties.volCandlesStyle.drawBody": boolean; /** * Main series hollow candle style up color. * * @default "#089981" */ "mainSeriesProperties.hollowCandleStyle.upColor": string; /** * Main series hollow candle style down color. * * @default "#F23645" */ "mainSeriesProperties.hollowCandleStyle.downColor": string; /** * Main series hollow candle style wick visibility. * * @default true */ "mainSeriesProperties.hollowCandleStyle.drawWick": boolean; /** * Main series hollow candle style border visibility. * * @default true */ "mainSeriesProperties.hollowCandleStyle.drawBorder": boolean; /** * Main series hollow candle style border color. * * @default "#378658" */ "mainSeriesProperties.hollowCandleStyle.borderColor": string; /** * Main series hollow candle style border up color. * * @default "#089981" */ "mainSeriesProperties.hollowCandleStyle.borderUpColor": string; /** * Main series hollow candle style down color. * * @default "#F23645" */ "mainSeriesProperties.hollowCandleStyle.borderDownColor": string; /** * Main series hollow candle style wick color. * * @default "#737375" */ "mainSeriesProperties.hollowCandleStyle.wickColor": string; /** * Main series hollow candle style wick up color. * * @default "#089981" */ "mainSeriesProperties.hollowCandleStyle.wickUpColor": string; /** * Main series hollow candle style wick down color. * * @default "#F23645" */ "mainSeriesProperties.hollowCandleStyle.wickDownColor": string; /** * Main series hollow candle style body visibility. * * @default true */ "mainSeriesProperties.hollowCandleStyle.drawBody": boolean; /** * Main series Heikin Ashi style up color. * * @default "#089981" */ "mainSeriesProperties.haStyle.upColor": string; /** * Main series Heikin Ashi style down color. * * @default "#F23645" */ "mainSeriesProperties.haStyle.downColor": string; /** * Main series Heikin Ashi style wick visibility. * * @default true */ "mainSeriesProperties.haStyle.drawWick": boolean; /** * Main series Heikin Ashi style border visibility. * * @default true */ "mainSeriesProperties.haStyle.drawBorder": boolean; /** * Main series Heikin Ashi style border color. * * @default "#378658" */ "mainSeriesProperties.haStyle.borderColor": string; /** * Main series Heikin Ashi style border up color. * * @default "#089981" */ "mainSeriesProperties.haStyle.borderUpColor": string; /** * Main series Heikin Ashi style border down color. * * @default "#F23645" */ "mainSeriesProperties.haStyle.borderDownColor": string; /** * Main series Heikin Ashi style wick color. * * @default "#737375" */ "mainSeriesProperties.haStyle.wickColor": string; /** * Main series Heikin Ashi style wick up color. * * @default "#089981" */ "mainSeriesProperties.haStyle.wickUpColor": string; /** * Main series Heikin Ashi style wick down color. * * @default "#F23645" */ "mainSeriesProperties.haStyle.wickDownColor": string; /** * Main series Heikin Ashi style color on previous close behaviour. * * @default false */ "mainSeriesProperties.haStyle.barColorsOnPrevClose": boolean; /** * Main series Heikin Ashi style body visibility. * * @default true */ "mainSeriesProperties.haStyle.drawBody": boolean; /** * Main series bar style up color. * * @default "#089981" */ "mainSeriesProperties.barStyle.upColor": string; /** * Main series bar style down color. * * @default "#F23645" */ "mainSeriesProperties.barStyle.downColor": string; /** * Main series bar style color on previous close behaviour. * * @default false */ "mainSeriesProperties.barStyle.barColorsOnPrevClose": boolean; /** * Main series bar style don't draw open behaviour. * * @default false */ "mainSeriesProperties.barStyle.dontDrawOpen": boolean; /** * Main series bar style thin bars behaviour. * * @default true */ "mainSeriesProperties.barStyle.thinBars": boolean; /** * Main series High-low style color. * * @default "#2962FF" */ "mainSeriesProperties.hiloStyle.color": string; /** * Main series High-low style border visibility. * * @default true */ "mainSeriesProperties.hiloStyle.showBorders": boolean; /** * Main series High-low style border color. * * @default "#2962FF" */ "mainSeriesProperties.hiloStyle.borderColor": string; /** * Main series High-low style label visibility. * * @default true */ "mainSeriesProperties.hiloStyle.showLabels": boolean; /** * Main series High-low style label color. * * @default "#2962FF" */ "mainSeriesProperties.hiloStyle.labelColor": string; /** * Main series column style up color. * * @default "rgba(8, 153, 129, 0.5)" */ "mainSeriesProperties.columnStyle.upColor": string; /** * Main series column style down color. * * @default "rgba(242, 54, 69, 0.5)" */ "mainSeriesProperties.columnStyle.downColor": string; /** * Main series column style color on previous close behaviour. * * @default true */ "mainSeriesProperties.columnStyle.barColorsOnPrevClose": boolean; /** * Main series column style price source. * * @default "close" */ "mainSeriesProperties.columnStyle.priceSource": PriceSource; /** * Main series line style color. * * @default "#2962FF" */ "mainSeriesProperties.lineStyle.color": string; /** * Main series line style line style. * * @default LineStyle.Solid */ "mainSeriesProperties.lineStyle.linestyle": OverrideLineStyle; /** * Main series line style line width. * * @default 2 */ "mainSeriesProperties.lineStyle.linewidth": number; /** * Main series line style price source. * * @default "close" */ "mainSeriesProperties.lineStyle.priceSource": PriceSource; /** * Main series step line style color. * * @default "#2962FF" */ "mainSeriesProperties.steplineStyle.color": string; /** * Main series step line style line style. * * @default LineStyle.Solid */ "mainSeriesProperties.steplineStyle.linestyle": OverrideLineStyle; /** * Main series step line style line width. * * @default 2 */ "mainSeriesProperties.steplineStyle.linewidth": number; /** * Main series step line style price source. * * @default "close" */ "mainSeriesProperties.steplineStyle.priceSource": PriceSource; /** * Main series area style color1. * * @default "rgba(41, 98, 255, 0.28)" */ "mainSeriesProperties.areaStyle.color1": string; /** * Main series area style color2. * * @default "#2962FF" */ "mainSeriesProperties.areaStyle.color2": string; /** * Main series area style line color. * * @default "#2962FF" */ "mainSeriesProperties.areaStyle.linecolor": string; /** * Main series area style line style. * * @default LineStyle.Solid */ "mainSeriesProperties.areaStyle.linestyle": OverrideLineStyle; /** * Main series area style line width. * * @default 2 */ "mainSeriesProperties.areaStyle.linewidth": number; /** * Main series area style price source. * * @default "close" */ "mainSeriesProperties.areaStyle.priceSource": PriceSource; /** * Main series area style transparency. * * @default 100 */ "mainSeriesProperties.areaStyle.transparency": number; /** * Main series hlc area style close line color. * * @default "#868993" */ "mainSeriesProperties.hlcAreaStyle.closeLineColor": string; /** * Main series hlc area style close line style. * * @default LineStyle.Solid */ "mainSeriesProperties.hlcAreaStyle.closeLineStyle": OverrideLineStyle; /** * Main series hlc area style close line width. * * @default 2 */ "mainSeriesProperties.hlcAreaStyle.closeLineWidth": number; /** * Main series hlc area style close low fill color. * * @default "rgba(242, 54, 69, 0.2)" */ "mainSeriesProperties.hlcAreaStyle.closeLowFillColor": string; /** * Main series hlc area style high close fill color. * * @default "rgba(8, 153, 129, 0.2)" */ "mainSeriesProperties.hlcAreaStyle.highCloseFillColor": string; /** * Main series hlc area style high line color. * * @default "#089981" */ "mainSeriesProperties.hlcAreaStyle.highLineColor": string; /** * Main series hlc area style high line style. * * @default LineStyle.Solid */ "mainSeriesProperties.hlcAreaStyle.highLineStyle": OverrideLineStyle; /** * Main series hlc area style high line width. * * @default 2 */ "mainSeriesProperties.hlcAreaStyle.highLineWidth": number; /** * Main series hlc area style low line color. * * @default "#F23645" */ "mainSeriesProperties.hlcAreaStyle.lowLineColor": string; /** * Main series hlc area style low line style. * * @default LineStyle.Solid */ "mainSeriesProperties.hlcAreaStyle.lowLineStyle": OverrideLineStyle; /** * Main series hlc area style low line width. * * @default 2 */ "mainSeriesProperties.hlcAreaStyle.lowLineWidth": number; /** * Main series price axis percentage mode. * * @default false */ "mainSeriesProperties.priceAxisProperties.percentage": boolean; /** * Main series price axis indexed to 100 mode. * * @default false */ "mainSeriesProperties.priceAxisProperties.indexedTo100": boolean; /** * Main series price axis log mode. * * @default false */ "mainSeriesProperties.priceAxisProperties.log": boolean; /** * Main series price axis inverted mode. * * @default false */ "mainSeriesProperties.priceAxisProperties.isInverted": boolean; /** * Main series price axis label alignment behaviour. * * @default true */ "mainSeriesProperties.priceAxisProperties.alignLabels": boolean; /** * Main series Renko style up color. * * @default "#089981" */ "mainSeriesProperties.renkoStyle.upColor": string; /** * Main series Renko style down color. * * @default "#F23645" */ "mainSeriesProperties.renkoStyle.downColor": string; /** * Main series Renko style border up color. * * @default "#089981" */ "mainSeriesProperties.renkoStyle.borderUpColor": string; /** * Main series Renko style border down color. * * @default "#F23645" */ "mainSeriesProperties.renkoStyle.borderDownColor": string; /** * Main series Renko style up projection color. * * @default "#a9dcc3" */ "mainSeriesProperties.renkoStyle.upColorProjection": string; /** * Main series Renko style down projection color. * * @default "#f5a6ae" */ "mainSeriesProperties.renkoStyle.downColorProjection": string; /** * Main series Renko style up projection border color. * * @default "#a9dcc3" */ "mainSeriesProperties.renkoStyle.borderUpColorProjection": string; /** * Main series Renko style down projection border color. * * @default "#f5a6ae" */ "mainSeriesProperties.renkoStyle.borderDownColorProjection": string; /** * Main series Renko style wick up color. * * @default "#089981" */ "mainSeriesProperties.renkoStyle.wickUpColor": string; /** * Main series Renko style wick down color. * * @default "#F23645" */ "mainSeriesProperties.renkoStyle.wickDownColor": string; /** * Main series Line Break style up color. * * @default "#089981" */ "mainSeriesProperties.pbStyle.upColor": string; /** * Main series Line Break style down color. * * @default "#F23645" */ "mainSeriesProperties.pbStyle.downColor": string; /** * Main series Line Break style border up color. * * @default "#089981" */ "mainSeriesProperties.pbStyle.borderUpColor": string; /** * Main series Line Break style border down color. * * @default "#F23645" */ "mainSeriesProperties.pbStyle.borderDownColor": string; /** * Main series Line Break style up projection color. * * @default "#a9dcc3" */ "mainSeriesProperties.pbStyle.upColorProjection": string; /** * Main series Line Break style down projection color. * * @default "#f5a6ae" */ "mainSeriesProperties.pbStyle.downColorProjection": string; /** * Main series Line Break style up projection color. * * @default "#a9dcc3" */ "mainSeriesProperties.pbStyle.borderUpColorProjection": string; /** * Main series Line Break style down projection color. * * @default "#f5a6ae" */ "mainSeriesProperties.pbStyle.borderDownColorProjection": string; /** * Main series Kagi style up color. * * @default "#089981" */ "mainSeriesProperties.kagiStyle.upColor": string; /** * Main series Kagi style down color. * * @default "#F23645" */ "mainSeriesProperties.kagiStyle.downColor": string; /** * Main series Kagi style up projection color. * * @default "#a9dcc3" */ "mainSeriesProperties.kagiStyle.upColorProjection": string; /** * Main series Kagi style down projection color. * * @default "#f5a6ae" */ "mainSeriesProperties.kagiStyle.downColorProjection": string; /** * Main series Point & Figure style up color. * * @default "#089981" */ "mainSeriesProperties.pnfStyle.upColor": string; /** * Main series Point & Figure style down color. * * @default "#F23645" */ "mainSeriesProperties.pnfStyle.downColor": string; /** * Main series Point & Figure style up projection color. * * @default "#a9dcc3" */ "mainSeriesProperties.pnfStyle.upColorProjection": string; /** * Main series Point & Figure style down projection color. * * @default "#f5a6ae" */ "mainSeriesProperties.pnfStyle.downColorProjection": string; /** * Main series Baseline style baseline color. * * @default "#758696" */ "mainSeriesProperties.baselineStyle.baselineColor": string; /** * Main series Baseline style top fill color1. * * @default "rgba(8, 153, 129, 0.28)" */ "mainSeriesProperties.baselineStyle.topFillColor1": string; /** * Main series Baseline style top fill color2. * * @default "rgba(8, 153, 129, 0.05)" */ "mainSeriesProperties.baselineStyle.topFillColor2": string; /** * Main series Baseline style bottom fill color1. * * @default "rgba(242, 54, 69, 0.05)" */ "mainSeriesProperties.baselineStyle.bottomFillColor1": string; /** * Main series Baseline style bottom fill color2. * * @default "rgba(242, 54, 69, 0.28)" */ "mainSeriesProperties.baselineStyle.bottomFillColor2": string; /** * Main series Baseline style top line color. * * @default "#089981" */ "mainSeriesProperties.baselineStyle.topLineColor": string; /** * Main series Baseline style bottom line color. * * @default "#F23645" */ "mainSeriesProperties.baselineStyle.bottomLineColor": string; /** * Main series Baseline style top line width. * * @default 2 */ "mainSeriesProperties.baselineStyle.topLineWidth": number; /** * Main series Baseline style bottom line width. * * @default 2 */ "mainSeriesProperties.baselineStyle.bottomLineWidth": number; /** * Main series Baseline style price source. * * @default "close" */ "mainSeriesProperties.baselineStyle.priceSource": PriceSource; /** * Main series Baseline style transparency. * * @default 50 */ "mainSeriesProperties.baselineStyle.transparency": number; /** * Main series Baseline style base level percentage. * * @default 50 */ "mainSeriesProperties.baselineStyle.baseLevelPercentage": number; /** * Main series Line With Markers style Line Color. * * @default '#2962FF' */ "mainSeriesProperties.lineWithMarkersStyle.color": string; /** * Main series Line With Markers style Line style. * * @default LineStyle.Solid */ "mainSeriesProperties.lineWithMarkersStyle.linestyle": OverrideLineStyle; /** * Main series Line With Markers style Line width. * * @default 2 */ "mainSeriesProperties.lineWithMarkersStyle.linewidth": number; /** * Main series Line With Markers style Price Source. * * @default 'close' */ "mainSeriesProperties.lineWithMarkersStyle.priceSource": string; /** * Show positions. * * Trading Platform only */ "tradingProperties.showPositions": boolean; /** * Show profit & loss for positions. * * Trading Platform only */ "tradingProperties.positionPL.visibility": boolean; /** * Displayed unit for profit & loss for positions. * * Trading Platform only */ "tradingProperties.positionPL.display": PlDisplay; /** * Show profit & loss for brackets. * * Trading Platform only */ "tradingProperties.bracketsPL.visibility": boolean; /** * Displayed unit for profit & loss for brackets. * * Trading Platform only */ "tradingProperties.bracketsPL.display": PlDisplay; /** * Show profit & loss for brackets and positions. * * Trading Platform only */ "tradingProperties.positionAndBracketsPL": boolean; /** * Show orders. * * Trading Platform only */ "tradingProperties.showOrders": boolean; /** * Show executions. * * Trading Platform only */ "tradingProperties.showExecutions": boolean; /** * Show execution shapes. * * Trading Platform only */ "tradingProperties.showExecutionsLabels": boolean; /** * Show reverse position. * * Trading Platform only */ "tradingProperties.showReverse": boolean; /** * Extend lines to the left for positions and orders. * * Trading Platform only */ "tradingProperties.extendLeft": boolean; /** * Displayed lines length for positions and orders. * * Trading Platform only */ "tradingProperties.lineLength": number; /** * Horizontal alignment of labels on position and order lines. * * Trading Platform only */ "tradingProperties.horizontalAlignment": TradedGroupHorizontalAlignment; /** * Width of line for position and order lines. * * Trading Platform only */ "tradingProperties.lineWidth": number; /** * Style of line for position and order lines. * * Trading Platform only */ /** * Size of the volume panel. * Only works when `volume_force_overlay` featureset is disabled. * * @default PaneSize.Large */ "volumePaneSize": PaneSize; } /** * A chart template. */ export interface ChartTemplate { /** * The template content. */ content?: ChartTemplateContent; } /** * Chart template content. The properties of the chart that are saved/loaded when the library saves/loads a chart template. */ export interface ChartTemplateContent { [key: string]: any; /** * Chart properties (for example color, etc). */ chartProperties?: { /** * Chart pane properties. */ paneProperties: any; /** * Chart scales properties. */ scalesProperties: any; }; /** * Series properties (for example chart style, etc). */ mainSourceProperties?: any; /** * The version of the chart template. */ version?: number; } export interface ChartingLibraryWidgetConstructor { /** * Constructor for the Advanced Charts Widget * @param {ChartingLibraryWidgetOptions|TradingTerminalWidgetOptions} options - Constructor options */ new (options: ChartingLibraryWidgetOptions | TradingTerminalWidgetOptions): IChartingLibraryWidget; } export interface ChartingLibraryWidgetOptions { /** * The `container` can either be a reference to an attribute of a DOM element inside which the iframe with the chart will be placed or the `HTMLElement` itself. * * ```javascript * container: "tv_chart_container", * ``` * * or * * ```javascript * container: document.getElementById("tv_chart_container"), * ``` */ container: HTMLElement | string; /** * JavaScript object that implements the datafeed interface ({@link IBasicDataFeed}) to supply the chart with data. See [Connecting Data](https://www.tradingview.com/charting-library-docs/latest/connecting_data/) for more information on the JS API. * * ```javascript * datafeed: new Datafeeds.UDFCompatibleDatafeed("https://demo_feed.tradingview.com") * ``` */ datafeed: IBasicDataFeed | (IBasicDataFeed & IDatafeedQuotesApi); /** * The default interval for the chart. * * Example: * ```javascript * interval: '1D', * ``` */ interval: ResolutionString; /** * The default symbol for the chart. * * Example: * ```javascript * symbol: 'AAPL', * ``` */ symbol?: string; /** * A threshold delay in seconds that is used to reduce the number of `onAutoSaveNeeded` calls. * * ```javascript * auto_save_delay: 5, * ``` */ auto_save_delay?: number; /** * Boolean value showing whether the chart should use all the available space in the container and resize when the container itself is resized. * @default false * * ```javascript * autosize: true, * ``` */ autosize?: boolean; /** * Setting this property to `true` makes the library write detailed [Datafeed API](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/) logs into the browser console. * Alternatively, you can use the [`charting_library_debug_mode`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#charting_library_debug_mode) featureset or the {@link IChartingLibraryWidget.setDebugMode} method. * * ```javascript * debug: true, * ``` */ debug?: boolean; /** * The array containing names of features that should be disabled by default. `Feature` means part of the functionality of the chart (part of the UI/UX). Supported features are listed in [Featuresets](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets). * * Example: * ```javascript * disabled_features: ["header_widget", "left_toolbar"], * ``` */ disabled_features?: ChartingLibraryFeatureset[]; /** * You can hide some drawings from the toolbar or add custom restrictions for applying them to the chart. * * This property has the same structure as the `studies_access` argument. Use the same names as you see in the UI. * * **Remark**: There is a special case for font-based drawings. Use the "Font Icons" name for them. * Those drawings cannot be enabled or disabled separately - the entire group will have to be either enabled or disabled. * * @example * ```javascript * drawings_access: { * type: 'black', * tools: [ * { * name: 'Trend Line', * grayed: true * }, * ] * }, * ``` */ drawings_access?: AccessList; /** * The array containing names of features that should be enabled by default. `Feature` means part of the functionality of the chart (part of the UI/UX). Supported features are listed in [Featuresets](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets). * * Example: * ```javascript * enabled_features: ["move_logo_to_main_pane"], * ``` */ enabled_features?: ChartingLibraryFeatureset[]; /** * Boolean value showing whether the chart should use all the available space in the window. * @default false * * ```javascript * fullscreen: true, * ``` */ fullscreen?: boolean; /** * A path to a `static` folder. * * ```javascript * library_path: "charting_library/", * ``` * * * If you would like to host the library on a separate origin to the page containing the chart then please view the following guide: [Hosting the library on a separate origin](https://www.tradingview.com/charting-library-docs/latest/configuration/Hosting-Library-Cross-Origin). */ library_path?: string; /** * A cryptographic nonce (number used once) for Content Security Policy (CSP) * compliance. When provided, the library applies this nonce to all `