kuegi/kuegiBot

Running the bot

eugjr opened this issue · 1 comments

eugjr commented

Hi Kuegi, I'm trying to run the code, but no luck so far.

I've imported the prices for binance with crawler with no errors so far. Then, I ran the -i backtest.py command and created the bar files like the sample on backtest.py file: bars= load_bars(30 * 12, 240,0,'binance')
Then, typed bot= MultiStrategyBot
But when running b= BackTest(bot,bars).run() got errors: ("backtest_engine.py", line 38, in init self.bot.prepare(SilentLogger(),self)
TypeError: prepare() missing 1 required positional argument: 'order_interface'

I have other question too. If I use the trading_bot.py file as a sample to create a new bot config (" named i.e. as TestBot.py"), I must leave it on te bots folder and run the main script trouhgt which .py file? Which .py files I must edit to run the new created bot?

Sorry for the questions, I would like to understand the architecture of your bot, test it, as it seems to have the most important things now: run on binance futures and with stop-loss option, and then after testing, edit to test other trading strategies.

kuegi commented

i assume you created a MultiStrategyBot with parameters and not only typed bot = MultiStrategyBot right? MultiStrategyBot is a class. you would need to create an instance and add strategies to it, as sampled in the backtest.py file.

If you want to create a new bot you can look at the multiple bots in the repo as reference how to implement it. yes it needs to be a subclass of TradingBot (defined in trading_bot.py )

i wouldn't recommend to "just run it" without understanding the logics. This bot is no plug&play code. You need to understand how it works and decide on the parameters to run it with. I didn't test the default parameters, but i am pretty sure they are not profitable. So if you look for a bot to "just run and make money", you better look elsewhere. This is for educational purposes only.