This commit is contained in:
Ichinga Samuel
2024-10-29 14:03:32 +01:00
parent 5f6d3666ee
commit 2c46e18528
6 changed files with 12 additions and 29 deletions
+3 -5
View File
@@ -1,14 +1,13 @@
import logging
from aiomql.lib.bot import Bot
from aiomql.core import Config
from aiomql.contrib.strategies import FingerTrap, Chaos
from aiomql.contrib.strategies import Chaos
from aiomql.contrib.symbols import ForexSymbol
async def test_bot():
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
syms = ['Volatility 75 Index', 'Volatility 100 Index', 'Volatility 50 Index']
syms = ['BTCUSD', 'SOLUSD', 'ETHUSD']
symbols = [ForexSymbol(name=sym) for sym in syms]
stgs = [Chaos(symbol=symbol, name='test_chaos') for symbol in symbols]
bot = Bot()
@@ -16,9 +15,8 @@ async def test_bot():
bot.executor.timeout = 30
bot.add_strategies(strategies=stgs)
await bot.initialize()
await bot.executor.execute()
assert bot.executor.no_of_running_strategies == 3
assert len(bot.executor.coroutines) == 1
assert len(bot.executor.coroutine_threads) == 1
assert len(bot.executor.tasks) == 5
assert bot.config.shutdown is True