A troca é um objeto de troca, que é o primeiro objeto de troca adicionado à estratégia.
Objeto
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}
As trocas são uma matriz de objetos de troca, contendo todos os objetos de troca adicionados nas configurações de negociação em tempo real da estratégia, configurações de backtest, trocas[0], que é {@var/EXCHANGE exchange}. Os objetos de troca adicionados nas configurações de negociação ao vivo da estratégia ou nas configurações de backtest correspondem a exchanges[0], exchanges[1], exchanges[2], exchanges[n]... na ordem em que são adicionados.
matriz
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}
Estruturas ORDER_STATE