Bläddra i källkod

Merge remote-tracking branch 'origin/master'

Daniel 2 år sedan
förälder
incheckning
adaec7bee5
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      real_time_order_MA_HLFX_1025.py

+ 2 - 1
real_time_order_MA_HLFX_1025.py

@@ -15,7 +15,7 @@ from xtquant import xtdata
 auth('18616891214', 'Ea?*7f68nD.dafcW34d!')
 # auth('18521506014', 'Abc123!@#')
 #启动交易系统
-path = 'D:\\安信证券QMT实盘_交易终端\\userdata_mini'
+path = 'c:\\qmt\\userdata_mini'
 # session_id为会话编号,策略使用方对于不同的Python策略需要使用不同的会话编号
 session_id = 20221123
 
@@ -161,6 +161,7 @@ while True:
                 try:
                     df_stock = get_bars(stock, count=60, unit=fre, fields=['date', 'open', 'close', 'high', 'low','volume'],
                                            include_now=True, df=True)
+                    print('time=', df_stock.iloc[-1].at['date'])
                     price = df_stock.iloc[-1].at['close']
                     price_open = df_stock.iloc[-1].at['open']
                     MA5_1 = df_stock['close'][-7:-2].mean()