-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'NoneType' object is not subscriptable #1
Comments
I get the same error using the default BTC-USD trading pair also. |
Thanks for pointing this out. What is the granularity set to? I’ve not tested it at granularity values other than 300 (5 min) and 900 (15 min). I’ve also not tested with pairs other than USD-BTC. I’ll look into this a bit. It’s a new script and could be a little buggy. |
As far as I can tell, this is caused when no strategies have a profit greater than zero. |
Oh interesting. That makes sense. I didn’t consider that potential failure point. Will update the script to correct that. Thanks for pointing it out. |
OK, I fixed the |
When I have a little bit more time, I think I am going to add a feature where the user can override the strategy optimization and set a default strategy of their choosing. |
Initializing optimal trading strategy... Traceback (most recent call last): File "./run_bot.py", line 12, in <module> mojo.main(parameters.API_KEY, pair=parameters.pair, granularity=parameters.granularity, duration=parameters.duration, cash_buffer=parameters.cash_buffer, reframe_threshold=parameters.reframe_threshold, continuous=parameters.continuous, chandelier=parameters.chandelier) File "/home/pi/Pi-Trader-master/helper_monkey.py", line 309, in main history_array, buy_point, sell_point = iterate_signal(history_array, best_strategy, pair=pair, granularity=granularity, chandelier=chandelier) File "/home/pi/Pi-Trader-master/helper_monkey.py", line 230, in iterate_signal history_pd = strategize(history_pd, strategy=strategy, chandelier=chandelier) File "/home/pi/Pi-Trader-master/helper_monkey.py", line 113, in strategize if (m[i,3] > (m[i-1,3] + strategy['buy']*m[i-1,5])) and (m[i-1,5]>0): TypeError: 'NoneType' object is not subscriptable
got this after filling API key details and issuing ./run_bot.py command. I'm using XLM/BTC trading pair. 0 XLM, small amount of test BTC on account.
The text was updated successfully, but these errors were encountered: