-
Notifications
You must be signed in to change notification settings - Fork 40
Accumulate Distribute
Accumulate/Distribute allows you to break up a large order into smaller randomized chunks, submitted at regular or irregular intervals to minimise detection by other players in the market.
By enabling the 'Await Fill' option, the algorithm will ensure each component fills before submitting subsequent orders. Enabling the 'Catch Up' flag will cause the algorithm to ignore the slice interval for the next order if previous orders have taken longer than expected to fill, thereby ensuring the time-to-fill for the entire order is not adversely affected.
The price must be manually specified as limitPrice
for LIMIT
order types, or as a combination of a price offset & cap for RELATIVE
order types. MARKET
A/D orders execute using MARKET
atomic orders, and offer no price control.
For RELATIVE
A/D orders, the price offset & cap can both be set to one of the following:
- Top ask
- Top bid
- Orderbook mid price
- Last trade price
- Moving Average (configurable period, time frame, candle price)
- Exponential Moving Average (configurable period, time frame, candle price)
The period limit for moving average targets/caps is 240
, being the number of candles returned by the Bitfinex API when subscribing to a candle data channel.
Example:
await host.startAO('bfx.accumulate_distribute', {
symbol: 'tBTCUSD',
amount: -0.2,
sliceAmount: -0.1,
sliceInterval: 10000,
intervalDistortion: 0.20, // %
amountDistortion: 0.20, // %
orderType: 'RELATIVE', // MARKET, LIMIT, RELATIVE
relativeOffset: { type: 'ask', args: [20], delta: -10 },
relativeCap: { type: 'bid', delta: 10 },
submitDelay: 150,
cancelDelay: 150,
catchUp: true, // if true & behind, ignore slice interval (after prev fill)
awaitFill: true, // await current slice fill before continuing to next slice
_margin: false,
})