mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-07 17:27:45 +00:00
fix trader.record_trade
make lib.backtester importable from the top level
This commit is contained in:
+3
-2
@@ -1,3 +1,4 @@
|
||||
-e git+https://github.com/Ichinga-Samuel/aiomql.git@3143ca9936e2f791798b4944bf0df7225c4c6a78#egg=aiomql
|
||||
anyio==4.3.0
|
||||
argon2-cffi==23.1.0
|
||||
argon2-cffi-bindings==21.2.0
|
||||
@@ -9,7 +10,7 @@ Babel==2.14.0
|
||||
beautifulsoup4==4.12.3
|
||||
black==23.9.1
|
||||
bleach==6.1.0
|
||||
build==1.0.3
|
||||
build==1.2.2.post1
|
||||
certifi==2023.7.22
|
||||
cffi==1.16.0
|
||||
charset-normalizer==3.3.0
|
||||
@@ -140,7 +141,7 @@ tomli==2.0.1
|
||||
tomli_w==1.0.0
|
||||
tornado==6.4
|
||||
traitlets==5.14.2
|
||||
twine==4.0.2
|
||||
twine==5.1.1
|
||||
typeapi==2.1.1
|
||||
types-python-dateutil==2.9.0.20240316
|
||||
typing_extensions==4.6.3
|
||||
|
||||
@@ -14,3 +14,4 @@ from .strategy import Strategy
|
||||
from .sessions import Sessions, Session
|
||||
from .trade_records import TradeRecords
|
||||
from .terminal import Terminal
|
||||
from .backtester import BackTester
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime, UTC
|
||||
from string import digits
|
||||
from typing import TypeVar
|
||||
from logging import getLogger
|
||||
|
||||
@@ -198,7 +199,7 @@ class Trader(ABC):
|
||||
"""
|
||||
if self.config.record_trades is False or result.retcode != 10009:
|
||||
return
|
||||
params = {**parameters} or {}
|
||||
params = {**parameters} if isinstance(parameters, dict) else {}
|
||||
profit = await self.order.calc_profit()
|
||||
params["expected_profit"] = profit
|
||||
date = (
|
||||
|
||||
Reference in New Issue
Block a user