VERSION 1.15 @ 2019-12-18 11:58:16.705704
setVisibleRange additional argument - right margin % #4512 Indicators are slided when zooming chart #4456 save_load_adapter after removing chart #4454 Overriding timezone definitions #4449 Error while applying study template #4407 Wrong range of overlay after switching timeframe #4372 Intraday Data is Requesting from the server since 1970 #4366 Display price in thousands, millions, billions #4360 setBodyFont of position line tool doesn't work correctly #4353 Realtime updates shifts indicator's data for realtime bars count back #4283 Adaptive indicators dialogs #4247 Click instead of mouseDown for positionLine onClose. #4245 Add applyRightMargin flag to setVisibleRange #4233 Open volume on new pane if volume_force_overlay is enabled #4198 Keep the first visible point when a new bar comes #4188 getVisibleRange should return 00:00 for DWM #4187 21 more indicators #4170 Main series API #4169 Can not set Text property of the Note Shape #4144 Unable to hide legend #4126 setVisibleRange or getVisibleRange adds one more bar to the left #4110 Cannot set tooltip for order line #4079 Dialog is closed immediately if it is invoked from mouse_down event #4077 setVisibleRange doesn't work for multiple charts at once #4068 how to disable mp3 files being loaded? #4052 Increase spacing between bars to display short time periods #4043 Event Marker Placement always uses high #4042 Number cannot be passed as symbol into widget constructor #4039 custom_css_url not working in unstable branch #4017 ConfirmDialog does not close after YES is clicked #3981 Side DOM chart does not render in certain conditions #3975 `getAllShapes` does not return drawings loaded from state #3966 Text inside order/position lines is too small #3962 Removing the last saved chart #3954 get current chart timezone #3943 Text shape throws error setValue #3930 Wrong Symbol and Price values in context menu for secondary instrument. #3926 text override in Horizontal Line does not work #3918 Sticky magnet mode #3902 Add thin bars #3900 Event that study has been removed from the chart #3899 High-Low bars #3898 Multiple Y-axis #3897 Issue with Renko with volume and vwap indicators #3893 Layout rename doesn't send request to server #3878 Cannot create copy of copy of a chart layout #3872 Chart scrolls when tap on a trend line Safari/iphone7 #3871 Chart border overlap scale values #3826 IDatafeedChartApi.subscribeDepth parameters #3821 Error in console when restore defaults #3755 Timeframe is not precise #3722 Wrong year Ticker displayed on X axis if resolution < 2H #3678 New chart layouts #3629 Drawings disappear at certain resolutions #3594 Remove jQuery from loading custom indicator #3563 Align symbol labels #3513 createOrderLine().onMove broken in 1.13 #3480 When changing theme on the fly - chart type changing too #3459 Pivot Points Standard - path to some style params #3441 createMultipointShape overrides with dot don't work #3419 Add inverting price scale #3376 Transparent chart background color #3288 Previous timescale tooltips stay when switching currency #3165 disableSelection still shown the selections on hover #2864 Override symbol from saved_data #2493 Forecast balloon too short #2289 Context menu submenus cover up other options #2007 Add setVisiblePriceRange method #1408 Modify panes height/order #1232 Add custom Interval #1191
This commit is contained in:
187
charting_library/charting_library.min.d.ts
vendored
187
charting_library/charting_library.min.d.ts
vendored
@@ -84,10 +84,10 @@ export declare const widget: ChartingLibraryWidgetConstructor;
|
||||
export declare function version(): string;
|
||||
export declare type ActionMetaInfo = ActionDescriptionWithCallback | MenuSeparator;
|
||||
export declare type AvailableSaveloadVersions = '1.0' | '1.1';
|
||||
export declare type ChartActionId = 'chartProperties' | 'compareOrAdd' | 'scalesProperties' | 'tmzProperties' | 'paneObjectTree' | 'insertIndicator' | 'symbolSearch' | 'changeInterval' | 'timeScaleReset' | 'chartReset' | 'seriesHide' | 'studyHide' | 'lineToggleLock' | 'lineHide' | 'showLeftAxis' | 'showRightAxis' | 'scaleSeriesOnly' | 'drawingToolbarAction' | 'magnetAction' | 'stayInDrawingModeAction' | 'hideAllMarks' | 'showCountdown' | 'showSeriesLastValue' | 'showSymbolLabelsAction' | 'showStudyLastValue' | 'showStudyPlotNamesAction' | 'undo' | 'redo' | 'paneRemoveAllStudiesDrawingTools';
|
||||
export declare type CustomTimezones = 'America/New_York' | 'America/Los_Angeles' | 'America/Chicago' | 'America/Phoenix' | 'America/Toronto' | 'America/Vancouver' | 'America/Argentina/Buenos_Aires' | 'America/El_Salvador' | 'America/Sao_Paulo' | 'America/Bogota' | 'America/Caracas' | 'Europe/Moscow' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Paris' | 'Europe/Rome' | 'Europe/Warsaw' | 'Europe/Istanbul' | 'Europe/Zurich' | 'Australia/Sydney' | 'Australia/Brisbane' | 'Australia/Adelaide' | 'Australia/ACT' | 'Asia/Almaty' | 'Asia/Ashkhabad' | 'Asia/Tokyo' | 'Asia/Taipei' | 'Asia/Singapore' | 'Asia/Shanghai' | 'Asia/Seoul' | 'Asia/Tehran' | 'Asia/Dubai' | 'Asia/Kolkata' | 'Asia/Hong_Kong' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Jerusalem' | 'Asia/Kuwait' | 'Asia/Muscat' | 'Asia/Qatar' | 'Asia/Riyadh' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Honolulu' | 'America/Mexico_City' | 'Africa/Cairo' | 'Africa/Johannesburg' | 'Asia/Kathmandu' | 'US/Mountain' | 'Europe/Helsinki' | 'Europe/Stockholm' | 'Europe/Copenhagen' | 'Atlantic/Reykjavik' | 'Europe/Tallinn' | 'Europe/Riga' | 'Europe/Vilnius' | 'America/Lima' | 'America/Santiago' | 'Asia/Bahrain' | 'Asia/Jakarta' | 'Africa/Lagos' | 'Pacific/Norfolk' | 'America/Juneau' | 'Asia/Ho_Chi_Minh' | 'Australia/Perth' | 'Europe/Oslo';
|
||||
export declare type ChartActionId = 'chartProperties' | 'compareOrAdd' | 'scalesProperties' | 'tmzProperties' | 'paneObjectTree' | 'insertIndicator' | 'symbolSearch' | 'changeInterval' | 'timeScaleReset' | 'chartReset' | 'seriesHide' | 'studyHide' | 'lineToggleLock' | 'lineHide' | 'showLeftAxis' | 'showRightAxis' | 'scaleSeriesOnly' | 'drawingToolbarAction' | 'stayInDrawingModeAction' | 'hideAllMarks' | 'showCountdown' | 'showSeriesLastValue' | 'showSymbolLabelsAction' | 'showStudyLastValue' | 'showStudyPlotNamesAction' | 'undo' | 'redo' | 'paneRemoveAllStudiesDrawingTools';
|
||||
export declare type Direction = 'buy' | 'sell';
|
||||
export declare type DomeCallback = (data: DOMData) => void;
|
||||
export declare type DrawingEventType = 'click' | 'move' | 'remove' | 'hide' | 'show';
|
||||
export declare type EditObjectDialogObjectType = 'mainSeries' | 'drawing' | 'study' | 'other';
|
||||
export declare type EmptyCallback = () => void;
|
||||
export declare type EntityId = Nominal<string, 'EntityId'>;
|
||||
@@ -101,9 +101,11 @@ export declare type InputFieldValidatorResult = PositiveBaseInputFieldValidatorR
|
||||
export declare type LanguageCode = 'ar' | 'zh' | 'cs' | 'da_DK' | 'nl_NL' | 'en' | 'et_EE' | 'fr' | 'de' | 'el' | 'he_IL' | 'hu_HU' | 'id_ID' | 'it' | 'ja' | 'ko' | 'fa' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk_SK' | 'es' | 'sv' | 'th' | 'tr' | 'vi';
|
||||
export declare type LayoutType = SingleChartLayoutType | MultipleChartsLayoutType;
|
||||
export declare type MarkConstColors = 'red' | 'green' | 'blue' | 'yellow';
|
||||
export declare type MultipleChartsLayoutType = '2h' | '2-1' | '2v' | '3h' | '3v' | '3s' | '4' | '6' | '8';
|
||||
export declare type MultipleChartsLayoutType = '2h' | '2v' | '2-1' | '3s' | '3h' | '3v' | '4' | '6' | '8' | '1-2' | '3r' | '4h' | '4v' | '4s' | '1-3' | '2-2' | '1-4' | '5s' | '6c' | '8c';
|
||||
export declare type OnReadyCallback = (configuration: DatafeedConfiguration) => void;
|
||||
export declare type Order = OrderWithParent | PlacedOrder;
|
||||
export declare type OrderDialogCustomField = TextWithCheckboxFieldMetaInfo | CustomComboBoxMetaInfo;
|
||||
export declare type PineJS = any;
|
||||
export declare type QuoteData = QuoteOkData | QuoteErrorData;
|
||||
export declare type QuotesCallback = (data: QuoteData[]) => void;
|
||||
export declare type ResolutionBackValues = 'D' | 'M';
|
||||
@@ -111,6 +113,7 @@ export declare type ResolutionString = string;
|
||||
export declare type ResolveCallback = (symbolInfo: LibrarySymbolInfo) => void;
|
||||
export declare type RssNewsFeedItem = RssNewsFeedInfo | RssNewsFeedInfo[];
|
||||
export declare type SearchSymbolsCallback = (items: SearchSymbolResultItem[]) => void;
|
||||
export declare type SeriesFormat = 'price' | 'volume';
|
||||
export declare type ServerTimeCallback = (serverTime: number) => void;
|
||||
export declare type ShapePoint = StickedPoint | PricedPoint | TimePoint;
|
||||
export declare type SingleChartLayoutType = 's';
|
||||
@@ -121,6 +124,7 @@ export declare type StudyOverrideValueType = string | number | boolean;
|
||||
export declare type StudyPriceScale = 'left' | 'right' | 'no-scale' | 'as-series';
|
||||
export declare type SubscribeBarsCallback = (bar: Bar) => void;
|
||||
export declare type SupportedLineTools = 'text' | 'anchored_text' | 'note' | 'anchored_note' | 'double_curve' | 'arc' | 'icon' | 'arrow_up' | 'arrow_down' | 'arrow_left' | 'arrow_right' | 'price_label' | 'flag' | 'vertical_line' | 'horizontal_line' | 'cross_line' | 'horizontal_ray' | 'trend_line' | 'info_line' | 'trend_angle' | 'arrow' | 'ray' | 'extended' | 'parallel_channel' | 'disjoint_angle' | 'flat_bottom' | 'pitchfork' | 'schiff_pitchfork_modified' | 'schiff_pitchfork' | 'balloon' | 'inside_pitchfork' | 'pitchfan' | 'gannbox' | 'gannbox_square' | 'gannbox_fixed' | 'gannbox_fan' | 'fib_retracement' | 'fib_trend_ext' | 'fib_speed_resist_fan' | 'fib_timezone' | 'fib_trend_time' | 'fib_circles' | 'fib_spiral' | 'fib_speed_resist_arcs' | 'fib_channel' | 'xabcd_pattern' | 'cypher_pattern' | 'abcd_pattern' | 'callout' | 'triangle_pattern' | '3divers_pattern' | 'head_and_shoulders' | 'fib_wedge' | 'elliott_impulse_wave' | 'elliott_triangle_wave' | 'elliott_triple_combo' | 'elliott_correction' | 'elliott_double_combo' | 'cyclic_lines' | 'time_cycles' | 'sine_line' | 'long_position' | 'short_position' | 'forecast' | 'date_range' | 'price_range' | 'date_and_price_range' | 'bars_pattern' | 'ghost_feed' | 'projection' | 'rectangle' | 'rotated_rectangle' | 'ellipse' | 'triangle' | 'polyline' | 'curve' | 'cursor' | 'dot' | 'arrow_cursor' | 'eraser' | 'measure' | 'zoom' | 'brush';
|
||||
export declare type SymbolType = 'stock' | 'index' | 'forex' | 'futures' | 'bitcoin' | 'crypto' | 'undefined' | 'expression' | 'spread' | 'cfd';
|
||||
export declare type TableElementFormatFunction = (inputs: TableFormatterInputs) => string | JQuery;
|
||||
export declare type TextInputFieldValidator = (value: string) => InputFieldValidatorResult;
|
||||
export declare type ThemeName = 'Light' | 'Dark';
|
||||
@@ -172,6 +176,7 @@ export interface AccountManagerInfo {
|
||||
tradeColumns?: AccountManagerColumn[];
|
||||
pages: AccountManagerPage[];
|
||||
possibleOrderStatuses?: OrderStatus[];
|
||||
marginUsed?: IWatchedValue<number>;
|
||||
contextMenuActions?(contextMenuEvent: JQueryEventObject, activePageActions: ActionMetaInfo[]): Promise<ActionMetaInfo[]>;
|
||||
}
|
||||
export interface AccountManagerPage {
|
||||
@@ -205,6 +210,7 @@ export interface ActionDescription {
|
||||
checkable?: boolean;
|
||||
enabled?: boolean;
|
||||
externalLink?: boolean;
|
||||
icon?: string;
|
||||
}
|
||||
export interface ActionDescriptionWithCallback extends ActionDescription {
|
||||
action: (a: ActionDescription) => void;
|
||||
@@ -245,12 +251,14 @@ export interface BrokerConfigFlags {
|
||||
supportStopOrders?: boolean;
|
||||
supportStopLimitOrders?: boolean;
|
||||
supportDemoLiveSwitcher?: boolean;
|
||||
supportCustomPlaceOrderTradableCheck?: boolean;
|
||||
supportMarketBrackets?: boolean;
|
||||
supportSymbolSearch?: boolean;
|
||||
supportModifyDuration?: boolean;
|
||||
supportModifyOrder?: boolean;
|
||||
supportMargin?: boolean;
|
||||
calculatePLUsingLast?: boolean;
|
||||
cancellingBracketCancelsParentOrder?: boolean;
|
||||
cancellingOnePositionBracketsCancelsOther?: boolean;
|
||||
requiresFIFOCloseTrades?: boolean;
|
||||
supportBottomWidget?: boolean;
|
||||
/**
|
||||
@@ -258,6 +266,10 @@ export interface BrokerConfigFlags {
|
||||
*/
|
||||
supportBrackets?: boolean;
|
||||
}
|
||||
export interface BrokerCustomUI {
|
||||
showOrderDialog?: (order: PreOrder | Order, focus?: OrderTicketFocusControl) => Promise<boolean>;
|
||||
showPositionDialog?: (position: Position | Trade, brackets: Brackets, focus?: OrderTicketFocusControl) => Promise<boolean>;
|
||||
}
|
||||
export interface ChartData {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -279,7 +291,7 @@ export interface ChartingLibraryWidgetOptions {
|
||||
container_id: string;
|
||||
datafeed: IBasicDataFeed | (IBasicDataFeed & IDatafeedQuotesApi);
|
||||
interval: ResolutionString;
|
||||
symbol: string;
|
||||
symbol?: string;
|
||||
auto_save_delay?: number;
|
||||
autosize?: boolean;
|
||||
debug?: boolean;
|
||||
@@ -308,7 +320,6 @@ export interface ChartingLibraryWidgetOptions {
|
||||
customFormatters?: CustomFormatters;
|
||||
overrides?: Overrides;
|
||||
snapshot_url?: string;
|
||||
indicators_file_name?: string;
|
||||
preset?: 'mobile';
|
||||
time_frames?: TimeFrameItem[];
|
||||
custom_css_url?: string;
|
||||
@@ -317,6 +328,7 @@ export interface ChartingLibraryWidgetOptions {
|
||||
loading_screen?: LoadingScreenOptions;
|
||||
settings_adapter?: ISettingsAdapter;
|
||||
theme?: ThemeName;
|
||||
custom_indicators_getter?: (PineJS: PineJS) => Promise<ReadonlyArray<CustomIndicator>>;
|
||||
}
|
||||
export interface ContextMenuItem {
|
||||
position: 'top' | 'bottom';
|
||||
@@ -351,6 +363,14 @@ export interface CrossHairMovedEventParams {
|
||||
time: number;
|
||||
price: number;
|
||||
}
|
||||
export interface CustomComboBoxItem {
|
||||
text: string;
|
||||
value: string;
|
||||
}
|
||||
export interface CustomComboBoxMetaInfo extends CustomInputFieldMetaInfo {
|
||||
inputType: 'ComboBox';
|
||||
items: CustomComboBoxItem[];
|
||||
}
|
||||
export interface CustomFields {
|
||||
[key: string]: any;
|
||||
}
|
||||
@@ -362,16 +382,22 @@ export interface CustomFormatters {
|
||||
timeFormatter: CustomFormatter;
|
||||
dateFormatter: CustomFormatter;
|
||||
}
|
||||
export interface CustomIndicator {
|
||||
readonly name: string;
|
||||
readonly metainfo: any;
|
||||
readonly constructor: any;
|
||||
}
|
||||
export interface CustomInputFieldMetaInfo {
|
||||
inputType: string;
|
||||
id: string;
|
||||
title: string;
|
||||
placeHolder: string;
|
||||
value: any;
|
||||
placeHolder?: string;
|
||||
value?: any;
|
||||
validator?: InputFieldValidator;
|
||||
customInfo?: any;
|
||||
}
|
||||
export interface CustomInputFieldsValues {
|
||||
[fieldId: string]: TextWithCheckboxValue | any;
|
||||
[fieldId: string]: TextWithCheckboxValue | string | any;
|
||||
}
|
||||
export interface DOMData {
|
||||
snapshot: boolean;
|
||||
@@ -417,6 +443,7 @@ export interface DefaultContextMenuActionsParams {
|
||||
export interface DefaultDropdownActionsParams {
|
||||
showFloatingToolbar?: boolean;
|
||||
showDOM?: boolean;
|
||||
showOrderPanel?: boolean;
|
||||
tradingProperties?: boolean;
|
||||
selectAnotherBroker?: boolean;
|
||||
disconnect?: boolean;
|
||||
@@ -484,20 +511,16 @@ export interface HistoryMetadata {
|
||||
}
|
||||
export interface IBrokerCommon {
|
||||
chartContextMenuActions(context: ITradeContext, options?: DefaultContextMenuActionsParams): Promise<ActionMetaInfo[]>;
|
||||
isTradable(symbol: string): Promise<boolean>;
|
||||
isTradable(symbol: string): Promise<boolean | IsTradableResult>;
|
||||
connectionStatus(): ConnectionStatus;
|
||||
placeOrder(order: PreOrder, silently?: boolean): Promise<void>;
|
||||
modifyOrder(order: Order, silently?: boolean, focus?: OrderTicketFocusControl): Promise<void>;
|
||||
orders(): Promise<Order[]>;
|
||||
positions?(): Promise<Position[]>;
|
||||
trades?(): Promise<Trade[]>;
|
||||
executions(symbol: string): Promise<Execution[]>;
|
||||
symbolInfo(symbol: string): Promise<InstrumentInfo>;
|
||||
accountInfo(): Promise<AccountInfo>;
|
||||
editPositionBrackets?(positionId: string, focus?: OrderTicketFocusControl, brackets?: Brackets, silently?: boolean): Promise<void>;
|
||||
editTradeBrackets?(tradeId: string, focus?: OrderTicketFocusControl, brackets?: Brackets, silently?: boolean): Promise<void>;
|
||||
accountManagerInfo(): AccountManagerInfo;
|
||||
formatter?(symbol: string): Promise<IFormatter>;
|
||||
formatter?(symbol: string, alignToMinMove: boolean): Promise<IFormatter>;
|
||||
spreadFormatter?(symbol: string): Promise<IFormatter>;
|
||||
quantityFormatter?(symbol: string): Promise<IFormatter>;
|
||||
}
|
||||
@@ -509,15 +532,17 @@ export interface IBrokerConnectionAdapterFactory {
|
||||
export interface IBrokerConnectionAdapterHost {
|
||||
factory: IBrokerConnectionAdapterFactory;
|
||||
connectionStatusUpdate(status: ConnectionStatus, message?: string): void;
|
||||
defaultFormatter(symbol: string): Promise<IFormatter>;
|
||||
defaultFormatter(symbol: string, alignToMinMove: boolean): Promise<IFormatter>;
|
||||
numericFormatter(decimalPlaces: number): Promise<IFormatter>;
|
||||
quantityFormatter(decimalPlaces?: number): Promise<IFormatter>;
|
||||
defaultContextMenuActions(context: ITradeContext, params?: DefaultContextMenuActionsParams): Promise<ActionMetaInfo[]>;
|
||||
defaultDropdownMenuActions(options?: Partial<DefaultDropdownActionsParams>): ActionMetaInfo[];
|
||||
floatingTradingPanelVisibility(): IWatchedValue<boolean>;
|
||||
domVisibility(): IWatchedValue<boolean>;
|
||||
domPanelVisibility(): IWatchedValue<boolean>;
|
||||
orderPanelVisibility(): IWatchedValue<boolean>;
|
||||
silentOrdersPlacement(): IWatchedValue<boolean>;
|
||||
patchConfig(config: Partial<BrokerConfigFlags>): void;
|
||||
patchOrderDialogOptions(options: OrderDialogOptions): void;
|
||||
setDurations(durations: OrderDurationMetaInfo[]): void;
|
||||
orderUpdate(order: Order, isHistoryUpdate?: boolean): void;
|
||||
orderPartialUpdate(id: string, orderChanges: Partial<Order>): void;
|
||||
@@ -529,10 +554,12 @@ export interface IBrokerConnectionAdapterHost {
|
||||
fullUpdate(): void;
|
||||
realtimeUpdate(symbol: string, data: TradingQuotes): void;
|
||||
plUpdate(positionId: string, pl: number): void;
|
||||
pipValueUpdate(symbol: string, pipValues: PipValues): void;
|
||||
tradePLUpdate(tradeId: string, pl: number): void;
|
||||
equityUpdate(equity: number): void;
|
||||
marginAvailableUpdate(marginAvailable: number): void;
|
||||
domeUpdate(symbol: string, equity: DOMData): void;
|
||||
showOrderDialog<T extends PreOrder>(order: T, handler: (order: T, customFieldsResult?: CustomInputFieldsValues) => Promise<void>, focus?: OrderTicketFocusControl, options?: OrderDialogOptions): Promise<void>;
|
||||
showOrderDialog<T extends PreOrder>(order: T, handler: (order: T) => Promise<void>, focus?: OrderTicketFocusControl, options?: OrderDialogOptions): Promise<void>;
|
||||
showCancelOrderDialog(orderId: string, handler: () => Promise<void>): Promise<void>;
|
||||
showCancelMultipleOrdersDialog(symbol: string, side: Side | undefined, qty: number, handler: () => Promise<void>): Promise<void>;
|
||||
showCancelBracketsDialog(orderId: string, handler: () => Promise<void>): Promise<void>;
|
||||
@@ -555,16 +582,24 @@ export interface IBrokerTerminal extends IBrokerWithoutRealtime {
|
||||
export interface IBrokerWithoutRealtime extends IBrokerCommon {
|
||||
subscribeDOME?(symbol: string): void;
|
||||
unsubscribeDOME?(symbol: string): void;
|
||||
cancelOrder(orderId: string, silently: boolean): Promise<void>;
|
||||
cancelOrders(symbol: string, side: Side | undefined, ordersIds: string[], silently: boolean): Promise<void>;
|
||||
reversePosition?(positionId: string, silently?: boolean): Promise<void>;
|
||||
closePosition?(positionId: string, silently: boolean): Promise<void>;
|
||||
closeTrade?(tradeId: string, silently: boolean): Promise<void>;
|
||||
placeOrder(order: PreOrder): Promise<void>;
|
||||
modifyOrder(order: Order): Promise<void>;
|
||||
cancelOrder(orderId: string): Promise<void>;
|
||||
cancelOrders(symbol: string, side: Side | undefined, ordersIds: string[]): Promise<void>;
|
||||
reversePosition?(positionId: string): Promise<void>;
|
||||
closePosition?(positionId: string): Promise<void>;
|
||||
closeTrade?(tradeId: string): Promise<void>;
|
||||
editPositionBrackets?(positionId: string, brackets?: Brackets): Promise<void>;
|
||||
editTradeBrackets?(tradeId: string, brackets?: Brackets): Promise<void>;
|
||||
/**
|
||||
* @deprecated Brokers should always send PL and equity updates
|
||||
*/
|
||||
subscribePL?(positionId: string): void;
|
||||
subscribeEquity?(): void;
|
||||
subscribeMarginAvailable?(symbol: string): void;
|
||||
subscribePipValue?(symbol: string): void;
|
||||
unsubscribePipValue?(symbol: string): void;
|
||||
unsubscribeMarginAvailable?(symbol: string): void;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -580,7 +615,7 @@ export interface IChartWidgetApi {
|
||||
onVisibleRangeChanged(): ISubscription<() => void>;
|
||||
dataReady(callback: () => void): boolean;
|
||||
crossHairMoved(callback: (params: CrossHairMovedEventParams) => void): void;
|
||||
setVisibleRange(range: VisibleTimeRange, callback: () => void): void;
|
||||
setVisibleRange(range: VisibleTimeRange, options?: SetVisibleRangeOptions): Promise<void>;
|
||||
setSymbol(symbol: string, callback: () => void): void;
|
||||
setResolution(resolution: ResolutionString, callback: () => void): void;
|
||||
resetData(): void;
|
||||
@@ -595,14 +630,17 @@ export interface IChartWidgetApi {
|
||||
* @deprecated Use shape/study API instead ([getStudyById] / [getShapeById])
|
||||
*/
|
||||
setEntityVisibility(entityId: EntityId, isVisible: boolean): void;
|
||||
createStudy<TStudyInputValue extends StudyInputValue, TOverrides extends StudyOverrides>(name: string, forceOverlay: boolean, lock?: boolean, inputs?: TStudyInputValue[], callback?: (entityId: EntityId) => void, overrides?: TOverrides, options?: CreateStudyOptions): EntityId | null;
|
||||
createStudy<TStudyInputValue extends StudyInputValue, TOverrides extends StudyOverrides>(name: string, forceOverlay: boolean, lock?: boolean, inputs?: TStudyInputValue[], overrides?: TOverrides, options?: CreateStudyOptions): Promise<EntityId | null>;
|
||||
getStudyById(entityId: EntityId): IStudyApi;
|
||||
getSeries(): ISeriesApi;
|
||||
createShape<TOverrides extends object>(point: ShapePoint, options: CreateShapeOptions<TOverrides>): EntityId | null;
|
||||
createMultipointShape<TOverrides extends object>(points: ShapePoint[], options: CreateShapeOptions<TOverrides>): EntityId | null;
|
||||
getShapeById(entityId: EntityId): ILineDataSourceApi;
|
||||
removeEntity(entityId: EntityId): void;
|
||||
removeAllShapes(): void;
|
||||
removeAllStudies(): void;
|
||||
selection(): ISelectionApi;
|
||||
showPropertiesDialog(studyId: EntityId): void;
|
||||
createStudyTemplate(options: CreateStudyTemplateOptions): object;
|
||||
applyStudyTemplate(template: object): void;
|
||||
createOrderLine(options: CreateTradingPrimitiveOptions): IOrderLineAdapter;
|
||||
@@ -612,14 +650,22 @@ export interface IChartWidgetApi {
|
||||
symbolExt(): SymbolExt;
|
||||
resolution(): ResolutionString;
|
||||
getVisibleRange(): VisibleTimeRange;
|
||||
/**
|
||||
* @deprecated Use Price Scale API instead
|
||||
*/
|
||||
getVisiblePriceRange(): VisiblePriceRange;
|
||||
scrollPosition(): number;
|
||||
defaultScrollPosition(): number;
|
||||
priceFormatter(): IFormatter;
|
||||
chartType(): SeriesStyle;
|
||||
setTimezone(timezone: 'exchange' | Timezone): void;
|
||||
getTimezone(): 'exchange' | Timezone;
|
||||
getPanes(): IPaneApi[];
|
||||
exportData(options?: ExportDataOptions): Promise<ExportedData>;
|
||||
canZoomOut(): boolean;
|
||||
zoomOut(): void;
|
||||
setZoomEnabled(enabled: boolean): void;
|
||||
setScrollEnabled(enabled: boolean): void;
|
||||
}
|
||||
export interface IChartingLibraryWidget {
|
||||
headerReady(): Promise<void>;
|
||||
@@ -639,7 +685,7 @@ export interface IChartingLibraryWidget {
|
||||
load(state: object): void;
|
||||
getSavedCharts(callback: (chartRecords: SaveLoadChartRecord[]) => void): void;
|
||||
loadChartFromServer(chartRecord: SaveLoadChartRecord): void;
|
||||
saveChartToServer(onComplete?: EmptyCallback, onFail?: EmptyCallback, saveAsSnapshot?: false, options?: SaveChartToServerOptions): void;
|
||||
saveChartToServer(onComplete?: EmptyCallback, onFail?: EmptyCallback, options?: SaveChartToServerOptions): void;
|
||||
removeChartFromServer(chartId: string, onCompleteCallback: EmptyCallback): void;
|
||||
onContextMenu(callback: (unixTime: number, price: number) => ContextMenuItem[]): void;
|
||||
createButton(options?: CreateButtonOptions): HTMLElement;
|
||||
@@ -664,6 +710,8 @@ export interface IChartingLibraryWidget {
|
||||
takeScreenshot(): void;
|
||||
lockAllDrawingTools(): IWatchedValue<boolean>;
|
||||
hideAllDrawingTools(): IWatchedValue<boolean>;
|
||||
magnetEnabled(): IWatchedValue<boolean>;
|
||||
magnetMode(): IWatchedValue<number>;
|
||||
undoRedoState(): UndoRedoState;
|
||||
}
|
||||
export interface IDatafeedChartApi {
|
||||
@@ -681,7 +729,7 @@ export interface IDatafeedChartApi {
|
||||
getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, rangeStartDate: number, rangeEndDate: number, onResult: HistoryCallback, onError: ErrorCallback, isFirstCall: boolean): void;
|
||||
subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void;
|
||||
unsubscribeBars(listenerGuid: string): void;
|
||||
subscribeDepth?(symbolInfo: LibrarySymbolInfo, callback: DomeCallback): string;
|
||||
subscribeDepth?(symbol: string, callback: DomeCallback): string;
|
||||
unsubscribeDepth?(subscriberUID: string): void;
|
||||
}
|
||||
export interface IDatafeedQuotesApi {
|
||||
@@ -762,6 +810,10 @@ export interface IOrderLineAdapter {
|
||||
setText(value: string): this;
|
||||
getTooltip(): string;
|
||||
setTooltip(value: string): this;
|
||||
getModifyTooltip(): string;
|
||||
setModifyTooltip(value: string): this;
|
||||
getCancelTooltip(): string;
|
||||
setCancelTooltip(value: string): this;
|
||||
getQuantity(): string;
|
||||
setQuantity(value: string): this;
|
||||
getEditable(): boolean;
|
||||
@@ -801,9 +853,13 @@ export interface IOrderLineAdapter {
|
||||
}
|
||||
export interface IPaneApi {
|
||||
hasMainSeries(): boolean;
|
||||
getLeftPriceScale(): IPriceScaleApi;
|
||||
getRightPriceScale(): IPriceScaleApi;
|
||||
getLeftPriceScales(): ReadonlyArray<IPriceScaleApi>;
|
||||
getRightPriceScales(): ReadonlyArray<IPriceScaleApi>;
|
||||
getMainSourcePriceScale(): IPriceScaleApi | null;
|
||||
getHeight(): number;
|
||||
setHeight(height: number): void;
|
||||
moveTo(paneIndex: number): void;
|
||||
paneIndex(): number;
|
||||
}
|
||||
export interface IPositionLineAdapter {
|
||||
remove(): void;
|
||||
@@ -819,6 +875,12 @@ export interface IPositionLineAdapter {
|
||||
setText(value: string): this;
|
||||
getTooltip(): string;
|
||||
setTooltip(value: string): this;
|
||||
getProtectTooltip(): string;
|
||||
setProtectTooltip(value: string): this;
|
||||
getCloseTooltip(): string;
|
||||
setCloseTooltip(value: string): this;
|
||||
getReverseTooltip(): string;
|
||||
setReverseTooltip(value: string): this;
|
||||
getQuantity(): string;
|
||||
setQuantity(value: string): this;
|
||||
getExtendLeft(): boolean;
|
||||
@@ -863,6 +925,37 @@ export interface IPositionLineAdapter {
|
||||
export interface IPriceScaleApi {
|
||||
getMode(): PriceScaleMode;
|
||||
setMode(newMode: PriceScaleMode): void;
|
||||
isInverted(): boolean;
|
||||
setInverted(isInverted: boolean): void;
|
||||
getVisiblePriceRange(): VisiblePriceRange | null;
|
||||
setVisiblePriceRange(range: VisiblePriceRange): void;
|
||||
}
|
||||
export interface ISelectionApi {
|
||||
add(entities: EntityId[]): void;
|
||||
set(entities: EntityId[]): void;
|
||||
remove(entities: EntityId[]): void;
|
||||
contains(entity: EntityId): boolean;
|
||||
allSources(): EntityId[];
|
||||
isEmpty(): boolean;
|
||||
clear(): void;
|
||||
onChanged(): ISubscription<() => void>;
|
||||
}
|
||||
export interface ISeriesApi {
|
||||
isUserEditEnabled(): boolean;
|
||||
setUserEditEnabled(enabled: boolean): void;
|
||||
mergeUp(): void;
|
||||
mergeDown(): void;
|
||||
unmergeUp(): void;
|
||||
unmergeDown(): void;
|
||||
detachToRight(): void;
|
||||
detachToLeft(): void;
|
||||
detachNoScale(): void;
|
||||
moveToOtherSourceScale(entityId: EntityId): void;
|
||||
isVisible(): boolean;
|
||||
setVisible(visible: boolean): void;
|
||||
bringToFront(): void;
|
||||
sendToBack(): void;
|
||||
entityId(): EntityId;
|
||||
}
|
||||
export interface ISettingsAdapter {
|
||||
initialSettings?: InitialSettingsMap;
|
||||
@@ -918,8 +1011,16 @@ export interface InstrumentInfo {
|
||||
pipSize: number;
|
||||
minTick: number;
|
||||
lotSize?: number;
|
||||
type?: SymbolType;
|
||||
brokerSymbol?: string;
|
||||
description: string;
|
||||
domVolumePrecision?: number;
|
||||
leverage?: string;
|
||||
marginRate?: number;
|
||||
}
|
||||
export interface IsTradableResult {
|
||||
tradable: boolean;
|
||||
reason?: string;
|
||||
}
|
||||
export interface LibrarySymbolInfo {
|
||||
/**
|
||||
@@ -945,6 +1046,10 @@ export interface LibrarySymbolInfo {
|
||||
exchange: string;
|
||||
listed_exchange: string;
|
||||
timezone: Timezone;
|
||||
/**
|
||||
* Prices format: "price" or "volume"
|
||||
*/
|
||||
format: SeriesFormat;
|
||||
/**
|
||||
* Code (Tick)
|
||||
* @example 8/16/.../256 (1/8/100 1/16/100 ... 1/256/100) or 1/10/.../10000000 (1 0.1 ... 0.0000001)
|
||||
@@ -1047,7 +1152,7 @@ export interface NumericFormattingParams {
|
||||
decimal_sign: string;
|
||||
}
|
||||
export interface OrderDialogOptions {
|
||||
customFields?: (TextWithCheckboxFieldMetaInfo | CustomInputFieldMetaInfo)[];
|
||||
customFields?: OrderDialogCustomField[];
|
||||
}
|
||||
export interface OrderDuration {
|
||||
/**
|
||||
@@ -1059,6 +1164,7 @@ export interface OrderDuration {
|
||||
export interface OrderDurationMetaInfo {
|
||||
hasDatePicker?: boolean;
|
||||
hasTimePicker?: boolean;
|
||||
default?: boolean;
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
@@ -1072,6 +1178,10 @@ export interface OrderWithParent extends PlacedOrder {
|
||||
export interface Overrides {
|
||||
[key: string]: string | number | boolean;
|
||||
}
|
||||
export interface PipValues {
|
||||
buyPipValue: number;
|
||||
sellPipValue: number;
|
||||
}
|
||||
export interface PlacedOrder extends PreOrder, CustomFields {
|
||||
id: string;
|
||||
filledQty?: number;
|
||||
@@ -1107,6 +1217,7 @@ export interface PreOrder {
|
||||
stopLoss?: number;
|
||||
takeProfit?: number;
|
||||
duration?: OrderDuration;
|
||||
customFields?: CustomInputFieldsValues;
|
||||
}
|
||||
export interface PricedPoint extends TimePoint {
|
||||
price: number;
|
||||
@@ -1131,7 +1242,7 @@ export interface QuotesBase {
|
||||
change: number;
|
||||
change_percent: number;
|
||||
last_price: number;
|
||||
fractional: number;
|
||||
fractional: boolean;
|
||||
minmov: number;
|
||||
minmove2: number;
|
||||
pricescale: number;
|
||||
@@ -1174,10 +1285,16 @@ export interface SeriesFieldDescriptor {
|
||||
sourceType: 'series';
|
||||
plotTitle: string;
|
||||
}
|
||||
export interface SetVisibleRangeOptions {
|
||||
applyDefaultRightMargin?: boolean;
|
||||
percentRightMargin?: number;
|
||||
}
|
||||
export interface SingleBrokerMetaInfo {
|
||||
configFlags: BrokerConfigFlags;
|
||||
customNotificationFields?: string[];
|
||||
durations?: OrderDurationMetaInfo[];
|
||||
orderDialogOptions?: OrderDialogOptions;
|
||||
customUI?: BrokerCustomUI;
|
||||
}
|
||||
export interface SortingParameters {
|
||||
columnId: string;
|
||||
@@ -1243,6 +1360,7 @@ export interface SubscribeEventsMap {
|
||||
layout_about_to_be_changed: (newLayoutType: LayoutType) => void;
|
||||
layout_changed: EmptyCallback;
|
||||
activeChartChanged: (chartIndex: number) => void;
|
||||
drawing_event: (soursceId: string, drawingEventType: DrawingEventType) => void;
|
||||
}
|
||||
export interface SuccessFormatterParseResult extends FormatterParseResult {
|
||||
res: true;
|
||||
@@ -1284,6 +1402,7 @@ export interface TextWithCheckboxFieldCustomInfo {
|
||||
asterix?: boolean;
|
||||
}
|
||||
export interface TextWithCheckboxFieldMetaInfo extends CustomInputFieldMetaInfo {
|
||||
inputType: 'TextWithCheckBox';
|
||||
value: TextWithCheckboxValue;
|
||||
customInfo: TextWithCheckboxFieldCustomInfo;
|
||||
validator?: TextInputFieldValidator;
|
||||
@@ -1320,6 +1439,10 @@ export interface Trade extends CustomFields {
|
||||
side: Side;
|
||||
price: number;
|
||||
}
|
||||
export interface TradingCustomization {
|
||||
position: Overrides;
|
||||
order: Overrides;
|
||||
}
|
||||
export interface TradingQuotes {
|
||||
trade?: number;
|
||||
size?: number;
|
||||
@@ -1335,6 +1458,7 @@ export interface TradingTerminalWidgetOptions extends ChartingLibraryWidgetOptio
|
||||
widgetbar?: WidgetBarParams;
|
||||
rss_news_feed?: RssNewsFeedParams;
|
||||
news_provider?: NewsProvider;
|
||||
trading_customization?: TradingCustomization;
|
||||
brokerFactory?(host: IBrokerConnectionAdapterHost): IBrokerWithoutRealtime | IBrokerTerminal;
|
||||
}
|
||||
export interface UndoRedoState {
|
||||
@@ -1391,5 +1515,6 @@ export interface WidgetBarParams {
|
||||
readonly?: boolean;
|
||||
};
|
||||
}
|
||||
export type CustomTimezones = 'Africa/Cairo' | 'Africa/Johannesburg' | 'Africa/Lagos' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Caracas' | 'America/Chicago' | 'America/El_Salvador' | 'America/Juneau' | 'America/Lima' | 'America/Los_Angeles' | 'America/Mexico_City' | 'America/New_York' | 'America/Phoenix' | 'America/Santiago' | 'America/Sao_Paulo' | 'America/Toronto' | 'America/Vancouver' | 'Asia/Almaty' | 'Asia/Ashkhabad' | 'Asia/Bahrain' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Dubai' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Kathmandu' | 'Asia/Kolkata' | 'Asia/Kuwait' | 'Asia/Muscat' | 'Asia/Qatar' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Taipei' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Atlantic/Reykjavik' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Copenhagen' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Moscow' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Vilnius' | 'Europe/Warsaw' | 'Europe/Zurich' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Honolulu' | 'Pacific/Norfolk' | 'US/Mountain';
|
||||
|
||||
export as namespace TradingView;
|
||||
|
||||
Reference in New Issue
Block a user