Development of the bot to automate trading and mitigate the risks of trading on the Binance exchange.
About the product
In 2018, we received an order from a customer to implement a trading bot based on a ready-made algorithm.
Cryptobot is an advanced trading tool for Binance based on the Stop Loss algorithm. It should automatically track changes in the market. The main task of the bot is to buy cryptocurrency at a lower price, and sell at a higher price.
It works in a semi-automatic mode under the control of a trader.
Development from idea to release took 40 days.
During this time we are: • Made the bot interface. • Made a history of transactions. • Connected the Binance API to track statistics. • Made the inclusion of algorithms for specific pairs. • Developed several algorithms for buying and selling. • Added a button for selling all assets listed in a currency pair. • Configured the bot to work with several currency pairs: BTC / LTC, ETH / BTC.
The trading algorithm is designed for trading on the M5 timeframe (it is also suitable for M15 and M3 but the basic is M5). The algorithm is based on trend strategies accordingly it shows the best results in a pronounced bullish/bearish trend.
It gives a lot of losing trades with a small % loss in a sideways movement (flat). It means that the algorithm is not flawless and is only useful in an obvious trend. It is important that a bot on a trend earns more than it loses in a flat.
Ideally, if the bot is turned on manually: the trader determines the beginning or continuation of the trend turns on automatic trading and turns it off in a flat.
The algorithm comprises: • exponential moving average with a period of 13 (at the Close price) - EMA13 (fast); • exponential moving average with a period of 34 (at the Close price) - EMA34 (slow); • exponential moving average with a period of 89 (at the Close price) - EMA89 (filter); • standard CCI indicator with a period of 20 and levels of 50 and -50; • standard MACD indicator (12 - 26 - 9); • standard RSI indicator with period 14 and levels 45 and 55.
The technical algorithm for opening a bought deal looks like this: • fast EMA13 is higher than slow EMA34 and both of them are higher than filtering EMA89; • CCI 20 is above the zone 50… -50; • MACD crossed the zero line and above 0; • RSI 14 is above the 45-55 zone.
The technical algorithm for opening a sell deal is mirrored to the buying algorithm.
We decided to combine this algorithm with the already existing algorithm of Bot # 1 – when % stop-loss and % take profit is set manually in the Bot, and it trades with the "Profit / Loss" preset.
Profit fixation (analogous to a trailing stop) and hard work on fixing losses in the sideways market is performed automatically. This makes it possible for the overall size of profit to prevail in a trend over frequent and small losses in a flat.
The bot is configured to work with several currency pairs.
The user tracks the rate change through the statistics window on Binance.
Developed a semi-automatic trading bot for working with the Binance exchange.
Ruby on Rails
Evgeniy Zaydenberg Alexander Makarov Nikolay Melnik