mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-14 04:18:05 +00:00
v4.0.14b
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import logging
|
||||
|
||||
from aiomql import Bot, ForexSymbol, auto_commit, OpenPositionsTracker
|
||||
|
||||
from .emaxover import EMAXOver
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
|
||||
def x_bot():
|
||||
syms = ["LTCUSD", "ETHUSD", "SOLUSD", "BTCUSD"]
|
||||
symbols = [ForexSymbol(name=sym) for sym in syms]
|
||||
strategies = [EMAXOver(symbol=symbol) for symbol in symbols]
|
||||
bot = Bot()
|
||||
bot.add_strategies(strategies=strategies)
|
||||
bot.add_coroutine(coroutine=OpenPositionsTracker(autocommit=True).track, on_separate_thread=True)
|
||||
# bot.add_coroutine(coroutine=auto_commit, on_separate_thread=True)
|
||||
bot.execute()
|
||||
|
||||
|
||||
x_bot()
|
||||
Reference in New Issue
Block a user