feat QMT_API.py
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -108,7 +108,6 @@ def StartTrend() -> None:
|
||||
def RunOnce(run: Runtime, signals:list[SignalItem]) -> None:
|
||||
"""按固定步骤执行一轮趋势策略, ``RunOnce``。"""
|
||||
if not trading_time(datetime.now()):
|
||||
log.info("[运行] 非交易时间,跳过本轮")
|
||||
return
|
||||
|
||||
print("=" * 40 + f" Ticker {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} " +"=" * 40)
|
||||
|
||||
@@ -71,6 +71,7 @@ def do_open(run:Runtime,code:str,volume:int,signal_key:str)->None:
|
||||
run.client,
|
||||
OP_BUY,
|
||||
code,
|
||||
-1,
|
||||
volume,
|
||||
order_id,
|
||||
signal_key,
|
||||
|
||||
@@ -25,6 +25,7 @@ class PlaceOrderRequest:
|
||||
client: Any
|
||||
op: int
|
||||
code: str
|
||||
price: float
|
||||
volume: int
|
||||
order_id: str
|
||||
strategy_name: str
|
||||
|
||||
Reference in New Issue
Block a user