Tutorials

How to use DEXBot with Relative Orders strategy

download

Relative Orders

This strategy places a buy order below the center price and a sell order above the center price. When both orders fill, the account will have a little more of both assets, as it will have sold for more than it bought. The strategy adds liquidity close to the current price, and so serves traders wanting to buy or sell right now with as little slippage as possible.

This strategy practically requires the bot to be online constantly. If you run the bot on a laptop, consider the Staggered Orders strategy.

Configuration options

Each parameter can be acquired by a few different means. In the future additional means will be added, enabling a huge amount of possible configuration combinations, from which to choose and experiment with. Here are the existing ones by category:

Center price

  •  Fixed Center Price: You can input any price value for Quote asset, which the bot will respect.
  •  Dynamic Center Price: The bot will calculate the center price from the highest bid and lowest ask from the market, and update every time an order is completely filled
  •  Center Price Offset based on asset balances: This will move your center price up or down based on your asset balances and defined Spread. This helps keep your assets and order sizes balanced, and also helps coping with trending prices.

Spread

  •  Fixed Spread: This is currently the only option. Spread means how many percent higher will your ask be than your bid, so you can use numbers bigger than 100%.

Order Size

  •  Fixed Order Size: Order size in Quote Asset, for both buy and sell orders.
  •  Relative Order Size: Order size relative to how much of the asset you have. 10% means it will allocate 10% of the Base asset you have, and 10% of the _Quote asset you have.

When and How to Use This Strategy

This strategy is suitable for markets where there is sufficient activity and enough participants for it to be hard to manipulate. It is also important that sufficient price discovery has already happened, so the market doesn’t fluctuate too much. For new and/or fluctuating markets, Staggered Orders is a much better choice.

For maximal profit opposite orders need to be similar in size. Your profit is determined by the smaller of the orders. You need to look for values that give you the best combination of a spread as large as possible, and as many filled orders as possible. The market activity in question limits both. In active markets you get lots of filled orders, and the spreads are small. In inactive markets the spreads are large, but filled orders only few.

It is wise to start by experimenting with conservative parameters, like a 10-20% spread and 1-10% relative order size, and see if it makes any trades and any profit. Then gradually adjust values to more aggressive.

Please note that if you start the strategy one-sided, it will aggressively try to balance your portfolio. It shouldn’t buy at stupid prices though. In any case, it might be better to manually aquire some of the other asset before starting the bot.