Bitcoin Forum
June 21, 2024, 08:35:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Re: [Development blog] Algorithmic trading bot | follow the project and comment on: August 28, 2017, 10:10:02 AM
Another update! YAY!

Okay, here again. I made very simple settings tab where I can change settings and kind of reset the bot to state it is after launching, but with new settings in use.
That tab looks so empty right now but I imagine it will gradually fill with new settings. Now you can change used algorithm, trading pair, stoplimit and candle size.

Now you can see the bot actually running! (1st screenshot) WHOO! what a success Grin
Right now it just fetches new data every x minutes and on every cycle runs algorithm which follows 4 and 10 candles long moving exponential averages and makes buying and selling decisions based on them crossing each other. It gets to trade some serious money already! Okay actually it just trades 4€ worth of BNB and this is like the most basic TA trading strategy there is, so I don't expect it to make any money, propably loses little bit every day.
Point of all of this is to test the core trading loop and find possible errors the bot could run into.

Bot already makes and collects candle data and two different EMAs and next I plan to implement some way to draw these into chart.
I'm not sure yet if I'll use javafx chart tools or maybe google charts or something else.
Also I have some boring stuff to take care of like handling errors binance might throw (like when your balance is too low for trade to be executed). Now program just crashes if something unexpected happens. Hence the testing I'm doing right now.






Tell me what you think and see you (hopefully soon) with next update!
2  Bitcoin / Project Development / Re: [Development blog] Algorithmic trading bot | follow the project and comment on: August 25, 2017, 09:04:58 AM
@yoona

I'm sorry but I haven't made myself familiar with websocket API but instead settled with basic Http APi which was well documented and rather easy to use.

Maybe if all-websocket isn't must you could use http for private calls (orders, balance checking etc.) and websocket for data retrieval as you already have it working.

If it's Http APi you are having trouble with, then I might know better how to help.
3  Bitcoin / Project Development / Re: [Development blog] Algorithmic trading bot | follow the project and comment on: August 24, 2017, 08:11:22 AM
Well, the amount of comments here isn't exactly what I was hoping for Grin,
but maybe we get this going

Anyway, Here is the first update on progress I've made.




So I finished implementing the API and now I have the core trading loop set up.
What it does is every 5 minutes (or 10min or 4h or whatever you set the candle size) it retrieves latest data, executes the algorithm based on that and previous data and the goes back to waiting for new candle
The biggest problem so far is binance API, It's only couple of weeks into beta and semi-frequently connection times out. For now I've solved this so that program tries again until it gets data. It always works within 10secs of first connection error. This has no effect on trading with cycle frequency of 1min or more but it means HFT is yet no-go. Although HFT wouldn't really be feasible anyway with basic http API or with exchange on the other side of world.

Also now I have Stoplimit feature! It watches your balance of currency pair you are trading and if it falls more than x% bot stops trading.

next I'll try to ease my own work and set up working settings page, so I don't have to change all the values in code anymore but can do it from actual GUI

See you with the next update!

4  Bitcoin / Project Development / [Development blog] Algorithmic trading bot | follow the project and comment on: August 21, 2017, 11:46:17 AM
Hello everyone!


1st update: https://bitcointalk.org/index.php?topic=2107831.msg21154507#msg21154507
2nd update: https://bitcointalk.org/index.php?topic=2107831.msg21275997#msg21275997



I've been lurking on this forum for a while now and thought it would be fun to share my project with you guys and get some comments and suggestions.
So what I'm doing here is writing an algorithmic trading bot from scratch. I'm not a seasoned  coder and one of the main reasons for this project is learning and getting better at coding.
I've been doing this for couple of weeks now, but because of all the stuff in my life, the progress hasn't been too fast. And I can make no promises for how quickly this is going go forward.
I plan to update this thread every time I get something new to show or talk about, meanwhile I'd really like to see what you think about what I'm doing and if you have some ideas or comments.

So, let me introduce you to:

                                               CoinBot

(okay that looks horrible, like some beginning of 2000s web font)




So how's the Bot doing at the moment?

I'm going to use Binance as my current exchange, although I plan to add more in the future. Reasons why I chose this is because their solid API, good volume and especially their low fees.
The Bot is going to make lots of trades with low profit marking so fees make a big difference here. Almost all US or EUROPE based exchanges have something like (0.25%/0.15%) fees (those are taker/maker).
Meanwhile binance has 0.1%/0.1% and those can even be reduced by 50% for the first year of trading through their BNB system. So for one buy/sell cycle I only have to pay 0.1% compared to 0.4% of these better known exchanges.

Language I'm developing this with is scala. Here the main reason is that it's the only language I know well enough Cheesy
For Graphical UI I'm using ScalaFX which is basically wrapper for java's JavaFX, well documented and widely used UI library.

I've been mainly doing the backend and implementing Binance's API and making it easy to use inside the program. On the frontend I have basic groundwork done and runnable base on top of which to build the GUI.
Now it only has terminal output implemented where bot gives updates while it's running and shows errors.

So we're at the very beginning and I'm really exited to see where this leads!
Give me your thoughts and See you soon with first update!


Oh, and have some screenshots:








Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!