If you’re familiar with quantitative trading, you’ll know that it involves lots of coding, often with Python. Before you start chipping off the 10,000 hours you need to become an expert, how about make a non-coded bot first to see if it’s worth it.
Creating a strategy
Creating a strategy for backtesting works the same way as it does for a live trading bot and it’s really easy to use. They dumbed the system down to be even more simple than it needs to be… Honestly, when I use it, I feel like I’m in elementary school.
Everything revolves around a buy, sell, stop loss and take profit function. In order for these functions to be called, blocks need to be connected to them. Blocks have some sort of characteristic, like ‘price,’ ‘indicator’ or ‘pattern’ that will be triggered on certain conditions.
In addition of blocks having attributes that you can condition, there are some that are simply conditions. If you want to, say, buy a close under the Bollinger Bands only if the 50 MA is over the 200 MA, then you use an ‘and’ condition to make sure the buy is only triggered if both indicative conditions have been met.
You can then create an equally sophisticated trigger for a sell order, or simply use a stop loss / take profit. Currently, stop losses and take profits can only be set as a percentage either trailing or from the initial order.
Before you setup a bot, you should probably have some sort of backtested strategy so that you have a chance of not losing money. Thankfully, Mudrex makes this process very simple.
Once your strategy is ready, click backtest and find the exchange, market, asset and time frame that you would like to test. The minimum time frame for free accounts is 15 minute candles, and you can get down to 1 minute with a $16 monthly subscription.
Within 30 minutes, I created a simple strategy that saw over 200% returns when backtested over 3 years. Here’s how I did it:
Buy when: Candle closes under Bollinger Bands, 50 MA is greater than 200 MA and the fast value is above the slow value on the Stochastic RSI indicator.
Sell when: price rises 5%
Stop loss: 1% (not trailing)
Now, when the bot went live, its performance was a whole other story, but since December 2018, this strategy has not returned negative PNL according to the backtesting chart.
There are just a few extra steps needed to start backtesting your live trade. You’ll need to find the API keys on your exchange. There will be a public and private key. (make sure to keep the private one… private)
Afterwards, click on your account name at the upper right side of the screen, and in the dropdown box, click ‘Exchange API Keys.’
When you hit next, enter the public and private key in the appropriate boxes and press enter.
Now, go back to your strategy and instead of pressing backtest, press ‘live trade.’
Just like how you chose the exchange, asset and timeframe on the backtest, do the same for the live trade. Unless they are running a special, you will pay 1% of the price of your trade in a fee. Once activated, your trade will not expire, so as long as you don’t mess with the strategy, you won’t need to pay it again.
Remember to have patience
If you’re like me and backtested a low time frame strategy over a long period of time, its profitability will likely take a long time to play out. And even if your strategy backtested to be profitable, it’s not a guarantee the future will play out the same.
For instance, after the COVID-19 hit the U.S. hard, Bitcoin has been following the stock market more closely than it has in the past. Events like these are when you need to reevaluate a strategy. It’s best to have strategies for all of a market’s moods and activate them when the time is opportune.
Either way, if you had always wanted to test out programmatic trading, this is a very easy way to do it. They require no personal information and neither do some exchanges that they operate with. Of course, you’ll ultimately be able to do more if you know Python, but this can help get a gauge on whether learning a language will be worth the effort.
Disclaimer: Only trade on BitMEX if residing in an authorized area