Skip to main content

Interface: IOrderLineAdapter

Charting Library.IOrderLineAdapter

An API object that controls order lines created with IChartWidgetApi.createOrderLine. For more information, refer to Trading primitives.

Methods​

getBodyBackgroundColor​

getBodyBackgroundColor(): string

Get the body background color of the order line.

Returns​

string


getBodyBorderColor​

getBodyBorderColor(): string

Get the body border color of the order line.

Returns​

string


getBodyFont​

getBodyFont(): string

Get the body font of the order line.

Returns​

string


getBodyTextColor​

getBodyTextColor(): string

Get the body text color of the order line.

Returns​

string


getCancelButtonBackgroundColor​

getCancelButtonBackgroundColor(): string

Get the cancel button background color of the order line.

Returns​

string


getCancelButtonBorderColor​

getCancelButtonBorderColor(): string

Get the cancel button border color of the order line.

Returns​

string


getCancelButtonIconColor​

getCancelButtonIconColor(): string

Get the cancel button icon color of the order line.

Returns​

string


getCancelTooltip​

getCancelTooltip(): string

Get the cancel tooltip of the order line.

Returns​

string


getCancellable​

getCancellable(): boolean

Get the cancellable flag value of the order line.

Returns​

boolean


getEditable​

getEditable(): boolean

Get the editable flag value of the order line.

Returns​

boolean


getExtendLeft​

getExtendLeft(): boolean

Get the extend left flag value of the order line.

Returns​

boolean


getLineColor​

getLineColor(): string

Get the line color of the order line.

Returns​

string


getLineLength​

getLineLength(): number

Get the line length of the order line.

Returns​

number


getLineLengthUnit​

getLineLengthUnit(): OrderLineLengthUnit

Get the unit of length specified for the line length of the order line.

Returns​

OrderLineLengthUnit


getLineStyle​

getLineStyle(): number

Get the line style of the order line.

Returns​

number


getLineWidth​

getLineWidth(): number

Get the line width of the order line.

Returns​

number


getModifyTooltip​

getModifyTooltip(): string

Get the modify tooltip of the order line.

Returns​

string


getPrice​

getPrice(): number

Get the price of the order line.

Returns​

number


getQuantity​

getQuantity(): string

Get the quantity of the order line.

Returns​

string


getQuantityBackgroundColor​

getQuantityBackgroundColor(): string

Get the quantity background color of the order line.

Returns​

string


getQuantityBorderColor​

getQuantityBorderColor(): string

Get the quantity border color of the order line.

Returns​

string


getQuantityFont​

getQuantityFont(): string

Get the quantity font of the order line.

Returns​

string


getQuantityTextColor​

getQuantityTextColor(): string

Get the quantity text color of the order line.

Returns​

string


getText​

getText(): string

Get the text of the order line.

Returns​

string


getTooltip​

getTooltip(): string

Get the tooltip of the order line.

Returns​

string


onCancel​

onCancel(callback): IOrderLineAdapter

Attach a callback to be executed when the order line is cancelled.

Parameters​

NameTypeDescription
callback() => voidCallback to be executed when the order line is cancelled.

Returns​

IOrderLineAdapter

onCancel<T>(data, callback): IOrderLineAdapter

Attach a callback to be executed when the order line is cancelled.

Type parameters​

Name
T

Parameters​

NameTypeDescription
dataTData to be passed to the callback.
callback(data: T) => voidCallback to be executed when the order line is cancelled.

Returns​

IOrderLineAdapter


onModify​

onModify(callback): IOrderLineAdapter

Attach a callback to be executed when the order line is modified.

Parameters​

NameTypeDescription
callback() => voidCallback to be executed when the order line is modified.

Returns​

IOrderLineAdapter

onModify<T>(data, callback): IOrderLineAdapter

Attach a callback to be executed when the order line is modified.

Type parameters​

Name
T

Parameters​

NameTypeDescription
dataTData to be passed to the callback.
callback(data: T) => voidCallback to be executed when the order line is modified.

Returns​

IOrderLineAdapter


onMove​

onMove(callback): IOrderLineAdapter

Attach a callback to be executed when the order line is moved.

Parameters​

NameTypeDescription
callback() => voidCallback to be executed when the order line is moved.

Returns​

IOrderLineAdapter

onMove<T>(data, callback): IOrderLineAdapter

Attach a callback to be executed when the order line is moved.

Type parameters​

Name
T

Parameters​

NameTypeDescription
dataTData to be passed to the callback.
callback(data: T) => voidCallback to be executed when the order line is moved.

Returns​

IOrderLineAdapter


onMoving​

onMoving(callback): IOrderLineAdapter

Attach a callback to be executed while the order line is being moved.

Parameters​

NameTypeDescription
callback() => voidCallback to be executed while the order line is being moved.

Returns​

IOrderLineAdapter

onMoving<T>(data, callback): IOrderLineAdapter

Attach a callback to be executed while the order line is being moved.

Type parameters​

Name
T

Parameters​

NameTypeDescription
dataTData to be passed to the callback.
callback(data: T) => voidCallback to be executed while the order line is being moved.

Returns​

IOrderLineAdapter


remove​

remove(): void

Remove the order line. This API object cannot be used after this call.


setBodyBackgroundColor​

setBodyBackgroundColor(value): IOrderLineAdapter

Set the body background color of the order line.

Parameters​

NameTypeDescription
valuestringA color string in RGBA format for the body background color (e.g., "rgba(255, 0, 0, 0.5)").

Returns​

IOrderLineAdapter


setBodyBorderColor​

setBodyBorderColor(value): IOrderLineAdapter

Set the body border color of the order line.

Parameters​

NameTypeDescription
valuestringThe new body border color.

Returns​

IOrderLineAdapter


setBodyFont​

setBodyFont(value): IOrderLineAdapter

Set the body font of the order line.

Parameters​

NameTypeDescription
valuestringThe new body font.

Returns​

IOrderLineAdapter

orderLine.setPrice(170).setBodyFont("bold 12px Verdana")

setBodyTextColor​

setBodyTextColor(value): IOrderLineAdapter

Set the body text color of the order line.

Parameters​

NameTypeDescription
valuestringA simple color string for the body text (e.g., "red", "#FF0000").

Returns​

IOrderLineAdapter


setCancelButtonBackgroundColor​

setCancelButtonBackgroundColor(value): IOrderLineAdapter

Set the cancel button background color of the order line.

Parameters​

NameTypeDescription
valuestringA color string in RGBA format for the cancel button background color (e.g., "rgba(255, 0, 0, 0.5)").

Returns​

IOrderLineAdapter


setCancelButtonBorderColor​

setCancelButtonBorderColor(value): IOrderLineAdapter

Set the cancel button border color of the order line.

Parameters​

NameTypeDescription
valuestringThe new cancel button border color.

Returns​

IOrderLineAdapter


setCancelButtonIconColor​

setCancelButtonIconColor(value): IOrderLineAdapter

Set the cancel button icon color of the order line.

Parameters​

NameTypeDescription
valuestringThe new cancel button icon color.

Returns​

IOrderLineAdapter


setCancelTooltip​

setCancelTooltip(value): IOrderLineAdapter

Set the cancel tooltip of the order line.

Parameters​

NameTypeDescription
valuestringThe new cancel tooltip

Returns​

IOrderLineAdapter


setCancellable​

setCancellable(value): IOrderLineAdapter

Set the cancellable flag value of the order line.

Parameters​

NameTypeDescription
valuebooleanThe new cancellable flag value.

Returns​

IOrderLineAdapter


setEditable​

setEditable(value): IOrderLineAdapter

Set the editable of the order line.

Parameters​

NameTypeDescription
valuebooleanThe new editable.

Returns​

IOrderLineAdapter


setExtendLeft​

setExtendLeft(value): IOrderLineAdapter

Set the extend left flag value of the order line.

Parameters​

NameTypeDescription
valuebooleanThe new extend left flag value.

Returns​

IOrderLineAdapter


setLineColor​

setLineColor(value): IOrderLineAdapter

Set the line color of the order line.

Parameters​

NameTypeDescription
valuestringThe new line color.

Returns​

IOrderLineAdapter


setLineLength​

setLineLength(value, unit?): IOrderLineAdapter

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.

Parameters​

NameTypeDescription
valuenumberThe new line length.
unit?OrderLineLengthUnitunit for the line length, defaults to 'percentage'.

Returns​

IOrderLineAdapter


setLineStyle​

setLineStyle(value): IOrderLineAdapter

Set the line style of the order line.

Parameters​

NameTypeDescription
valuenumberThe new line style.

Returns​

IOrderLineAdapter


setLineWidth​

setLineWidth(value): IOrderLineAdapter

Set the line width of the order line.

Parameters​

NameTypeDescription
valuenumberThe new line width.

Returns​

IOrderLineAdapter


setModifyTooltip​

setModifyTooltip(value): IOrderLineAdapter

Set the modify tooltip of the order line.

Parameters​

NameTypeDescription
valuestringThe new modify tooltip

Returns​

IOrderLineAdapter


setPrice​

setPrice(value): IOrderLineAdapter

Set the price of the order line.

Parameters​

NameTypeDescription
valuenumberThe new price

Returns​

IOrderLineAdapter


setQuantity​

setQuantity(value): IOrderLineAdapter

Set the quantity of the order line.

Parameters​

NameTypeDescription
valuestringThe new quantity.

Returns​

IOrderLineAdapter


setQuantityBackgroundColor​

setQuantityBackgroundColor(value): IOrderLineAdapter

Set the quantity background color of the order line.

Parameters​

NameTypeDescription
valuestringThe new quantity background color.

Returns​

IOrderLineAdapter


setQuantityBorderColor​

setQuantityBorderColor(value): IOrderLineAdapter

Set the quantity border color of the order line.

Parameters​

NameTypeDescription
valuestringThe new quantity border color.

Returns​

IOrderLineAdapter


setQuantityFont​

setQuantityFont(value): IOrderLineAdapter

Set the quantity font of the order line.

Parameters​

NameTypeDescription
valuestringThe new quantity font.

Returns​

IOrderLineAdapter

orderLine.setPrice(170).setQuantityFont("bold 12px Verdana")

setQuantityTextColor​

setQuantityTextColor(value): IOrderLineAdapter

Set the quantity text color of the order line.

Parameters​

NameTypeDescription
valuestringA color string in RGBA format (e.g., "rgba(255, 0, 0, 0.5)").

Returns​

IOrderLineAdapter


setText​

setText(value): IOrderLineAdapter

Set the text of the order line.

Parameters​

NameTypeDescription
valuestringThe new text

Returns​

IOrderLineAdapter


setTooltip​

setTooltip(value): IOrderLineAdapter

Set the tooltip of the order line.

Parameters​

NameTypeDescription
valuestringThe new tooltip

Returns​

IOrderLineAdapter