Member-only story
I’ve been trading Bitcoin using a price prediction algorithm. Here are my results.
Is Machine Learning the next big thing in crypto markets?
Two weeks go, I built a crypto trading algorithm that makes predictions on the price of Bitcoin based on machine learning, and trades based on its predictions. Test data is finally in so let’s jump into it.

The strategy
First off, allow me to briefly explain what the strategy is and how the Bitcoin trading algorithm actually works, and where the machine learning bit comes into play. For an in-depth explanation of the strategy and the code/ approach of the algorithm, I recommend reading my initial article on this topic here.
The logic is quite simple:
- The algorithm gets the Open value of the current 1h candle for BTCUSD.
- It then tries to predict the High value for this 1h candle.
- A Trade is placed and the algorithm listens to changes in price over the next hour.
- If the Current price reached the predicted price within the 1 hour timeframe, the trade is instantly closed an we take profit. However, if the predicted price is not reached within 1 hour, we close the trade as our set-up lost efficiency.
- It will not place a trade if the predicted high is smaller than the current or open prices of the candle.
The reason I’m working with 1h timeframes is because the ML model was trained on 1h Bitcoin candles. By the way, I’ve open sourced the algorithm so anyone can inspect or play around it with. I will post a GitHub link down below.
The Results
The first iteration of this strategy was able to place multiple trades in one hour. Over the course of two days, it placed more than 2753 trades but did look like it turned a decent profit, though probably coincidentally. I covered this in a different article here.
I’ve since adjusted the algorithm so it doesn’t place more than 1 trade an hour since a prediction can only made using the open price of each 1h candle.
This time around it placed considerably less trades, with only around 18 trades placed within the…