– sharing skill and practices
Running a trading bot for joy and profit
Bitcoin and cryptocurrencies has bot a wild rail this fall. After observing the phenomenon from the sidelines for fairly some time, I did spil many others and bought some BTC with the intention to hold for a long time. Eyeing the exchange rate go up every week wasgoed joy! However, an idea commenced to form. The Bitcoin market has very high volatility and is lightly outpacing the stock markets by a lotsbestemming. It voorwaarde be possible to make a welgevoeglijk profit just by buying low and selling high. This should be a flawless task for a bot.
Come in CryptoTrader
After very first considering to build a bot using Bitcoin exchange APIs directly, a friend mentioned there are purpose-built platforms and frameworks for this already. CryptoTrader.org is a big toneelpodium for trading bots, suggesting both the devices to build your own bots and a market for renting bots others have written. Best of all, the webpagina takes care of running the bots 24/7 and all you need to get commenced is an API key from your beloved exchange.
I use Coinbase to buy and hold, so using their GDAX exchange wasgoed the quickest way to get embarked. You get trading accounts at GDAX by completing a brief signup process, which contains an extra ID verification complementing the one you had to go through when signing up for Coinbase. Transferring funds inbetween Coinbase and GDAX accounts is instant and free. The main downside to GDAX is that they have a limited number of currency pairs compared to other exchanges. The pairs are based on Bitcoin, Ethereum and Litecoin only. That’s not a big problem when getting began ter this field, but spil you get more experienced you’ll want to explore currency pairs suggested by other exchanges too. CryptoTrader supports a long list of exchanges and currency pairs.
When considering to use CryptoTrader it is very recommended to backtest bots on historical gegevens. Albeit writing my own bot is a long-term objective, I chose to browse the bot marketplace for a bot to rent to get embarked. CryptoTrader has a slightly strange convention for displaying bot popularity. The most popular bot has a “100%” beside it and other bots have lower percentages, instead of using a elementary count of the number of running instances. For plainness I chose to concentrate my initial testing on the most popular bot, Blade Runner.
Blade Runner is built on a compelling “always sell higher” logic. The bot automatically detects the market conditions spil one of rising, falling or sideways market. Based on current price it calculates the price levels where it wants to buy and sell, and executes orders based on that. Whenever it buys, it instantly registers a sell order at the exchange at a price point which is about 3% higher than the buy price (a “limit sell” order, i.e. an order with a requested price for the sale to toebijten). The sell order remains ter the order book of the exchange until that price point is reached and the order is executed by the exchange. Whenever one of the limit sell orders are traded at the exchange, the bot has made a profit. This is the “always sell higher” logic, ensuring a profit at every sell.
There is one catch with this logic: The sell price has to be reached for the profit to be realized. If the bot buys and the market starts falling for a long time, the sell orders will just stay te the exchange order book. The bot does not seem to adjust the sell orders to the fresh market conditions, so you simply have to wait for the market to rise again to the predefined sell prices even however that might take days (or weeks). This means you need a medium- to long-term horizon for your trading bot and cannot expect phenomenal comebacks ter hours. It is best to view the trading bot spil a way of consistently enhancing the amount of cryptocurrency you hold.
Testing, testing, testing
All the getting commenced guides for trading bots stress that it’s significant to backtest. This means running a lotsbestemming of simulations on historical gegevens to get to know the behavior of the bot, tweak the settings and evaluate if it’s able to give consistent profits. So I began backtesting Blade Runner on the BTC-USD currency pair. I ran numerous simulations of different time periods, and ter at least two of them there wasgoed a significant profit. Anxious to get embarked for real, I purchased the entry project of CryptoTrader and rented the bot for three months. Buying access and renting the bot wasgoed a slick process where the CryptoTrader toneelpodium generated invoices ter BTC and I just had to send the BTC from my wallet to the address ter the invoice.
With access, I continued to backtest the bot on BTC-USD. And then I realized, to my dismay, that I wasgoed incapable to find a combination of bot settings that made the bot give positive comebacks and at the same time ritme the “B&H” strategy. B&H is Buy & Hold, which all backtests and live bot instances are automatically compared to. The B&H percentage is the percentage of profit or loss you would get by just buying at the embark of the time period and holding the assets until the end of the time period. When backtesting on BTC-USD on the long time period of rising BTC rates this fall, the B&H percentages were usually te the dual digit profits. The bot wasgoed incapable to match that. However, for certain brief time periods of corrections te the BTC rates against USD the bot wasgoed providing nipt profits while B&H wasgoed negative.
Based on thesis findings I concluded that the Blade Runner bot performs best te a sideways market. Reviewing the various currency pairs on GDAX, I found that ETH-BTC is usually a sideways market and determined to go with that pair. By being crypto-crypto this pair has extra advantages spil I see it. Very first, this means my assets are ter cryptocurrency all the time. This conforms nicely with my initial aim of buying and holding cryptocurrency. 2nd, I would not consider following a B&H strategy for the ETH-BTC pair (buying ETH at the begin and calculating profits based on the ETH-BTC rate). So I can securely disregard any B&H percentages the bot reports spil irrelevant for my case. Instead, the purpose is to get televisiekanaal profits so that the bot contributes to an increase ter my cryptocurrency assets. Any increase is a win, albeit the very first aim is to earn back what I paid for access to CryptoTrader and the Blade Runner bot.
Running the bot
The bot has a set of parameters for tuning the behavior, along with six main modes of operation: Optimal, Automatic, Rising, Falling, Sideways and Very Low Capital. I embarked out with a puny amount of BTC for trading and chose the Very Low Capital mode. Te all other modes the bot uses a varying percentage of the total funds when placing each order. Te the Very Low Capital setting this percentage is always 50%. The main reason for this is to ensure that the amount te each order is enough to avoid being rejected spil too petite by the exchange. This setting did however result te very few trades vanaf day and low profits. So I quickly switched to Optimal mode instead.
Optimal mode automatically tunes the various parameters based on the market conditions. One example is that te a rising market the bot increases the amount it buys compared to a sideways or falling market. This is done to buy fatter amounts spil early spil possible to capture more of the rising trend.
There is one significant setting to tweak te Optimal mode: “Activation of the above Procent Price Fall or Rise”. By default it is set to “Only for Price Fall”, but I got much better results by choosing “For Both Cases”. The default setting only buys when the price is falling below a calculated threshold of about 3% below the price of the last buy or sell order. To capture rising trends it’s significant to buy when the price is going up too (betting on the price to increase further).
Adjusting the funds
When I found the settings that worked best and produced a stable profit, I enlargened the amount of BTC the bot could trade with. Before depositing funds to the exchange account the bot is using, it is significant to activate the “Reset button” ter the bot settings (you can keep the bot running). Deposit funds, then wait for a minute or two before you deactivate the “Reset button” ter bot settings. This way your deposit won’t interfere with how the bot calculates profit.
There are other ways of manual interference too, for example a “Pause button” to zekering the bot from making any fresh buy orders for a period of time. You can also press Buy or Sell buttons to instruct the bot to place orders. But that will influence the bot profits spil the price point is very likely not optimal.
It’s also worth mentioning that you can zekering the bot and embark it again straks. When the bot stops all open sell orders are cancelled, leaving the funds te the trading account ter the state it wasgoed when the bot stopped (some ter ETH and some ter BTC, ter this case). Before commencing the bot again you need to make sure all funds are te the “base currency”, meaning the last one te the trading pair (for ETH-BTC that would be BTC).
One situation you need to be on the lookout for is the bot stopping due to the total amount of funds exceeding the CryptoTrader project limit. The various plans you can choose from, include thresholds ter the amount of funds the bot can use for trading. The thresholds are measured ter USD. I began with the Basic project, and when the funds ter the trading account exceeded the limit, the bot wasgoed stopped. There wasgoed no email waaks about this, so I discovered it when checking te on the bot the next day. I paid for an upgrade to the Regular project and began up the bot again. This means you cannot just embark the bot and leave behind about it, spil it might zekering at any time without notice. All it takes is for one of the cryptocurrencies te your trading account to quickly rise te value compared to USD.
The bot has managed to generate enough profits ter three weeks to voorkant the amount paid for three months of access to CryptoTrader and the bot itself. This wasgoed my initial objective. I’ll be running the bot for the remaining time period it has bot rented for to generate netwerken profits. But I’m sure it is possible to do better. There are lots of other promising bots ter the CryptoTrader strategy marketplace, so I’ll spend time backtesting other bots and other cryptocurrency trade pairs to find even better combinations. I might even commence writing my own bot.
This has bot a very arousing proefneming and I’ve learned a lotsbestemming about cryptocurrencies, trading, signals and bots. Generating a nipt profit is also nice, even however it’s not very big. The largest advantage is all the fresh skill.
Recall that the information te this blog postbode should not be relied upon spil advice or construed spil providing recommendations of any zuigeling. Any trading activity is inherently risky and it’s significant to keep ter mind that all money used for trading could get lost.
Did you find this useful? Consider donating some BTC to 13sTihkkJtP8UjuWFgFpEiFuiheCb9fQNE if you want.