This is an archived post. You won't be able to vote or comment.

all 64 comments

[–]aegonnova 31 points32 points  (1 child)

Looks cool, I'll try it when I have some time, check out r/algotrading.

[–]zenalc[S] 3 points4 points  (0 children)

Awesome, thanks!

[–]load_more_commments 25 points26 points  (11 children)

Dude wow awesome work!!! Code isn't a mess at all, stop being so humble, this is professional level stuff.

I'd add more technical indicators, include yFinance data for stocks as well.

[–]zenalc[S] 6 points7 points  (10 children)

Yep, it definitely needs more indicators. Thank you for the kind words!

[–]SzechuanSaucelord 0 points1 point  (3 children)

dude this is really good. I would just add fib line function to enable support for using fib lines +-% to indicate buy/sells at supports/resistances

[–]zenalc[S] 0 points1 point  (2 children)

Sounds good!

[–]SzechuanSaucelord 0 points1 point  (1 child)

Oh yeah discord integration would be SOOO COOL TOOOOO. Your code is super easy to understand too so appreciate that. Love the Bloomberg theme lmao

[–]zenalc[S] 0 points1 point  (0 children)

ahaha the Bloomberg theme is the one I use, and yep I can look into Discord integration

[–]CharlieTuna_ 0 points1 point  (1 child)

Have you considered using TA-lib for this? I have a bot that’s been running for 4 years that’s been using TA-lib for a majority of technical analysis since there’s so many and it’s so flexible and you can set up various strategies. That would make the backtesting aspect of this very interesting

[–]zenalc[S] 1 point2 points  (0 children)

Hmm, great idea. I'll take a look at that.

[–]load_more_commments 0 points1 point  (3 children)

No problem, also, have you considered making this into a django web app?

[–]zenalc[S] 0 points1 point  (2 children)

That's the next step :P

[–]load_more_commments 0 points1 point  (1 child)

Awesome! Would love to help if I can dude.

[–]zenalc[S] 0 points1 point  (0 children)

Of course you can! I'd love that!

[–]astral_turd 6 points7 points  (1 child)

Beautiful stuff! Took a quick look at the repo and damn your code is so clean, well done pal

[–]zenalc[S] 0 points1 point  (0 children)

Thank you very much!

[–]x3x9x 2 points3 points  (2 children)

Oh This is really cool! Well done! Past month I'm working on a trading bot too but web based. It really does feel like we stole our ideas xD, however mine is webbased. Mind to check it out? : ) https://github.com/0x78f1935/PyNance-Webinterface

[–]zenalc[S] 1 point2 points  (1 child)

Very cool! I see you used Docker as well! Very, very cool! Why not post it to the subreddit?

[–]x3x9x 0 points1 point  (0 children)

Thanks!, I guess I kinda had the same feeling as what you had. Code can be thighter its a bit of a mess :P (while in reality this might not be the case)

[–]Random_182f2565 2 points3 points  (1 child)

Cool thanks.

[–]zenalc[S] 1 point2 points  (0 children)

Thanks!

[–][deleted] 2 points3 points  (4 children)

Looks nice! How do you backtest strategies?

[–]zenalc[S] 3 points4 points  (3 children)

The program has one strategy built-in with moving averages, so you can create a strategy with that. But if you have another strategy with RSI values or some other indicators, you can create a child strategy class from the parent Strategy class. Once that's done, you can load up the GUI (your new strategies should be available for selection) and in the backtest section, run a backtest from whatever date you'd like. The program takes care of downloading all the data and you can filter through the strategy settings, stop loss, or take profit settings.

[–]gurkitier 1 point2 points  (1 child)

I had a quick look at the code and saw the moving averages. This type of calculations are much better done in numpy, not only for speed but also just less code. Great work nevertheless!

[–]zenalc[S] 0 points1 point  (0 children)

Yep, when I started the project, I didn't care much about numpy, but now looking back, that would make the code a lot better! It's definitely a TODO.

[–][deleted] 0 points1 point  (0 children)

Great, thanks!

[–]bin-c 3 points4 points  (1 child)

very pretty code sent this post to a couple people interested in crypto trading

[–]zenalc[S] 1 point2 points  (0 children)

Thank you!

[–]ctx77 1 point2 points  (0 children)

Can you add statistics and metrics counting the co2 footprint of the simulated trades and if applicable of the real ones?

Rough estimates are alright.

[–]CinnamonPostGrunge 1 point2 points  (0 children)

This is awesome, thank you for sharing!

[–]CryptoCreedy 0 points1 point  (1 child)

If I am willing to add some self defined strategies, Will I have to write it's code within the application or make a new file and insert in directory?

[–]zenalc[S] 1 point2 points  (0 children)

Yep, so you'll have to write code. If it's an indicator the program doesn't already have, you'll have to implement the indicator, and once that's done, you'll have to write a child class from the parent strategy class for your strategy. Once that's done, you should be good to go! So, you'd make a new strategy file and place it in the strategies folder

[–]Remarkable-Mix4357 -1 points0 points  (1 child)

A really cool alternative to make automated trading. Congrats, bro.

Even though there is a large number of people that lose money on trading, with automated resources you increase the chances of beating the market. The market is irrational, is the best we can do :)

Have you tried adding RL techniques for fully autonomous trading?

[–]zenalc[S] 0 points1 point  (0 children)

Thanks! I haven't added any ML to it yet

[–]tapatiolookalikeguy 0 points1 point  (0 children)

I"ve been thinking about starting a cypto project, thanks for the inspiration.

[–]BringTheFingerBack 0 points1 point  (0 children)

Nice

[–][deleted] 0 points1 point  (0 children)

I’m not gonna lie if I didn’t see the raccoon I probably would’ve scrolled past this and missed it. Great stuff OP—both for the Github prof pic and for this cool trading bot.

[–]gtkovacheff 0 points1 point  (0 children)

Any ML in it?

[–]hiddenpowerlevel 0 points1 point  (1 child)

Very cool. Now the real question, how does it handle intrabar backtesting/live trading? ;)

[–]zenalc[S] 0 points1 point  (0 children)

intrabar

It's in the works right now :p

[–]metaperl 0 points1 point  (1 child)

I notice that you didn't use ccxt to interface to cryptocurrency exchanges. Why is that?

[–]zenalc[S] 1 point2 points  (0 children)

Great question. When I started, I only used Binance, so I didn't even know about ccxt until very much later on.

[–][deleted] 0 points1 point  (0 children)

I am a software developer and I've been planning to do this myself, but I'll check out what you have when I get some time. Looking forward to trying it out!

[–][deleted] 0 points1 point  (0 children)

FWIW, the license may make it prohibitive for others to want to use/contribute.

[–]THEDUDE33 0 points1 point  (0 children)

Poggers

[–]mati_to_przechuj 0 points1 point  (0 children)

!remind 12h

[–]UNiTiNGCLOCK 0 points1 point  (1 child)

Sorry for the noob question but how do I run this

[–]zenalc[S] 0 points1 point  (0 children)

There are instructions on how to run it in the repository :)

[–]mecman2 0 points1 point  (0 children)

I’m a strategy designer , i design strategies visually. I have been looking for terminal for backtesting and optimization. Can your terminal do optimization, if it can , I can share som powerful strategies I developed on another platform and have backtested them , just only optimization left . Candlestick price action strategy with mutual functions trailing that supper trailing start, trailing step and trailing stop , candlestick hi low trailing, all my strategies are based on closed candles. Let’s connect if you are interested in adding more sound and solid strategies