It has been an exciting week with all the attention and engagement that this project has gotten so far. The small community around this Binance trading bot is now at over 500 people strong on discord at the time of writing.
With many people testing, coding and proposing new features, there have been several performance updates and quality of life improvements to the tool. Thank you to all the devs involved that got involved with this project and every one who has been testing it.
In this article, I’m going to highlight two new features for this bot, by focusing on how they work and how you might want to further customise them.
If you just came across this project, The Binance Volatility Trading Bot is a tool which is supposed to detect potential moonings across all coins on Binance, and buy in when the market conditions predict an uptrend. Please be advised that this is still very much in the experimental phase, so there is no conclusive performance data yet. Luckily the bot has a simulated trading mode, where different strategies can be tested without real money.
Another caveat before we jump into it: this bot is built in Python, and must be run from Python so a bit of technical know-how is required, though more user-friendly version is being considered.
Download the Binance Trading bot
Head over to the Binance Trading bot Repository on GitHub and download the source code to get started. Naturally you will need a Binance API key and secret, so if you don’t have a Binance account or you prefer using a dedicated account for this bot, you can use my referral link to reduce your commission fees by 5%.
For a general guide on how to download, run and configure your bot, have a look at the previous article. The scope of the current article is to provide a more in-depth explanation on the added features and how they can be customised to further tweak your bot.
Running external modules on your Binance trading bot
The recent update has introduced the option to run custom signalling indicators for the bot. These are external scripts that are executed inside the main code, but will run in a separate thread, meaning they shouldn’t impact the overall performance in the execution speed.
Signalling modules are used to send a buy signal to the main script, when the technical analysis detects a bullish pattern. Right now these modules are built on the tradingview-ta library.
The configuration for signalling modules live inside the modules themselves, because they have to operate independently of the master configuration.
Go ahead and open the file signalsamplemod.py. After the imports you will see a few customisation options. This particular module is customised to send a buy signal when any coin in signalsample.txt shows overall bullish signs.
The signal confidence is dictated by the MY_FIRST_INTERVAL, MY_SECOND_INTERVAL and TA_BUY_THRESHOLD. In this example, a buy signal is only sent if at least 18 out of 26 indicators are agreeing on a bullish movement for both 1 and 5 minute intervals. This already gives you the freedom to fine-tune external signals for further testing.
With these parameters in mind, the next snippet inside the analyze() function is what decides which signals are positive and which are not. Data is written to a file which is then picked up by the main script.
If you’re keen to build and customise your own signals, you can use the signalsamplemod.py as an example to pull through other financial signals. Please see the documentation for the tradingview-ta library.
For an example on how to use custom indicators, see custsignalmod.py
In this module, we’re by default sending a buy signal to the main script if 2 of the 3 Indicators OSC_INDICATORS = [‘MACD’, ‘Stoch.RSI’, ‘Mom’] are bullish along with both moving average indicators MA_INDICATORS = [‘EMA10’, ‘EMA20’]. For more indicators, see the tradingview-ta library.
The latest update comes with a pause module, that analyses the market and stops the main script from buying when market conditions are bad.
This module is also built on the Tradingview API and will pause the Binance trading bot from buying if the above conditions are met. By default, the module is looking at the 15 moving average indicators for BTCUSDT in a 1 minute timeframe. If at least 7 agree that the last minute is bearish, the bot will not buy. You can, and should test different variations to compare results.
Once you have fine-tuned existing indicators, or created brand new ones, go ahead and open the config.yml file and drop your indicator’s file name under SIGNALLING_MODULES as shown below:
That’s it, keep an eye out for more updates! If you want to get involved in testing/ developing for this project join our Discord.