Skip to content

The Relative Orders Strategy

PermieBTS edited this page Aug 21, 2019 · 3 revisions

21.0 The Relative Orders Strategy

Relative-Orders

21.1 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.

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

21.3 Worker Parameters

21.3.1 Each parameter can be acquired by a few different means. For instance, the center price can be specified manually, calculated from the closest opposite orders on the market, or calculated from a certain depth in the orderbooks.

21.3.2 Additional methods will still be added, but the existing methods already enable a huge amount of possible configuration combinations from which to choose and experiment with. Here are the existing ones by category (not by actual order):

21.4 Centre Price (to be thought of as the reference price for placing own orders)

  • 21.4.1 Center Price: You can input any price value for Quote asset, which the bot will respect. "Measure center price from market orders" must be disabled for this method to be available

  • 21.4.2 Measure center price from market orders: means that each time new orders are placed, the market center price is calculated from the opposite orders in the market.

  • 21.4.3 Measurement depth: If zero, the centre price is calculated from highest bid and lowest ask, regardless of the size of the orders. They might be dust orders, and thus give us poor information. If nonzero(n), the bid and ask prices (of which the center price is calculated) are the average prices you would get by selling n quote or you would have to pay for buying n quote.

  • 21.4.4 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.

  • 21.4.5 Manual center: You can add an additional offset to move the orders up or down if you think the market is trending. This is independent of the aforementioned automatic offset; you can use either or both. Be careful with this as it could cause the bot to sell everything.

  • 21.4.6 Last Filled Order Price as New Centre Price: This tickbox will wait until the worker has made at least one trade, and from then on will use the workers last filled order as the centre price. (Feature added in v0.15.5)

21.5 Spread

  • 21.5.1** Fixed Spread: "Dynamic spread" must be disabled for this option to be available. Spread means how many percent higher will your ask be than your bid, so you can use numbers bigger than 100%.

  • 21.5.2 Dynamic spread: Makes your spread depend on the market's spread - making it change every time new orders are created. To reset orders on market spread changes, you also need to enable "Reset orders on price change" option.

  • 21.5.3 Market depth: If zero, the market spread will be calculated from the opposite orders on the market, regardless of the order sizes. They might be dust orders, giving us the illusion of a smaller than actual spread. If nonzero(n), the spread will be calculated from n quote depth in the orderbooks. (what would be the average price for/of n quote.)

  • 21.5.4 Dynamic spread factor: How many percent of the market spread should our spread be. < 100% will give us a spread smaller than the market.

21.6 Order Size

  • 21.6.1 Fixed Order Size: Order size in Quote Asset, for both buy and sell orders. "Relative order size" must be unchecked for this option to be available.

  • 21.6.2 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.

21.7 Reset Options

  • 21.7.1 Reset orders on partial fill: If unchecked, orders will be reset only when completely filled. The percentage means how many percent of the order must be filled to trigger order resets.

  • 21.7.2 Price change: If unchecked, orders will be replaced only when expired or filled. When enabled, it will keep an eye on the market center price, and if changed more than it will trigger an orders reset.

  • 21.7.3 Order expiration (seconds): With this you can force orders to reset every n seconds. In effect, the orders will follow market price more closely

21.8 When and how to use this strategy

21.8.1 This strategy is suitable for markets where there is sufficient activity and enough participants for it to be hard to manipulate. 21.8.2 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.

21.9 For maximal profit opposite orders need to be similar in size. Your profit is determined by the smaller of the orders.

21.9.1 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.

21.9.2 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.

21.10 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.

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