mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-16 05:18:07 +00:00
v4
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user