Automated Trading Bot
This project is part of my work at the School of Computer Science, University of Birmingham, showcasing my expertise in Deep Learning, Data Visualisation and Cloud Deployment to turn concepts into practical solutions. Let’s explore how I’ve applied my skills to tackle challenges and create value in cryptocurrency trading bot.
![Cryptocurrency Trading Bot](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7t_01geL4Rr5Czw6900taBFBHVP1lhUqChBww7E1UWtXGjFO9afK00BipOr0v0nJnjZj6ymxH4x0zcfP0cyjWEK0_naFKc-WjPIzPCewoOPmBsWqbYjNg0zNlTq0_ZAG2TXo5ROuL4jVzwEF7l57F9mhbEofLCrrYXQxB4mxFZ1_9aWBEn7LmyS23i5B0/s572/trading_bot_framework.png)
Unlike humans, an automated trading bot operates 24/7 without emotional bias, reducing potential losses, stress, and human error. It executes trades at high speed and employs deep learning to generate precise, optimised trading signals that protect capital and maximise profits.
Project Overview
Muhajirin developed an automated cryptocurrency trading bot that executes real-time trades on the Binance exchange using real money. Python was employed for the entire process, including fetching data from the Binance API, generating trading signals from deep learning results, and analysing and visualising all data. The bot was deployed on the cloud, and trading logs were instantly sent to Telegram, notifying him of each trade execution.
Real-Time Telegram Notification
![Real-Time Telegram Notification](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJAsA-xDfCn4aQV1WD2U4XDSip0NWgKohGZP50-ofdnYROboMWB6iWvM77WV-lE6KQ7reE2WhIlEVC2TvSXCZqCWu64IR0GYWHzNzn9cn5AwqGFoNSR7NmvczVJcNXQtSVuzMES7MlIN2EmJSaV_loSRlmz0pFTpzm7vAxyMoxE9xNioY/s1600/telegram_notification.png)
When trading signal conditions are met, the bot executes trades and sends automatic Telegram notifications with trading details, evaluation metrics, and error information if issues arise. These notifications are sent via Python using the Telegram Bot API.
Real-time Trading Bot Deployment
![Real-time Trading Bot Deployment](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi42YX4EOjREcYlAEsMdABg25cblNddNZ6CXmYGoD9GWf8sraZD0UKpWdP11ZpW7YPoo9GknTgFCBN-nhgQ86K43yaA2tN8nzSkCqojYqzo-brAOwxar7R-GoG5j68VxJC5Yr67UVJC0_OvnbeCf9U7-FBmrIDgv-pgHmDVY2-Q41PktqXhq94Ngnm9FEkG/s3689/deployment_candle.png)
The Python-generated chart illustrates the trading bot's performance during its 24-hour real-time cloud deployment using trailing stop-loss risk management. With a nearly 70% win rate, the bot generated significant profits, particularly from the first two trade pairs (four initial executions).
Backtesting Trading Signal Conditions
![Backtesting Trading Signal Conditions](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD6fVnB4ra9jN3D1eAD2KBufkuDLPePx5s8KQVBjYO3A6lkqDaUca_TC9AyUzn7kTollLANr1PZAcBAZoi5cfK7GIZ5OqMyJDcySwy28YHZzQtNPm0t__Qq7nywLLLUsE9tcL4Cw9lH58dPj1PzN7NrBLyjtQpgZIw_LqbLJ7B_A87TTSNufR5AxJKa-uj/s4354/backtesting.png)
Prior to real-time deployment with real money, the trading signal conditions were backtested across various timeframes, indicators, machine learning models, and historical data from the Binance API. Candlestick plots with trading signals and indicators were generated in Python using this data.
Raw Data From Binance API
![Raw Data From Binance API](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOKaF6tPJgEpBo2wrsFArESE3IdLMBGNFFVZZ6XXrmmEJhXGYNNU128I7OyMTWRTWUO97ciNROVE5Vm-5TEUYzjyQ5Foc4CERjxx4t_tJMA3gty7ycguHn91Ul2UtqWgRbBf33scUAereU-PeIlt_puibb-K5PJCDFpl-ZKXZf_VclFFk4YoKw9-QVPfzV/s1015/raw_line_plot.png)
Raw historical close prices from the Binance API are plotted along with a smoothing line. This line plot was generated in Python using the data.
![Raw Data From Binance API](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcpo6y6WvICEx4H5bm0r-sCQXps6p35nFmaPVZRX-p0t_PNUmOPx-YsSaKEciwdQK1U6yJONZlaZ96RFIVyMxQZlaAEowiHmRO2MBVNSJCgGITmNfwA_Po2OI5fuM_LTuJcT8zy36Jc6kRkDwMhaq3BDZ3sGy__Xphhwm9WtDD9S27cx8tChpEt87MAp0Z/s727/raw_candle_plot.png)
The last 50 raw historical prices and volumes from the Binance API are plotted in candlestick style. This candlestick plot was generated in Python using the data.