The robot will place pending orders at fixed intervals for the first time on the exchange.
Add a trade pair after starting to run, continuously try to access the market, if you can access the market, indicate the start of the trade, the strategy will be hung, do not get enough indicates not open, continue to try again waiting.
function main() { exchange.SetTimeout(500) //保证较快的返回null,继续重试获取行情 while(true){ var ticker = exchange.GetTicker() if(!ticker){ continue }else{ Log('获取到行情,开始下单') for(var i=0;i<N;i++){ if(Type == 0){ exchange.Buy(Start_Price-i*Spread,Amount+i*Amount_Step) }else{ exchange.Sell(Start_Price+i*Spread,Amount+i*Amount_Step) } } Log('完成挂单,退出程序') return } } }
gg50933064It's too slow! No manual speed! Is there an upgrade?
MAIKEOThank the grass god.