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

cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
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
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews