Jika Anda ingin membeli, Anda dapat mengatur harga, dan jika Anda berhasil membeli, Anda dapat memasang harga penjualan secara otomatis. Plugin ini dapat diluncurkan dengan satu tombol di terminal transaksi, tanpa biaya, dan memudahkan transaksi manual.https://www.fmz.com/digest-topic/5051
function CancelPendingOrders() { var orders = _C(exchange.GetOrders); for (var j = 0; j < orders.length; j++) { exchange.CancelOrder(orders[j].Id, orders[j]); } } function main() { Log('robot starts to run') if(BUYPRICE >= SELLPRICE){ throw 'check buy and sell price' } CancelPendingOrders() var account = _C(exchange.GetAccount) var init_account = account Log('account: ', account.Balance); if(account.Balance > BUYPRICE*BUYAMOUNT){ exchange.Buy(BUYPRICE, BUYAMOUNT); }else{ throw 'account balances is not enough' } while(true){ account = _C(exchange.GetAccount) if(account.Stocks >= init_account.Stocks + 0.01){ exchange.Sell(SELLPRICE, account.Stocks - init_account.Stocks) } Sleep(Intervel*1000) } }