0
focar em
0
Seguidores

Notas sobre o uso de exchange.GetPosition(): primeiro verifique se é uma matriz vazia

Criado em: 2018-11-07 08:17:28, atualizado em: 2019-04-17 15:52:12
comments   2
hits   2100
    exchange.SetTimeout(3000);
    exchange.SetContractType("XBTUSD");

    //取得第一次币量
    position = _C(exchange.GetPosition);
    last_Amount = position[0].Amount; //持币数量  
    hold_price = Math.round(position[0].Price); //持币均价
    
    
    TypeError: cannot read property 'Amount' of undefined at main (__FILE__:38)