[Fix] add TRADER_DIR to environment variables
This commit is contained in:
parent
111e1cabd8
commit
b417efb241
@ -31,7 +31,7 @@ from vnpy.gateway.bitmex import BitmexGateway
|
||||
# from vnpy.gateway.coinbase import CoinbaseGateway
|
||||
# from vnpy.gateway.bitstamp import BitstampGateway
|
||||
# from vnpy.gateway.gateios import GateiosGateway
|
||||
# from vnpy.gateway.bybit import BybitGateway
|
||||
from vnpy.gateway.bybit import BybitGateway
|
||||
|
||||
from vnpy.app.cta_strategy import CtaStrategyApp
|
||||
# from vnpy.app.csv_loader import CsvLoaderApp
|
||||
@ -79,7 +79,7 @@ def main():
|
||||
# main_engine.add_gateway(CoinbaseGateway)
|
||||
# main_engine.add_gateway(BitstampGateway)
|
||||
# main_engine.add_gateway(GateiosGateway)
|
||||
# main_engine.add_gateway(BybitGateway)
|
||||
main_engine.add_gateway(BybitGateway)
|
||||
|
||||
main_engine.add_app(CtaStrategyApp)
|
||||
main_engine.add_app(CtaBacktesterApp)
|
||||
|
@ -541,7 +541,7 @@ class BybitRestApi(RestClient):
|
||||
exchange=req.exchange,
|
||||
datetime=dt,
|
||||
interval=req.interval,
|
||||
volume=int(d["volume"]),
|
||||
volume=float(d["volume"]),
|
||||
open_price=float(d["open"]),
|
||||
high_price=float(d["high"]),
|
||||
low_price=float(d["low"]),
|
||||
|
@ -4,6 +4,7 @@ General utility functions.
|
||||
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict
|
||||
from decimal import Decimal
|
||||
@ -58,6 +59,7 @@ def _get_trader_dir(temp_name: str):
|
||||
|
||||
|
||||
TRADER_DIR, TEMP_DIR = _get_trader_dir(".vntrader")
|
||||
sys.path.append(str(TRADER_DIR))
|
||||
|
||||
|
||||
def get_file_path(filename: str):
|
||||
|
Loading…
Reference in New Issue
Block a user