なぜ模擬レベルと実磁盤レベルでの復習結果は異なるのか,設定はトークネットのBTC_USDTで,戦略はポストを参照してください.

作者: リン・ハーンgaof05210作成日:2019年08月01日 14:54:24 更新日:2019年08月01日 15:19:30 更新日:2019年08月01日 更新日:2019年08月01日 更新日:2019年08月01日 更新日:2019年08月01日 更新日:2019年08月01日 更新日:2019年08月01日 更新日:2019年09月01日 更新日:2019年09月01日 更新日:2019年09月01日 更新日:2019年09月01日

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 リアルディスクレベルの再測とアログラムのレベルでの再測は,再測のメカニズムが異なる.