The resource loading... loading...

EXCHANGE

exchange

exchange is an exchange object, which is the first exchange object added to the strategy live trading settings, backtest settings, and all interactions with the exchange are realized through the member functions of this object.

object

function main() {
    Log("On the live trading page or backtest page, the first exchange object name added: ", exchange.GetName(), ", label:", exchange.GetLabel())
}
def main():
    Log("On the live trading page or backtest page, the first exchange object name added: ", exchange.GetName(), ", label:", exchange.GetLabel())
void main() {
    Log("On the live trading page or backtest page, the first exchange object name added: ", exchange.GetName(), ", label:", exchange.GetLabel());
}

{@var/EXCHANGE/exchanges exchanges}, {@fun/Account/exchange.GetName exchange.GetName}, {@fun/Account/exchange.GetLabel exchange.GetLabel}

exchanges

exchanges is an array of exchange objects, containing all the exchange objects added in the strategy live trading settings, backtest settings, exchanges[0], which is {@var/EXCHANGE exchange}. The exchange objects added in the strategy live trading settings or backtest settings correspond to exchanges[0], exchanges[1], exchanges[2], exchanges[n]… in the order they are added.

array

function main() {
    for(var i = 0; i < exchanges.length; i++) {
        Log("Index of the added exchange object (the first one is 0 and so on):", i, "Name:", exchanges[i].GetName(), "Label:", exchanges[i].GetLabel())
    }
}
def main():
    for i in range(len(exchanges)):
        Log("Index of the added exchange object (the first one is 0 and so on):", i, "Name:", exchanges[i].GetName(), "Label:", exchanges[i].GetLabel())
void main() {
    for(int i = 0; i < exchanges.size(); i++) {
        Log("Index of the added exchange object (the first one is 0 and so on):", i, "Name:", exchanges[i].GetName(), "Label:", exchanges[i].GetLabel());
    }
}

{@var/EXCHANGE exchange}, {@fun/Account/exchange.GetName exchange.GetName}, {@fun/Account/exchange.GetLabel exchange.GetLabel}

Structures ORDER_STATE