交換は交換オブジェクトであり, 戦略に追加された最初の交換オブジェクトです. ライブ取引設定,バックテスト設定, そして取引所とのすべての相互作用は,このオブジェクトのメンバー機能を通じて実現されます.
オブジェクト
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/交換交換}, {@fun/アカウント/交換.GetName交換.GetName}, {@fun/アカウント/交換.GetLabel交換.GetLabel}
exchangesは,戦略のライブ取引設定,バックテスト設定,exchanges[0]に追加されたすべての交換オブジェクトを含む交換オブジェクトの配列であり,それは {@var/EXCHANGE exchange}. 戦略のライブ取引設定またはバックテスト設定に追加された交換オブジェクトは,追加順序で交換[0],交換[1],交換[2],交換[n]...に対応します.
配列
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}, {@var/EXCHANGE exchange}, {@fun/Account/exchange.GetName exchange.GetName exchange.GetName}, {@fun/Account/exchange.GetLabel exchange.GetLabel}, {@var/EXCHANGE exchange.GetName exchange.GetName exchange.GetName}, {@fun/Account/exchange.GetLabel exchange.GetLabel}, {@fun/Account/exchange.GetLabel exchange.GetLabel}, {@var/EXCHANGE exchange.
構造 ORDER_STATE について