CinderellaMan

CinderellaMan

Hello,

Recently I started a project that became really useful for me and wanted to share it as it could be useful for people that are trying to build trading bots.

At this moment Toretto (well, it’s a dev codename) - can stream trade events from Binance, allows to see things through GUI (written in Phoenix Liveview) and kick of/stop streaming from there. I’m planning to add features like backtesting and even sample “naive algo” which can be showcasing how to write an algo.

My idea would be to expand it to be like kick-starter boilerplate for somebody planning to code algo trading in Elixir - batteries included (you can read more about plans from “to do” section. A little bit like quantopian but it would be fully open source and written in Elixir <3

I’m really excited to share this even when it’s in such very early stage - I’m relatively new to Elixir/Erlang so any guidance would be greatly appreciated.

Link: GitHub - Cinderella-Man/igthorn: Cryptocurrency trading platform · GitHub

PS. Help from anybody with any design skill would be greatly appreciated :smiley:

Thanks in advance,

Kamil

Showing Posts 1 to 9

tty

tty

If you can provide Simple and Exponential Moving Averages it would be useful to build most of the other indicators and trading algorithms.
The next likely candidate would be Fibonacci Retracements and Extensions.
Are you also providing conditional trade executions (stop loss, etc) ?

CinderellaMan

CinderellaMan OP

Wow, that’s exactly the answer/comment that I was hoping for - thank you so much. I will add it to my todo list and start working on them ASAP. There will be some learning curve so feel free to jump in with help whenever you can - would be greatly appreciated :wink:

Regards conditional executions - they are supported by Binance as far as I remember correctly - otherwise it would be part of strategy.

tty

tty

Is it possible to place shorts ? If not it won’t be possible to arbitrage.

CinderellaMan

CinderellaMan OP

It’s not possible to short crypto on crypto exchanges (as far as I’m aware, CFDs is allowing it but I doubt that I will support MetaTrader or similar - better focus on getting it working with exchanges).

When I was pointing to arbitrage I was thinking about buying on binance and selling somewhere else in the same time and gaining by price difference.

CinderellaMan

CinderellaMan OP

Hello,

I added a skin to the app, dashboard with current (streamed) prices and currently working on first algo. Will keep you updated.

Ps. Looks like LiveView works perfect in widget structure using mount as “controller” - example in repo would be price_feed_live.

Enjoy

CinderellaMan

CinderellaMan OP

It took me ages but I managed to push new version tonight.

Backtesting is now implemented and working, naive strategy is trading and making money (checked live and using “unit” tests) - screenshot below:

Warning: As per description in repository, use it at your own risk :slight_smile: It’s still buggy for sure but I’m working hard to make it better - any contributions are welcome :slight_smile:

Also, repository got moved to: GitHub - Cinderella-Man/igthorn: Cryptocurrency trading platform · GitHub
I started to tag releases - newest one is 0.0.2

mbenatti

mbenatti

Great job @CinderellaMan,
Are you using for personal projets or something on enterprise ecosystem?

CinderellaMan

CinderellaMan OP

Hello @mbenatti

Sorry for a late response. I’m planning to start a small trading company which will be based heavily on Igthorn platform (which btw changed address again… sorry: GitHub - Cinderella-Man/igthorn: Cryptocurrency trading platform · GitHub)

I was taking my time to respond as I was prepping version 1.0.0 - first stable release of ecosystem.

It contains numerous improvements:

  • multi trader naive strategy
  • fully working backtesting setup

I made some backtesting runs and I need to admit that I wasn’t expecting anything like that.

Here’s a chart of XRPUSDT for 03.06.2019 up to 09-06.2019 (7 days):

Settings:

    budget             | 1000
    retarget_interval  | 0.02
    profit_interval    | 0.005
    buy_down_interval  | 0.01
    chunks             | 10
    stop_loss_interval | 0.05
    rebuy_interval     | 0.03

Symbol: XRPUSDT
Date range: 2019-06-03 - 2019-06-09 (inclusive)
Number of events: 1047065
Market start price: 0.44396000
Market last price: 0.38527000
Market performance: -13.219659428777376%
Naive strategy performance: -2.96853464475%
Number of orders: 1098
Number of trades: 384
- gaining trades: 346
- stop losses: 38
Estimated number of retargeted orders = 1098 - 398 * 2 - 38 = 264

PS. @mbenatti I’ve seen your PR for binance.ex package. I’m got some admin perks to be able to push it forward - if you want to team up to get it better, let me know. We could also go through your PR and get it to mergeable state.

CinderellaMan

CinderellaMan OP

Hello,

Sorry for a long time without updates but I’ve spent it doing a lot of live testing which takes time. I just released version 1.0.1 of Igthorn which fixes a lot of edge cases and other bugs that cropped out in live trading (yes, this code is trading live coins for more than a month now!)

List of new features:

  • ability to gracefully shutdown trading (this allows traders to continue until they will be able to sell)
  • more sophisticated rebuying strategy that keeps track are any other traders at specific price level
  • dashboard widgets:
    • amount of trades across last days
    • total income in last 24h, 7 days, 30 days and all the time
    • char pie of gaining / losing trades
  • nailed a lot of edge cases where race condition between exchange and Igthorn was happening
  • new screen allowing configuration of Binance API key and secret - THIS IS NOT USED YET
  • smaller changes like syncing state of traders with leader to allow to shutdown ones that have not filled buy orders and others

Other nice things include new logo :slightly_smiling_face:

Below new dashboard look:
Dashboard

Next on the road map indicators that were pointed out earlier but never had time to get them sorted out.

Enjoy!

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews