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
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
| Name | Type | Description | 
|---|---|---|
callback | () => void | Callback to be executed when the order line is cancelled. | 
Returns
▸ onCancel<T>(data, callback): IOrderLineAdapter
Attach a callback to be executed when the order line is cancelled.
Type parameters
| Name | 
|---|
T | 
Parameters
| Name | Type | Description | 
|---|---|---|
data | T | Data to be passed to the callback. | 
callback | (data: T) => void | Callback to be executed when the order line is cancelled. | 
Returns
onModify
▸ onModify(callback): IOrderLineAdapter
Attach a callback to be executed when the order line is modified.
Parameters
| Name | Type | Description | 
|---|---|---|
callback | () => void | Callback to be executed when the order line is modified. | 
Returns
▸ onModify<T>(data, callback): IOrderLineAdapter
Attach a callback to be executed when the order line is modified.
Type parameters
| Name | 
|---|
T | 
Parameters
| Name | Type | Description | 
|---|---|---|
data | T | Data to be passed to the callback. | 
callback | (data: T) => void | Callback to be executed when the order line is modified. | 
Returns
onMove
▸ onMove(callback): IOrderLineAdapter
Attach a callback to be executed when the order line is moved.
Parameters
| Name | Type | Description | 
|---|---|---|
callback | () => void | Callback to be executed when the order line is moved. | 
Returns
▸ onMove<T>(data, callback): IOrderLineAdapter
Attach a callback to be executed when the order line is moved.
Type parameters
| Name | 
|---|
T | 
Parameters
| Name | Type | Description | 
|---|---|---|
data | T | Data to be passed to the callback. | 
callback | (data: T) => void | Callback to be executed when the order line is moved. | 
Returns
onMoving
▸ onMoving(callback): IOrderLineAdapter
Attach a callback to be executed while the order line is being moved.
Parameters
| Name | Type | Description | 
|---|---|---|
callback | () => void | Callback to be executed while the order line is being moved. | 
Returns
▸ onMoving<T>(data, callback): IOrderLineAdapter
Attach a callback to be executed while the order line is being moved.
Type parameters
| Name | 
|---|
T | 
Parameters
| Name | Type | Description | 
|---|---|---|
data | T | Data to be passed to the callback. | 
callback | (data: T) => void | Callback to be executed while the order line is being moved. | 
Returns
remove
▸ remove(): void
Remove the order line. This API object cannot be used after this call.
Returns
void
setBodyBackgroundColor
▸ setBodyBackgroundColor(value): IOrderLineAdapter
Set the body background color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | A color string in RGBA format for the body background color (e.g., "rgba(255, 0, 0, 0.5)"). | 
Returns
setBodyBorderColor
▸ setBodyBorderColor(value): IOrderLineAdapter
Set the body border color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new body border color. | 
Returns
setBodyFont
▸ setBodyFont(value): IOrderLineAdapter
Set the body font of the order line.
Example
orderLine.setPrice(170).setBodyFont("bold 12px Verdana")
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new body font. | 
Returns
setBodyTextColor
▸ setBodyTextColor(value): IOrderLineAdapter
Set the body text color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | A simple color string for the body text (e.g., "red", "#FF0000"). | 
Returns
setCancelButtonBackgroundColor
▸ setCancelButtonBackgroundColor(value): IOrderLineAdapter
Set the cancel button background color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | A color string in RGBA format for the cancel button background color (e.g., "rgba(255, 0, 0, 0.5)"). | 
Returns
setCancelButtonBorderColor
▸ setCancelButtonBorderColor(value): IOrderLineAdapter
Set the cancel button border color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new cancel button border color. | 
Returns
setCancelButtonIconColor
▸ setCancelButtonIconColor(value): IOrderLineAdapter
Set the cancel button icon color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new cancel button icon color. | 
Returns
setCancelTooltip
▸ setCancelTooltip(value): IOrderLineAdapter
Set the cancel tooltip of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new cancel tooltip | 
Returns
setCancellable
▸ setCancellable(value): IOrderLineAdapter
Set the cancellable flag value of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | boolean | The new cancellable flag value. | 
Returns
setEditable
▸ setEditable(value): IOrderLineAdapter
Set the editable of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | boolean | The new editable. | 
Returns
setExtendLeft
▸ setExtendLeft(value): IOrderLineAdapter
Set the extend left flag value of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | boolean | The new extend left flag value. | 
Returns
setLineColor
▸ setLineColor(value): IOrderLineAdapter
Set the line color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new line color. | 
Returns
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
| Name | Type | Description | 
|---|---|---|
value | number | The new line length. | 
unit? | OrderLineLengthUnit | unit for the line length, defaults to 'percentage'. | 
Returns
setLineStyle
▸ setLineStyle(value): IOrderLineAdapter
Set the line style of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | number | The new line style. | 
Returns
setLineWidth
▸ setLineWidth(value): IOrderLineAdapter
Set the line width of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | number | The new line width. | 
Returns
setModifyTooltip
▸ setModifyTooltip(value): IOrderLineAdapter
Set the modify tooltip of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new modify tooltip | 
Returns
setPrice
▸ setPrice(value): IOrderLineAdapter
Set the price of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | number | The new price | 
Returns
setQuantity
▸ setQuantity(value): IOrderLineAdapter
Set the quantity of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new quantity. | 
Returns
setQuantityBackgroundColor
▸ setQuantityBackgroundColor(value): IOrderLineAdapter
Set the quantity background color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new quantity background color. | 
Returns
setQuantityBorderColor
▸ setQuantityBorderColor(value): IOrderLineAdapter
Set the quantity border color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new quantity border color. | 
Returns
setQuantityFont
▸ setQuantityFont(value): IOrderLineAdapter
Set the quantity font of the order line.
Example
orderLine.setPrice(170).setQuantityFont("bold 12px Verdana")
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new quantity font. | 
Returns
setQuantityTextColor
▸ setQuantityTextColor(value): IOrderLineAdapter
Set the quantity text color of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | A color string in RGBA format (e.g., "rgba(255, 0, 0, 0.5)"). | 
Returns
setText
▸ setText(value): IOrderLineAdapter
Set the text of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new text | 
Returns
setTooltip
▸ setTooltip(value): IOrderLineAdapter
Set the tooltip of the order line.
Parameters
| Name | Type | Description | 
|---|---|---|
value | string | The new tooltip |