क्यों एनालॉग और वास्तविक डिस्क स्तर पर रिट्रीट के परिणाम अलग हैं, जो कि टोकन नेटवर्क के BTC_USDT पर सेट हैं, रणनीति देखें पोस्ट

लेखक:gaof05210, बनाया गयाः 2019-08-01 14:54:24, अद्यतन किया गयाः 2019-08-01 15:19:30

def CancelPendingOrders():
    orders = _C(exchange.GetOrders)
    Log(len(orders))
    for order in orders:
          exchange.CancelOrder(order.Id,order)


def onTick():
    depth = _C(exchange.GetDepth)
    askprice = depth.Asks[0].Price-0.01
    bidprice = depth.Bids[0].Price+0.01
    if bidprice<askprice:
        bidprice = askprice+0.01
    CancelPendingOrders()
    
    exchange.Sell(askprice,30)
    exchange.Buy(bidprice,30)


def main():
    while (true):
        onTick()
        Sleep(2000)

अधिक

छोटे सपनेआप इस पोस्ट को देख सकते हैंः https://www.fmz.com/bbs-topic/662 वास्तविक डिस्क स्तर पर पुनः परीक्षण और अनुकरणीय स्तर पर पुनः परीक्षण पुनः परीक्षण तंत्र अलग हैं।