Automated trading in crypto.

Discussion in 'Automated Trading' started by baljit.kaler, Apr 25, 2025.

  1. ccxt is amazing and the maintainers are super helpful. They have a telegram channel and usually respond quickly.
    Most of the API endpoints are unified now (although there are a few that user needs to implement, e.g when params need to be sent. But for most tasks it is just a matter of calling a method.
     
    #21     Jun 5, 2025
  2. Intraday or EOD?

    I backtested some intraday breakout strategies with a trailing ATR based stop (optimised). They looked amazing,.... until you put in commissions.

    I have personally found that scalping the 5min charts gives a negative expectancy.

    e.g, lets say your good win is 0.5% and are going to cut the trade at -0.25% with a 50/50 win loss ratio (expect less than this on a breakout strategy as most fail anyway). You might assume you have an expectancy of 2:1
    However;
    Your win after commissions is actually 0.3% (0.5% - 0.1% IN and -0.1% OUT)
    Your loss after commissions is actually -0.45% (0.25% - 0.1% IN and -0.1% OUT)
    Essentially you're losing 3 dollars for every 2 you gain.

    I thoroughly recommend developing end of day for now then when ready, if needed, look at 4 hourly. I wouldn't suggest you go lower than that,... but you do you. If you are going to go intraday, then I'd recommend learning how to listen to orderbooks and go with 0% fees pairs and become a market maker. Then you might start to gain an edge if your strategy is good enough. Binance on FDUSD pairs were prevoiusly doing 0% if your a market maker (i.e your order spends at least some time on the order book)

    If you're going to run it on your own machine, or on a VPS you can remote login, then I reckon going with Python is a better way to go and has so many awesome libraries, and if you get into machine learning later, Python is your key.

    If you're going to make your trading interface browser based, then javascript is what you are looking for. Tradingview has some good javascript libaries and you can drow on charts etc, where you can't do the same in the unofficial Python Lightweightcharts Tradingview library (although that is cool, check it out here).

    Python is probably the better choice though and you can learn the basics in about 6 hours with this free course.

    Learn Pandas. Check out this video and then just play around and familiarize yourself with what a dataframe is. A lot of data endpoints return pandas dataframes now, or data in csv or json format. It will be useful to learn how to use that.

    Look at BackTrader It has done most of the work for you and will get you well on your way to trading. See what it can offer.

    Look at ccxt. You'll find that they have already written methods for Buy and Sell, and various order formats, and you can even get websockets and live prices.
     
    #22     Jun 5, 2025