0
Follow
0
Followers
Warum unterscheiden sich die Backtest-Ergebnisse des Simulationslevels und des realen Levels? Die Einstellungen sind beide BTC_USDT von Huobi.com. Siehe den Beitrag für Strategien
Created 2019-08-01 14:54:24 Updated 2019-08-01 15:19:30
1
2059
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)
Related Recommendations
Get Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?5.5 Trading strategy optimization5.4 Why do we need an off-sample test5.3 How to read the strategy backtest performance report
Comment
All comments (1)
- 1
