Bob The SMA Bot

SHARE BOB  :          
Bob is the first Crypto trading bot that I have designed and developed. Just like his very rudimentary picture, I went with simplicity in terms of a trading strategy so that I could put my focus on getting the architecture right. Bob is reasonably dynamic and I intend creating forks of him for other trading strategies.

The technology stack I have gone with is Microsoft SQL Server 2017 (for housing the data), Microsoft .NET (for integration with Exchanges) and R (for applying Machine Learning to the data). Data is acquired from (for historical data) and (for current prices). The Exchange I use for automated transactions is

I will go into the trading strategy in a bit more detail further down, but essentially it uses a combination of simple moving averages (SMA) to generate buy and sell signals for long trades which it executes on automatically with the Exchange.

Bot Details

DescriptionBob the simple SMA bot
Launch Date2018-02-18
Start Value (ZAR)R 1000.00
Current Value (ZAR)R 925.50
Gain \ Loss (ZAR)R -74.50
Gain \ Loss (%)-7.45 %
Days Operating37

Overall Performance

Number of Transactions (Buy and Sell)2
Number of Winning Transactions1
Number of Losing Transactions1

Transaction Breakdown

Buy DateSell DateBitcoin BoughtBitcoin ValueBuy ValueSell ValueGain / Loss

SMA Trading Strategy

The trading strategy uses three simple moving averages. An SMA is an average of the values of n number of points before the current transaction.

The three simple moving averages are then broken down into a fast moving trend and a slow moving trend.

A buy signal will be generated when both the fast moving and slow moving trends are bullish (or above 0) and the previous fast moving trend was bearish (or below 0).

A sell signal is generated when the fast moving trend becomes bearish (or drops below 0).

The chart below shows the buy signals (marked B). Note how the buys signals started to occur with a temporary rise in the Bitcoin price.

The chart below shows the sell signals (marked S). Bitcoin has experienced a bearish market in the beginning of 2018 (reflected in the initial downward trend of the price in the price chart above). The strategy does identify much more sell signals than buy signals. The Bot ignores a sell signal when not in a trade.

Below is a chart that shows the closing price for Bitcoin on the Exchange. I have lined the timing up with the above SMA.
The chart above shows a bearish market in the first part of 2018 with limited buy signals in the SMA graphs further up.

As more price data comes in over time, machine learning will be applied (using R) to find the best SMA combination to generate buy and sell signals.