The resource loading... loading...

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}

exchange ORDER_STATE