Galts-Gulch / avarice

Multi-Indicator Python3 OKCoin CN & Intl Trading Bot/Infrastructure
Other
91 stars 29 forks source link

Staging branch DMI issue. #28

Closed ghost closed 9 years ago

ghost commented 9 years ago

Running the latest staging branch and keep getting the following error whether DMI is in Full mode or volatility.

C:\AvariceSimulation>avarice.py Database is recent enough; resuming Connecting to OKCoin WebSocket(s)... Waiting 8.93 minutes to resume on schedule Candle: 9067 Price: 1623.89 cny Time: 10:18:51 Date: 2015/07/05 MACD : We are in an Uptrend Diff: 4.206402418095422 MACD Hist: 0.7495248457172692 ADX: 0.1457345769950673 Exception in thread Thread-1: Traceback (most recent call last): File "C:\Python34\lib\threading.py", line 920, in _bootstrap_inner self.run() File "C:\Python34\lib\threading.py", line 1186, in run self.function(_self.args, *_self.kwargs) File "C:\AvariceSimulation\genutils.py", line 16, in do_every worker_func() File "C:\AvariceSimulation\avarice.py", line 133, in RCWrapper gu.do_every(ldb.CandleSizeSeconds, RunCommon) File "C:\AvariceSimulation\genutils.py", line 16, in do_every worker_func() File "C:\AvariceSimulation\avarice.py", line 107, in RunCommon getattr(strategies, config.gc['Trader']['Advanced Strategy'])() File "C:\AvariceSimulation\strategies.py", line 49, in Default if ast.literal_eval(config.gc['Indicators'][l]['Volatility Threshold Over'])

File "C:\Python34\lib\site-packages\configobj.py", line 554, in getitem val = dict.getitem(self, key) KeyError: 'DMI'

Candle: 9068 Price: 1623.46 cny Time: 10:33:51 Date: 2015/07/05 MACD : We are in a Downtrend Diff: 3.299140421387392 MACD Hist: -0.1411332403601544 ADX: 0.1608811693435232 Exception in thread Thread-4: Traceback (most recent call last): File "C:\Python34\lib\threading.py", line 920, in _bootstrap_inner self.run() File "C:\Python34\lib\threading.py", line 1186, in run self.function(_self.args, *_self.kwargs) File "C:\AvariceSimulation\genutils.py", line 16, in do_every worker_func() File "C:\AvariceSimulation\avarice.py", line 107, in RunCommon getattr(strategies, config.gc['Trader']['Advanced Strategy'])() File "C:\AvariceSimulation\strategies.py", line 49, in Default if ast.literal_eval(config.gc['Indicators'][l]['Volatility Threshold Over'])

File "C:\Python34\lib\site-packages\configobj.py", line 554, in getitem val = dict.getitem(self, key) KeyError: 'DMI'

RealJohnGalt commented 9 years ago

Sorry about that! I apparently forgot to test with combined indicators/volatility indicators. I'll fix this very shortly.

ghost commented 9 years ago

Thanks, will give it a try and let you know if I find anything else. Really appreciate all the effort. You've made a very awesome trading bot.

ghost commented 9 years ago

Unable to modify DMI thresholds. Get the following error in the configuration:

builtins.AttributeError

AttributeError: 'DMI' object has no attribute 'vi20' Traceback (most recent call last)

File "C:\Python34\lib\site-packages\flask\app.py", line 1836, in __call__

return self.wsgi_app(environ, start_response)

File "C:\Python34\lib\site-packages\flask\app.py", line 1820, in wsgi_app

response = self.make_response(self.handle_exception(e))

File "C:\Python34\lib\site-packages\flask\app.py", line 1403, in handle_exception

reraise(exc_type, exc_value, tb)

File "C:\Python34\lib\site-packages\flask\_compat.py", line 33, in reraise

raise value

File "C:\Python34\lib\site-packages\flask\app.py", line 1817, in wsgi_app

response = self.full_dispatch_request()

File "C:\Python34\lib\site-packages\flask\app.py", line 1477, in full_dispatch_request

rv = self.handle_user_exception(e)

File "C:\Python34\lib\site-packages\flask\app.py", line 1381, in handle_user_exception

reraise(exc_type, exc_value, tb)

File "C:\Python34\lib\site-packages\flask\_compat.py", line 33, in reraise

raise value

File "C:\Python34\lib\site-packages\flask\app.py", line 1475, in full_dispatch_request

rv = self.dispatch_request()

File "C:\Python34\lib\site-packages\flask\app.py", line 1461, in dispatch_request

return self.view_functions[rule.endpoint](**req.view_args)

File "C:\AvariceSimulation\webconfigure.py", line 1361, in configuration_dmi

'Verbose'] = form32.vi20.data

AttributeError: 'DMI' object has no attribute 'vi20'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
RealJohnGalt commented 9 years ago

stupid typos in webconfigure, moved a little too quickly. Fixed those again.

ghost commented 9 years ago

Thanks for the quick response. Downloaded the new staging branch and running it in simulation now. Will let you know if I find anything else. As always, really appreciate the work.

RealJohnGalt commented 9 years ago

Thank you, please let me know.

RealJohnGalt commented 9 years ago

Closing this issue for now since I believe it is fixed. If there are any other issues, please create a new issue and let me know.