Common Function SDK | This function pops up a message.
(string)
Common Function SDK | This function pops up a warning message.
(string)
Common Function SDK | This function pops up an error message.
(string)
Common Function SDK | This function prints a message.
(string)
Common Function SDK | This function prints a warning message.
(string)
Common Function SDK | This function prints an error message.
(string)
Indicator SDK | This function registers an indicator.
(string)
-- the name of this indicator
(string)
-- the description of this indicator
(function)
-- the function of this indicator (e.g. function (context) {})
(array)
-- the parameters of this indicator (the range MUST be filled with null if the type is PARAMETER.STRING)
e.g.
[{
name: "factor",
value: 1,
required: true,
type: PARAMETER.NUMBER,
range:
[0, 1]
},
{
name: "checked",
value: true,
required: false,
type: PARAMETER.BOOLEAN,
range: null
}]
(array)
-- the maps of the data input of this indicator and the index
e.g.
[{
name: DATA_NAME.CLOSE,
index: 1
}]
(array)
-- the setting for the output of this indicator
e.g.
[{
name: "x",
visible: true,
renderType: RENDER_TYPE.LINE,
color: "steelblue"
}]
(number)
-- WHERE_TO_RENDER.CHART_WINDOW or WHERE_TO_RENDER.SEPARATE_WINDOW
(function)
-- the init function of this indicator (e.g. function (context) {})
(function)
-- the deinit function of this indicator (e.g. function (context) {})
(function)
-- the render function of this indicator (e.g. function (context) {})
Indicator SDK | This function unregisters an indicator.
(string)
-- the name of an indicator
Indicator SDK | This function gets the name of this indicator.
(object)
-- the name should be the same as the name of the parameter of the indicatorFunction
string
:
the name of this indicator.
Indicator SDK | This function sets the shift value of the data output of this indicator.
Indicator SDK | This function gets the parameter's value of this indicator.
(object)
-- the name should be the same as the name of the parameter of the indicatorFunction
(string)
-- the name of the specified parameter
(number | string)
:
the value of the specified parameter.
Indicator SDK | This function gets the data input.
(object)
-- the name should be the same as the name of the parameter of the indicatorFunction
(number)
-- specifies the index of the data input of this indicator
array
:
the data input of this indicator.
Indicator SDK | This function gets the data output.
(object)
-- the name should be the same as the name of the parameter of the indicatorFunction
(string)
-- specifies the name of the data output of this indicator
array
:
the data output of this indicator.
Indicator SDK | This function gets the length of the data to be calculated.
(object)
-- the name should be the same as the name of the parameter of the indicatorFunction
number
:
the length of the data to be calculated.
EA SDK | This function registers an EA.
(string)
-- the name of this EA
(string)
-- the description of this EA
(array)
-- the parameters of this EA (the range MUST be filled with null if the type is PARAMETER.STRING)
e.g.
[{
name: "factor",
value: 1,
required: true,
type: PARAMETER.NUMBER,
range:
[0, 1]
},
{
name: "checked",
value: true,
required: false,
type: PARAMETER.BOOLEAN,
range: null
}]
(function)
-- the init function of this EA (e.g. function (context) {})
(function)
-- the deinit function of this EA (e.g. function (context) {})
(function)
-- the onTick function of this EA (e.g. function (context) {})
(function)
-- the onTransaction function of this EA (e.g. function (context) {})
EA SDK | This function unregisters an EA.
(string)
-- the name of this EA
EA SDK | This function launches the specific EA. Phase (this API's scope): No limitation, but please note that DO NOT call this API in the OnTick function.
EA SDK | This function gets the name of this EA.
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
string
:
the name of this EA.
EA SDK | This function gets the length of the pending orders list. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
number
:
the length of the pending orders list.
EA SDK | This function gets the length of the cancelled orders(including the rejected orders) list. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
number
:
the length of the cancelled orders(including the rejected orders) list.
EA SDK | This function gets the pending order. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of parameter of the onTickFunction
(number)
-- the index of the pending order
object
:
the pending order.
EA SDK | This function gets the order ID of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order
string
:
the order ID.
EA SDK | This function gets the price of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order
number
:
the price.
EA SDK | This function gets the time(UTC time stamp) of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order
number
:
the time(UTC time stamp).
EA SDK | This function gets the volume lots(or the bet per pip when it comes to Spread Betting) of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order
number
:
the volume lots(or the bet per pip when it comes to Spread Betting).
EA SDK | This function gets the expiration of the specific pending order or cancelled order or rejected order. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order
number
:
the expiration.
EA SDK | This function gets the length of the open trades list. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
number
:
the length of the open trades list.
EA SDK | This function gets the length of the historical trades list. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
number
:
the length of the historical trades list.
EA SDK | This function gets the open trade. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
(number)
-- the index of the open trade
object
:
the open trade.
EA SDK | This function gets the broker name of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
string
:
the broker name.
EA SDK | This function gets the account ID of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
string
:
the account ID.
EA SDK | This function gets the trade ID of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
string
:
the trade ID.
EA SDK | This function gets the symbol name of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
string
:
the symbol name.
EA SDK | This function gets the open price of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
number
:
the open price.
EA SDK | This function gets the open time(UTC time stamp) of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
number
:
the open time(UTC time stamp).
EA SDK | This function gets the order type(buy or sell) of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
number
:
the order type(ORDER_TYPE.OP_BUY or ORDER_TYPE.OP_SELL or ORDER_TYPE.OP_BUYLIMIT or ORDER_TYPE.OP_SELLLIMIT or ORDER_TYPE.OP_BUYSTOP or ORDER_TYPE.OP_SELLSTOP).
EA SDK | This function gets the volume lots(or the bet per pip when it comes to Spread Betting) of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
number
:
the volume lots(or the bet per pip when it comes to Spread Betting).
EA SDK | This function gets the take profit of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
number
:
the take profit.
EA SDK | This function gets the stop loss of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
number
:
the stop loss.
EA SDK | This function gets the unrealized profit or loss of the specific open trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade
number
:
the unrealized profit or loss.
EA SDK | This function gets the swap point of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
number
:
the swap point.
EA SDK | This function gets the commission of the specific open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific open trade or historical trade
number
:
the commission.
EA SDK | This function gets the PL(profit or loss) of the specific historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific historical trade
number
:
the PL(profit or loss).
EA SDK | This function gets the magic number of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
number
:
the magic number.
EA SDK | This function gets the comment of the specific pending order or cancelled order or rejected order or open trade or historical trade. Phase (this API's scope): onTick | deinit
(object)
-- the specific pending order or cancelled order or rejected order or open trade or historical trade
number
:
the comment.
EA SDK | This function declares the quotes of which symbol to get. Phase (this API's scope): init
EA SDK | This function gets the bid of the specific symbol. Phase (this API's scope): onTick
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the symbol name
number
:
-- the bid.
EA SDK | This function gets the ask of the specific symbol. Phase (this API's scope): onTick
(object)
the name should be the same as the name of the parameter of the onTickFunction
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the symbol name
number
:
the ask.
EA SDK | This function gets the current tick data that triggered the onTick event. Phase (this API's scope): onTick
(object)
the name should be the same as the name of the parameter of the onTickFunction
object
:
the current tick data.
EA SDK | This function sends an order to the market. Phase (this API's scope): onTick | deinit
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the symbol name
(number)
-- the order type(ORDER_TYPE.OP_BUY or OP_SELL or OP_BUYLIMIT or OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP)
(number)
-- the price(if the order is a market order, the price should be set by zero or the current bid or the current ask)
(number)
-- the slippage
(number)
-- the lots(or the bet per pip when it comes to Spread Betting)
(number)
-- the take profit
(number)
-- the stop loss
(string)
-- the comment
(number)
-- the magic number
(number)
-- the expiration
EA SDK | This function sends an order to the market to replace the specific order that the order ID refers to. Phase (this API's scope): onTick | deinit
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the order ID
(string)
-- the symbol name
(number)
-- the order type(ORDER_TYPE.OP_BUY or OP_SELL or OP_BUYLIMIT or OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP)
(number)
-- the price(if the order is a market order, the price should be set by zero or the current bid or the current ask)
(number)
-- the slippage
(number)
-- the lots(or the bet per pip when it comes to Spread Betting)
(number)
-- the take profit
(number)
-- the stop loss
(string)
-- the comment
(number)
-- the magic number
(number)
-- the expiration
EA SDK | This function cancels the specific pending order. Phase (this API's scope): onTick | deinit
EA SDK | This function modifies the take profit or stop loss of the specific open trade. Phase (this API's scope): onTick | deinit
EA SDK | This function closes the specific open trade by sending a market order. Phase (this API's scope): onTick | deinit
EA SDK | This function gets parameter's value of EA. Phase (this API's scope): init | onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
(string)
-- the name of the parameter
(number | string)
:
the value of the parameter.
EA SDK | This function gets the handle of the specific chart. Phase (this API's scope): init
(object)
-- the name should be the same as the name of the parameter of the initFunction
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the symbol name
(string)
-- the time frame
number
:
the handle.
EA SDK | This function gets the handle of the specific indicator. Phase (this API's scope): init
(object)
the name should be the same as the name of the parameter of the initFunction
(string)
-- the broker name
(string)
-- the account ID
(string)
-- the symbol name
(string)
-- the time frame
(string)
-- the name of indicator
(array)
-- the parameters of indicator
e.g.
[{
name: "factor",
value: 1
}]
number
:
the handle.
EA SDK | This function gets the data of the specific handle. Phase (this API's scope): onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the onTickFunction
(number)
-- the return value of the getChartHandle or the getIndicatorHandle
(string)
-- the name of the specific data
array
:
the data.
EA SDK | This function gets the length of the list of the accounts that have been signed in. Phase (this API's scope): init | onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the initFunction or the deinitFunction or the onTickFunction
number
:
the length of the accounts list.
EA SDK | This function gets the account. Phase (this API's scope): init | onTick | deinit
(object)
-- the name should be the same as the name of the parameter of the initFunction or the deinitFunction or the onTickFunction
(number)
-- the index of the account
object
:
account.
EA SDK | This function gets the broker name of the specific account. Phase (this API's scope): init | onTick | deinit
(object)
-- the specific account
string
:
the broker name.
EA SDK | This function gets the account ID of the specific account. Phase (this API's scope): init | onTick | deinit
(object)
-- the specific account
string
:
the account ID.
EA SDK | This function gets the currency name of the specific account. Phase (this API's scope): init | onTick | deinit
(object)
-- the specific account
string
:
the currency name.
EA SDK | This function gets the number to fixed-point of the specific account. Phase (this API's scope): init | onTick | deinit
(object)
-- the specific account
string
:
the number to fixed-point.
EA SDK | This function gets the balance of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the balance.
EA SDK | This function gets the profit and loss statement of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the profit and loss statement.
EA SDK | This function gets the unrealized profit and loss statement of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the unrealized profit and loss statement.
EA SDK | This function gets the equity of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the equity.
EA SDK | This function gets the margin used of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the margin used.
EA SDK | This function gets the margin available of the specific account. Phase (this API's scope): onTick | deinit
(object)
-- the specific account
string
:
the margin available.
EA SDK | This function sets the result for the optimization. Phase (this API's scope): deinit
EA SDK | This function gets the broker name of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit
(object)
the name should be the same as the name of the parameter of the onTransactionFunction
string
:
the broker name of the latest transaction.
EA SDK | This function gets the account ID of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit
(object)
the name should be the same as the name of the parameter of the onTransactionFunction
string
:
the account ID of the latest transaction.
EA SDK | This function gets the ID of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit
(object)
the name should be the same as the name of the parameter of the onTransactionFunction
string
:
the ID of the latest transaction.
EA SDK | This function gets the type of the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit
(object)
the name should be the same as the name of the parameter of the onTransactionFunction
string
:
the type of the latest transaction.
EA SDK | This function gets the latest transaction that triggered the onTransaction event. Phase (this API's scope): onTick | onTransaction | deinit
(object)
the name should be the same as the name of the parameter of the onTransactionFunction
object
:
the latest transaction.