This commit is contained in:
Ichinga Samuel
2024-11-10 13:34:10 +01:00
parent f56d0c85b3
commit 110c7c39c7
5 changed files with 8 additions and 6 deletions
+4
View File
@@ -0,0 +1,4 @@
line-length = 150
target-version = "py311"
[format]
skip-magic-trailing-comma=true
-2
View File
@@ -4,9 +4,7 @@ from typing import Type, Self, Iterable
from logging import getLogger
from pandas import DataFrame, Series
import pandas as pd
import pandas_ta as ta
import mplfinance as mplt
from ..core.constants import TimeFrame
+1 -1
View File
@@ -14,7 +14,7 @@ async def test_bot():
symbols = [ForexSymbol(name=sym) for sym in syms]
strategies = [Chaos(symbol=symbol, name="test_chaos") for symbol in symbols]
bot = Bot()
assert bot.config.shutdown is False
bot.config.task_queue.worker_timeout = 2
bot.executor.timeout = 10
bot.add_strategies(strategies=strategies)
await bot.initialize()
+1 -1
View File
@@ -14,7 +14,7 @@ def test_bot_sync():
symbols = [ForexSymbol(name=sym) for sym in syms]
strategies = [Chaos(symbol=symbol, name="test_chaos") for symbol in symbols]
bot = Bot()
assert bot.config.shutdown is False
bot.config.task_queue.worker_timeout = 2
bot.executor.timeout = 10
bot.add_strategies(strategies=strategies)
bot.initialize_sync()
+2 -2
View File
@@ -1,5 +1,5 @@
from datetime import datetime, UTC
from math import ceil
from aiomql import TimeFrame
from aiomql.core.backtesting import BackTestEngine
from aiomql.core.backtesting.get_data import GetData
@@ -304,7 +304,7 @@ class TestBackTestEngine:
price_open=sym_info2.ask,
price_close=tp2,
)
assert profit == profit2
assert ceil(profit) == ceil(profit2)
async def test_order_margin(self, bte2):
moment = datetime(2024, 2, 3, 12, 12, tzinfo=UTC)