Automatically select great trading pairs with Gunbot AutoConfig

That arrow looks like an interesting point to start executing a trading strategy for a single trade.

Experienced bot traders know that selecting “good” trading pairs can make or break an account. But, selecting trading pairs that fit a specific trading strategy is typically a task that takes quite a bit of manual work. Not great when you got into trading automation to get work off your hands.

Selecting trading pairs that match your trading strategy can make or break the results.

Frequently selecting new tradings pairs works, because pairs must match the intended strategy. Trading strategies tuned for bullish markets will usually perform awful when the market goes down, the same is true for strategies tuned for other market conditions.

I took the challenge and tried to build actual great tools for automatic pair selection in Gunbot. It’s part of a module called AutoConfig, which can automate a lot of operator tasks within Gunbot.

In this post I’ll describe some of the ways you can work with AutoConfig to automatically select trading pairs.

Gunbot – Crypto Trading Bot |

What’s hard about pair selection for a trading bot?

It’s a bot, so selecting good pairs should be all autopilot right? Nope.

When trying to automatically scan for new trading pairs, several hundred markets on an exchange must be scanned often, and fast.

The amount of data involved is huge when doing this with candlestick data, tickers are more suited but come with the problem that exchanges do not provide historical ticker data and tickers contain only very limited data like 24h change, current prices and 24h volume.

Due to this limitation, other bots often provide only rudimentary pair filters directly based on the data available in tickers, like “select trading pairs with a daily volume above 300 BTC”. This is a very limited approach. Finding pairs that fit your strategy is next to impossible with simple filters like this.

Good pair selection tools would offer fine grained filters that can help you identify the direction of a market, if the spreads are acceptably low, if volume is increasing, etc. Gunbot can now do all of this, and more.

Unique pair filters in Gunbot

To tackle all the problems mentioned above, Gunbot can now track ticker data over time, for all pairs on an exchange. Together with a bunch of powerful filters, this allows for very precise pair selection.

When selecting pairs, you can create your own set of filters. You can also create multiple filter sets to monitor for different very specific market conditions.

Filters can be used for adding and removing trading pairs. This way you can make sure that Gunbot only trades the most interesting pairs at any time.

Basic filters options

Some filters are pretty simple but very effective, think about options like:

Exclude / blacklist specific pairs, base or quote currencies.Price filters: for example set a min/max price range to filter out extremely low valued pairs.range, for example to filter out low satoshi valued pairs.Volume filters: you can filter for absolute volume ranges, but also for above/below median volume or a pairs volume ranking. Volume rank can for example be used to only select the current top10 USDT volume pairs.Bid/ask spread: measures the percentage difference between bid and ask, allowing you to filter out pairs with extreme spreads.

Advanced filters options

This is where it gets interesting. The advanced filters let you monitor pairs direction and movement over time.

Slope: the linear regression slope of a pair, expressed as a percentage of the most recent price.

This basically tells you the predicted percentage difference between the current price and the next future price, as defined by how a Linear Regression Slope is calculated.

You can use a min/max range to filter for specific slopes, for example excluding slopes too steep can be a good idea to prevent ending up with pairs that have just peaked already.

Visualization of linear regression slopes: green zones are positive slopes, red zones are downwards slopes.Price change: compare the current price with the average price for an interval.

With this filter you can easily detect if a pair is currently trading at rates above or below their average over a selected time frame.

Standard deviation: measures the amount of variation in prices within a time frame. Expressed as a percentage from the most recent price.

Using standard deviation filters you can detect pairs that show “fluctuation” from their mean price. This is very useful to separate almost static markets from potentially interesting markets to trade on.

Pair with very low standard deviation value.Pair with moderate standard deviation value.Standard deviation channel filters: plots a channel of the median price plus and minus the standard deviation.

Triggers when price breaks down the lower band of an upwards channel, or when price breaks upwards of a downwards channel.

Example of using the bullishStandardDeviationChannel filter. The market area would be where price crosses down the lower band of an upwards channel.Trailing filters: pick prices, volume and/or slope and trail them.

With a price trailing filter you can trail down all pairs on an exchange and only add a pair when it hits a trailing buy stop close to the bottom of a downwards move. The logic is pretty much identical to buy trailing in Gunbot trading strategies.

When trailing volume, a pair could be added in Gunbot when it undergoes a sudden volume increase. Together with a slope filter you can assure that the volume increase is not due to a sudden dump.

Time frames matter

You can configure which time frame should be analyzed for processing filters, and in which interval data collection takes place.

For example, you can setup filtering that looks at the data of the last 12h, collected in 5 minute intervals.

Any of the filters can then use either the full 12h of data, or the last x data points. This is useful because you could use multiple of the same filter types to cover different time frames. For example, you could filter for pairs that have an overall relatively flat slope, but have a strongly increasing slope in the last 30 minutes.

Create cross pair filters with user variables

Besides filtering market data, filter jobs can also set and filter on “user variables”. This is extremely powerful and allows different filters to interact.

A simple example of using user variables:

Filter 1 monitors USDT-BTC price movement. Sets variable “dump”: true whenever it’s current price is 0.5% lower than the hourly average.Filter set 2 monitors altcoins and the user variable “dump”. Only adds trading pairs when BTC is not dumping and the conditions of filters for altcoin markets are met.

Config examples

AutoConfig is still pretty new and lacks a GUI for now. The config system is JSON based, the wiki has plenty of examples of how to set filters.

On the new Gunthy Marketplace (only for registered Gunbot users) you can find a bunch of ready made filter sets using AutoConfig. I try to post something new there every now and then.

If you liked this story, please feel free to waste 15–20 seconds to give it 50 claps.

Automatically select great trading pairs with Gunbot was originally published in Gunbot on Medium, where people are continuing the conversation by highlighting and responding to this story.

Gunbot – Medium 

Read More 


Leave a Reply

Your email address will not be published. Required fields are marked *