Cryptocurrency Technical Analysis using Python and TA-LIB

Disclaimer: I’m not a financial advisor or technical analysis expert. This post is purely for educational purpose. I do not recommend the use of technical analysis as a sole means of trading decisions.

  • One of the essential skills I had learned in a recent time is technical analysis, where we predict the price movements using historical price charts and market statistics trends.
  • So, I decided to spend the weekend automating the technical analysis on cryptocurrencies trading and applying it to the trading strategy.
  • Some indicators are focused primarily on identifying the current market trend, including support and resistance areas. In contrast, others are focused on determining the strength of a trend and the likelihood of its continuation. Commonly used technical indicators and charting patterns include trendlines, channels, moving averages, and momentum indicators.
  • Three essential indicators I personally use for trading are:

Moving Average Convergence Divergence (MACD)

Stochastic RSI

Bollinger Bands

  • So I decided to automate the technical analysis using the above three indicators to identify a decision-making trend using the Python language.
  • I used the Binance crypto exchange websocket for a live 30-minute candle data feed.
  • We then used the TA-LIB library to parse the np_closes data for the “N” number of candles into the technical indicators.
  • Then used each indicator result to identify the buy or sell trend.
  • You can customize it accordingly and craft a strategy to either perform a trade or notify whenever the strategy pattern matches.

Example of some patterns:

Bullish/Bearish MACD crossover, RSI undervalued.

  • Here’s the example strategy I use whenever MACD is about to crossover from below(signal line) to up(histogram line) to identify the bullish/bearish trend across the multiple pairs on different candle intervals and notify it over the discord channel.

Security Analyst

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store