Release v26.002 (from 2dcfe7d4)

This commit is contained in:
jenkins
2023-09-18 14:29:41 +00:00
parent 8fb3ee67e0
commit 4dc2fd96de
15 changed files with 699 additions and 572 deletions

View File

@@ -2852,6 +2852,30 @@ export interface ChartPropertiesOverrides extends StudyOverrides {
* @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;
}
/**
* A chart template.
@@ -3067,7 +3091,7 @@ export interface ChartingLibraryWidgetOptions {
*/
studies_access?: AccessList;
/**
* Maximum amount of studies on the chart of a multichart layout. Minimum value is 2.
* Maximum amount of studies allowed at one time within the layout. Minimum value is 2.
*
* ```javascript
* study_count_limit: 5,
@@ -3482,7 +3506,7 @@ export interface ChartingLibraryWidgetOptions {
* For example, if you want to rename "Trend Line" shape to "Line Shape", then you can do something like this:
*
* ```javascript
* custom_translate_function: (key, options) => {
* custom_translate_function: (key, options, isTranslated) => {
* if (key === 'Trend Line') {
* // patch the title of trend line
* return 'Line Shape';
@@ -3649,8 +3673,27 @@ export interface ContextMenuOptions {
*
* You can filter out, add yours and re-order items.
*
* The library will call your function each time it wants to display a context menu and with provide a list of items to display.
* The library will call your function each time it wants to display a context menu and will provide a list of items to display.
* This function should return an array of items to display.
*
* Example:
*
* ```js
* context_menu: {
* items_processor: function(items, actionsFactory, params) {
* console.log(`Menu name is: ${params.menuName}`);
* const newItem = actionsFactory.createAction({
* actionId: 'hello-world',
* label: 'Say Hello',
* onExecute: function() {
* alert('Hello World');
* },
* });
* items.unshift(newItem);
* return Promise.resolve(items);
* },
* },
* ```
*/
items_processor?: ContextMenuItemsProcessor;
/**
@@ -3747,6 +3790,16 @@ export interface CreateContextMenuParams {
type: "groupOfShapes";
/** id */
id: string | null;
} | {
/** Trading position */
type: "position";
/** id */
id: string | null;
} | {
/** Trading order */
type: "order";
/** id */
id: string | null;
};
}
export interface CreateHTMLButtonOptions {
@@ -4179,6 +4232,19 @@ export interface CustomTimezoneInfo {
*/
title: string;
}
/**
* Additional translation options
*/
export interface CustomTranslateOptions {
/** Plural/s of the phrase */
plural?: string | string[];
/** Count of the phrase */
count?: number;
/** Context of the phrase */
context?: string;
/** Replacements object */
replace?: Record<string, string>;
}
/**
* Override properties for the Cypherpattern drawing tool.
*/
@@ -7008,21 +7074,11 @@ export interface IBrokerConnectionAdapterFactory {
createWatchedValue<T>(value?: T): IWatchedValue<T>;
/**
* Creates a price formatter.
* @param priceScale - defines the number of decimal places. It is `10^number-of-decimal-places`. If a price is displayed as `1.01`, `pricescale` is `100`; If it is displayed as `1.005`, `pricescale` is `1000`.
* @param minMove - the amount of price precision steps for 1 tick. For example, since the tick size for U.S. equities is `0.01`, `minmov` is 1. But the price of the E-mini S&P futures contract moves upward or downward by `0.25` increments, so the `minmov` is `25`.
* @param fractional - for common prices is `false` or it can be skipped.
* @param minMove2 - for common prices is `0` or it can be skipped.
* @param variableMinTick - for common prices is string (for example, `0.01 10 0.02 25 0.05`) or it can be skipped.
*
* Example:
* 1. Typical stock with `0.01` price increment: `minmov = 1, pricescale = 100, minmove2 = 0`.
* 2. If `minmov = 1, pricescale = 100, minmove2 = 0, variableMinTick = "0.01 10 0.02 25 0.05"`:
*
* - for `price = 9`: `minmov = 1, pricescale = 100, minmove2 = 0`.
* - for `price = 13`: `minmov = 2, pricescale = 100, minmove2 = 0`.
* - for `price = 27`: `minmov = 5, pricescale = 100, minmove2 = 0`.
*
* For more information on fractional prices, see this [article](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#price-format)
* @param priceScale - Defines the number of decimal places. It is `10^number-of-decimal-places`. If a price is displayed as `1.01`, `pricescale` is `100`; If it is displayed as `1.005`, `pricescale` is `1000`.
* @param minMove - The amount of price precision steps for 1 tick. For example, since the tick size for U.S. equities is `0.01`, `minmov` is 1. But the price of the E-mini S&P futures contract moves upward or downward by `0.25` increments, so the `minmov` is `25`.
* @param fractional - For common prices, is `false` or it can be skipped. For more information on fractional prices, refer to [Fractional format](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#fractional-format).
* @param minMove2 - For common prices, is `0` or it can be skipped.
* @param variableMinTick - For common prices, is `string` (for example, `0.01 10 0.02 25 0.05`) or it can be skipped. For more information, refer to [Variable tick size](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#variable-tick-size).
*/
createPriceFormatter(priceScale?: number, minMove?: number, fractional?: boolean, minMove2?: number, variableMinTick?: string): IPriceFormatter;
}
@@ -9864,12 +9920,20 @@ export interface IOrderLineAdapter {
* Get the line length of the order line.
*/
getLineLength(): number;
/**
* Get the unit of length specified for the line length of the order line.
*/
getLineLengthUnit(): OrderLineLengthUnit;
/**
* Set the line length of the order line.
*
* If negative number is provided for the value and the unit is 'pixel' then
* the position will be relative to the left edge of the chart.
*
* @param value The new line length.
* @param [unit] - unit for the line length, defaults to 'percentage'.
*/
setLineLength(value: number): this;
setLineLength(value: number, unit?: OrderLineLengthUnit): this;
/**
* Get the line style of the order line.
*/
@@ -10242,15 +10306,24 @@ export interface IPositionLineAdapter {
* @param value The new extend left flag value.
*/
setExtendLeft(value: boolean): this;
/**
* Get the unit of length specified for the line length of the position line.
*/
getLineLengthUnit(): PositionLineLengthUnit;
/**
* Get the line length of the position line.
*/
getLineLength(): number;
/**
* Set the line length of the position line.
*
* If negative number is provided for the value and the unit is 'pixel' then
* the position will be relative to the left edge of the chart.
*
* @param value The new line length.
* @param [unit] - unit for the line length, defaults to 'percentage'.
*/
setLineLength(value: number): this;
setLineLength(value: number, unit?: PositionLineLengthUnit): this;
/**
* Get the line style of the position line.
*/
@@ -11683,6 +11756,10 @@ export interface LibrarySubsessionInfo {
* Session corrections string. See {@link LibrarySymbolInfo.corrections}.
*/
"session-correction"?: string;
/**
* Session to display. See {@link LibrarySymbolInfo.session_display}.
*/
"session-display"?: string;
}
export interface LibrarySymbolInfo {
/**
@@ -11889,10 +11966,12 @@ export interface LibrarySymbolInfo {
*/
seconds_multipliers?: string[];
/**
* The boolean value showing whether data feed has its own daily resolution bars or not.
* The boolean value specifying whether the datafeed can supply historical data at the daily resolution.
*
* If `has_daily` is set to `false`, all buttons for resolutions that include days are disabled for this particular symbol.
* Otherwise, the library requests daily bars from the datafeed.
* All daily resolutions that the datafeed supplies must be included in the {@link LibrarySymbolInfo.daily_multipliers} array.
*
* If `has_daily` = `false` then the library will build the respective resolutions using 1-minute bars by itself.
* If not, then it will request those bars from the data feed only if specified resolution belongs to `daily_multipliers`, otherwise an error will be thrown.
* @default true
*/
has_daily?: boolean;
@@ -15548,9 +15627,9 @@ export interface StudyOrDrawingAddedToChartEventParams {
}
/**
* Study overrides.
* See [Studies Overrides](https://www.tradingview.com/charting-library-docs/latest/customization/overrides/Studies-Overrides) to get a list of all possible properties to override.
*
* @example { 'a.overridable.property': 123 }
* See [Studies Overrides](https://www.tradingview.com/charting-library-docs/latest/customization/overrides/Studies-Overrides) to get a list of all possible properties to override.
*/
export interface StudyOverrides {
/**
@@ -16667,6 +16746,10 @@ export interface TradingTerminalWidgetOptions extends Omit<ChartingLibraryWidget
* ```
*/
rss_news_feed?: RssNewsFeedParams;
/**
* Title for the News Widget
*/
rss_news_title?: string;
/**
* Use this property to set your own news getter function. Both the `symbol` and `callback` will be passed to the function.
*
@@ -16706,19 +16789,6 @@ export interface TradingTerminalWidgetOptions extends Omit<ChartingLibraryWidget
*/
broker_factory?(host: IBrokerConnectionAdapterHost): IBrokerWithoutRealtime | IBrokerTerminal;
}
/**
* Additional translation options
*/
export interface TranslateOptions {
/** Plural of the phrase */
plural?: string;
/** Count of the phrase */
count?: number;
/** Context of the phrase */
context?: string;
/** Replacements object */
replace?: Record<string, string>;
}
/**
* Override properties for the Trendangle drawing tool.
*/
@@ -17639,6 +17709,12 @@ export type ChartingLibraryFeatureset =
"pre_post_market_sessions" |
/** Show the option to specify the default right margin in percentage within chart settings dialog @default false */
"show_percent_option_for_right_margin" |
/**
* Lock the visible range when adjusting the percentage right margin via the settings dialog.
* This applies when the chart is already at the current default margin position.
* @default false
*/
"lock_visible_time_range_when_adjusting_percentage_right_margin" |
/**
* Alternative loading mode for the library, which can be used to support
* older browsers and a few non-standard browsers.
@@ -17686,15 +17762,21 @@ export type ChartingLibraryFeatureset =
*/
"always_show_legend_values_on_mobile" |
/** Enable studies to extend the time scale, if enabled in the study metainfo */
"studies_extend_time_scale";
"studies_extend_time_scale" |
/**
* Enable accessibility features. Adds a keyboard shortcut which turns on keyboard navigation (alt/opt + z).
* @default true
*/
"accessibility";
/** These are defining the types for a background */
export type ColorTypes = "solid" | "gradient";
/**
* Context menu items processor signature
* @param {readonlyIActionVariant[]} items - an array of items the library wants to display
* @param {ActionsFactory} actionsFactory - factory you could use to create a new items for the context menu.
* @param {CreateContextMenuParams} params - an object representing additional information about the context menu, such as the menu name.
*/
export type ContextMenuItemsProcessor = (items: readonly IActionVariant[], actionsFactory: ActionsFactory) => Promise<readonly IActionVariant[]>;
export type ContextMenuItemsProcessor = (items: readonly IActionVariant[], actionsFactory: ActionsFactory, params: CreateContextMenuParams) => Promise<readonly IActionVariant[]>;
/**
* @param {readonlyIActionVariant[]} items - an array of items the library wants to display
* @param {CreateContextMenuParams} params - an object representing where the user right-clicked on (only if there is an existing menu)
@@ -17719,9 +17801,10 @@ export type CustomTimezones = "Africa/Cairo" | "Africa/Casablanca" | "Africa/Joh
/**
* Custom translation function
* @param {string} key - key for string to be translated
* @param {TranslateOptions} options? - additional translation options
* @param {CustomTranslateOptions} [options] - additional translation options
* @param {boolean} [isTranslated] - True, if the provide key is already translated
*/
export type CustomTranslateFunction = (key: string, options?: TranslateOptions) => string | null;
export type CustomTranslateFunction = (key: string, options?: CustomTranslateOptions, isTranslated?: boolean) => string | null;
export type DOMCallback = (data: DOMData) => void;
export type DateFormat = keyof typeof dateFormatFunctions;
export type DeepWriteable<T> = {
@@ -17860,16 +17943,17 @@ export type ISeriesStudyResult = [ /* time */
*/
export type InputFieldValidator = (value: any) => InputFieldValidatorResult;
export type InputFieldValidatorResult = PositiveBaseInputFieldValidatorResult | NegativeBaseInputFieldValidatorResult;
export type LanguageCode = "ar" | "zh" | "cs" | "da_DK" | "ca_ES" | "nl_NL" | "en" | "et_EE" | "fr" | "de" | "el" | "he_IL" | "hu_HU" | "id_ID" | "it" | "ja" | "ko" | "fa" | "pl" | "pt" | "ro" | "ru" | "sk_SK" | "es" | "sv" | "th" | "tr" | "vi" | "no" | "ms_MY" | "zh_TW";
export type LanguageCode = "ar" | "zh" | "cs" | "ca_ES" | "nl_NL" | "en" | "fr" | "de" | "el" | "he_IL" | "hu_HU" | "id_ID" | "it" | "ja" | "ko" | "fa" | "pl" | "pt" | "ro" | "ru" | "es" | "sv" | "th" | "tr" | "vi" | "ms_MY" | "zh_TW";
export type LayoutType = SingleChartLayoutType | MultipleChartsLayoutType;
export type LegendMode = "horizontal" | "vertical";
export type LibrarySessionId = "regular" | "extended" | "premarket" | "postmarket";
export type MarkConstColors = "red" | "green" | "blue" | "yellow";
export type MultipleChartsLayoutType = "2h" | "2v" | "2-1" | "3s" | "3h" | "3v" | "4" | "6" | "8" | "1-2" | "3r" | "4h" | "4v" | "4s" | "5h" | "6h" | "7h" | "8h" | "1-3" | "2-2" | "2-3" | "1-4" | "5s" | "6c" | "8c" | "10c5" | "12c6" | "12c4" | "14c7" | "16c8" | "16c4";
export type MultipleChartsLayoutType = "2h" | "2v" | "2-1" | "3s" | "3h" | "3v" | "4" | "6" | "8" | "1-2" | "3r" | "4h" | "4v" | "4s" | "5h" | "6h" | "7h" | "8h" | "1-3" | "2-2" | "2-3" | "1-4" | "5s" | "6c" | "8c";
export type OnActionExecuteHandler = (action: IAction) => void;
export type OnActionUpdateHandler = (action: IAction) => void;
export type OnReadyCallback = (configuration: DatafeedConfiguration) => void;
export type Order = PlacedOrder | BracketOrder;
export type OrderLineLengthUnit = "pixel" | "percentage";
export type OrderTableColumn = AccountManagerColumn & {
/**
* An optional numeric array of order statuses that is applied to order columns only. If it is available then the column will be displayed in the specified tabs of the status filter only.
@@ -17890,6 +17974,7 @@ export type PageName = "watchlist_details_news" | "data_window" | "object_tree";
* Plot shape ID.
*/
export type PlotShapeId = "shape_arrow_down" | "shape_arrow_up" | "shape_circle" | "shape_cross" | "shape_xcross" | "shape_diamond" | "shape_flag" | "shape_square" | "shape_label_down" | "shape_label_up" | "shape_triangle_down" | "shape_triangle_up";
export type PositionLineLengthUnit = "pixel" | "percentage";
export type PriceSource = "open" | "high" | "low" | "close";
export type QuoteData = QuoteOkData | QuoteErrorData;
/**