You are viewing a single comment's thread from:

RE: trader-bfx-backend: Order Books, Settings Module & Tickers

in #utopian-io7 years ago

Thanks for the contribution, @imwatsi. It's great to see you are progressing quickly! Since I know nothing about this kind of stuff, I'm curious how this helps you with trading?

Anyway, some thoughts about the code:

  • You use global a lot. I've never used this personally, and from what I can tell you don't have to either, but I could be wrong.
  • Part of the code looks like this
for t in allTimeframes:
    m = config.get('candles:' + t, 'markets')
        if m != '':
           m = m.split(',')
           for x in m:

and would really benefit from more descriptive variable names.

  • It still contains a lot of stuff like data[1][0], which isn't very readable. Could definitely be improved by using a namedtuple or creating a class. Also stuff like pep8, tests etc. could be added, but I don't want to repeat myself too much lol.
  • Since you added settings in this update, shouldn't you use that here instead of sleeping for 10 seconds each time:
def load_settings():
    global settings
    while True:
        settings = config_settings()
        time.sleep(10)

I'll admit I'm still a little confused about this project. Hopefully with you working on the technical analysis implementation it will become a bit more clear to me! Good luck!

P.S. creating a pull request and linking that is much easier than linking each individual commit!


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

Thanks for the review, @amosbastian.

  • In short, when the bot is fully developed, one will be able to use it as part of a customized trading solution. Say you trade with a chart open for each market you participate in. To spot signals, you'd have to keep an eye on the charts every now and then. With the bot, you can setup alerts on as many markets as you want and be notified when certain conditions are met. For example, an alert for when the RSI indicator is above 70 or when moving averages cross.

  • It can also be expanded (with a little more code work) to trade automatically based on conditions set. I won't implement that as I am just making a framework for people to be creative with, but it will be a lot easier to do so.

  • The sleep timer is to reload the settings file. It will come in handy when a UI will also be making changes to the settings file. On that note, the duration can also be one of the settings :)

It will get clearer as I put the backend together with a template frontend UI.

Thank you for your review, @amosbastian! Keep up the good work!

Coin Marketplace

STEEM 0.09
TRX 0.31
JST 0.031
BTC 107451.24
ETH 3881.27
USDT 1.00
SBD 0.58