General concept: Like regular Shots, this algorithm is designed to profit from sudden price changes by holding open orders. The difference is that in regular Shots the order stands at a certain level from the current price, while in Depth Shots the order is placed at a certain volume level (“Depth”) in the order book.
Add a new algorithm by clicking the «Add Algorithm» button on the «Algorithms» tab. The following pop-up window will appear:
The user can choose between DEPTH SHOT and DEPTH SHOT GROUP algorithm. The first one runs the algorithm for one trading pair, the second one — for several trading pairs.
Consider DEPTH SHOT GROUP:
General settings
- Emulation: if the checkbox is checked, the algorithm works in the «emulation» mode, without placing orders to the exchange. (In this mode, the commission is not taken into account in the reports, you need to calculate it yourself for analysis)
- Name: specify the name of your algorithm to easily identify it in the full list of algorithms. For convenience, you can specify parameters in the name, for example, «10kk-long». Or use the formulae for auto-generation of the name based on the algorithm parameters.
- In the Preview column, you will see the final name of the algorithm
- Auto start with core: the checkbox allows the user to select whether the algorithm will start automatically after the core starts.
- Stop if trade latency is higher than: will stop the algorithm (and cancel its orders) if the transaction latency exceeds this value. Specified in seconds. 1 second = 1000 ms delay.
Stop on delay of stock data. It is recommended to use a small value (1-5 seconds) to stop the algorithm as soon as a delay in the input of stock data is noticed. This is an additional protection against lags on the exchange side, which can cause unwanted order fills. In low liquid spot markets, as well as long distances, you can increase this parameter and thus disable the autostop, specifically to keep trading when the market is chaotic.
- Stop if order latency higher than: will cancel the placing of an order if for any reason it takes longer to place (or cancel) than the time specified in this setting in seconds.
- Auto restart: allows you to allow or disallow the algorithm logic to run automatically if a previously placed order has been executed.
- Restart delay: delay of the algorithm from re-triggering. In seconds.
- Open graph on trigger: theon/off switch allows the user to open a chart to the screen when an order is filled on this strategy.
- Open chart at trade close: the on/off switch allows the user to open a chart to the screen when a trade is closed (TP or SL execution) on this strategy.
- Filter check frequency: time in seconds, how often the algorithm checks the values of current deltas on the market. For «slow» algorithms, it is desirable to query deltas less frequently to reduce the load on the core.
- Order time window: sets the time period in seconds within which a request is valid for processing by the exchange. If for any reason the request is sent with a delay or the exchange takes a long time to process it and does not fit within the specified time frame, the exchange itself will cancel the request.
Market Type: allows the user to select the desired market type for trading: Spot/Futures/Delivery.
Quote asset: determines the quoted asset (For example usdt or btc). If you want to trade the entire market to Tether currency, specify usdt and press Enter.
White list: currency pairs of the «white list». If you fill this field, you should leave the item «Combined by Quoted Pair» empty! Suppose you want to trade only two pairs BTCUSDT and ETHUSDT, then specify them in this field separated by commas. Trading on other pairs will not be performed. Format — btcusdt, ethusdt, etc.. Followed by Enter key on the keyboard
Black List: currency pairs of the «black list». Let’s assume that in the field «Quote Assets» you specified the quoted asset usdt, but you do not want to trade on currency pairs BTCUSDT and ETHUSDT, then specify them separated by commas in the Blacklist field. Format — btcusdt, ethusdt, etc. Followed by Enter key on the keyboard
Orders limitations: Exchange Quantitative Rules (Binance only) includes protection against banning under the quantitative rules category. Read more on the Binance website: https://www.binance.com/ru/support/faq/4f462ebe6ff445d4a170be7d9e897272.
Active markets filter
Set a clear limit on the number of markets for the algorithm. It helps to correctly calculate the resources used for an algorithm that has more markets passing through the global filters than necessary. Set the principles for sorting the list of markets to select from a larger number of markets. The result of this Filter and the sorting principle will be a limited list from which markets will be pushed out and added over time, and the algorithm will start or stop accordingly. The List sorting frequency parameter allows the user to set the time in seconds for the list to be updated by pairs based on global filters, which allows a pair to enter or leave the list, as well as the sorting order (ascending or descending). The Ignore First parameter allows users to start placing orders in the sorted list from any position (if 0 is left, it will start from the first position of the list). Example: In global filters the quota market USDT is specified, the list of 100+ markets is obtained, you want to trade only on the 10 most volatile ones for the last hour, then «Max active markets» = 10 and the sorting principle «1h descending» is specified.
- Filter 1,2,3-…: set of filters (you can add any number of filters via the «Add filter» button). Currently you can filter by absolute deltas or relative deltas from 5s to 24h and by per 24 hours Quote asset volume (24h QAV).
- Max. active markets: it isrequired to specify the maximum number of markets in the filtering list. For example, if you will filter by delta in descending order, and you specify 10 markets, then there will be conditionally TOP 10 with the highest delta.
- Ignore first: thenumber of markets that are the first in the generated list to be ignored. For example, when forming by volume, you do not need BTC, which often tops the list by this criterion.
- List sorting frequency: specify the list update frequency in seconds. Note: this parameter will sort the list that is formed by all trading pairs that have passed the global filters. How often the global filters are applied to the pairs you specified for use by the algorithm is determined by the «Filter check frequency» in the General section.
Price step filter
- Range: (from and to, in absolute value) sets the interval for the algorithm for the price step as a percentage of the current price (if the price step is less or more than this percentage, the order will not be placed).
It is used to cut off «square» coins from trading, on which the price step can reach up to several percent.
Mark price filter
- Range: sets the algorithm the interval of deviation of the mark price from the current market price (in percent) within which the order will be placed. IMPORTANT: you can set both negative and positive values. Orders will be placed as long as mark price is within the specified range.
Funding rate filter (funding)
Specify the range of the funding rate in which the algorithm will work.
Example (screenshot above): the algorithm will place orders only on coins that have a funding rate between -0.5% and 0.5%
Funding filter
Specify the range of the funding rate and the time BEFORE the funding rate payment at which the algorithm will start or pause and the time AFTER the funding rate payment at which the algorithm will start or pause again, depending on the «Action» parameter
Example (screenshot above): trading will be stopped one minute before the funding rate is paid only on those coins whose funding is in the range of -100% to -1% and will start again one minute after the rate is paid.
(Read more about the financing rate: https://www.youtube.com/watch?v=4vzkgi_7knA )
Symbol Delta Filter
Enables/disables delta filters for each coin for which the algorithm is configured to place orders. This option allows you to add one or more filters, which can differ by time interval and delta range. The delta range can be relative (if values are entered with a «-» sign) or absolute (values are entered as positive integers) and must be entered from smaller (left field) to larger (right field).
Use absolute or relative delta: deltas must be specified in the «range» field. Absolute delta can only have positive values. When using Relative delta, the values can be negative, e.g. from -1.5% to -0.5%
- Time : timeinterval of the delta, currency pairs (which will be selected given the quoted currency, «white list», «black list» data). You can choose one of the proposed options. In the future, the limits of the minimum and maximum delta of markets will be based on this interval.
- Range: Specify the range of the minimum and maximum delta. From N1% to N2%. If the delta of the asset is outside the selected range, the algorithm will not work and orders will not be placed. For example, if you have chosen a time period of 5 minutes and specified a range from 0.5% to 2%, the algorithm will work only on those pairs where the price has changed not more than 2% and not less than 0.5% in 5 minutes — price direction is not important. The values are positive only. You can view the deltas in the client — tab «Market Live».
- Cancel if out of range: if checked, orders in this algorithm will be canceled when deltas leave the selected range.
Note: you can add multiple filters with deltas of different types.
Symbol Quote Asset Value (QAV) filter
- Range: specify the range of minimum and maximum volume for 24 hours, currency pairs (which will be selected taking into account the data of the quoted currency, «white list», «black list»). If the volume of the selected currency pair is less than the set value in the first field or higher than the value in the second field, the algorithm will not work and orders will not be placed. You can view the volumes in the client — «Market Watch» tab.
Other Symbols Delta Filters
- Trading pair: a trading pair relative to the deltas of which the filter will be used. For example, BTCUSDT.
- Time: thetime interval of the BTC currency delta. You can choose one of the proposed options. In the future, the minimum and maximum BTC delta limits will be based on this interval.
- Range: Specify the range of minimum and maximum BTC delta. From N1% to N2%. If the delta of BTC is outside the selected range, the algorithm will not work and orders will not be placed on the selected pairs. The values are positive only. You can view BTC deltas in the client — «Market Live» tab.
- Cancel if out of range: if checked, orders in this algorithm will be canceled when deltas move out of the selected range.
Performance Filter: Allows the user to customize the performance of the current algorithm based on the trading results of all running algorithms, a specific trading pair, the current algorithm or any other algorithm.
For more details, please refer to the instructions
Algorithm parameters:
- Quote asset volume — select the volume of interest in USDT, the aggregate amount level which the algorithm will search for in the order book to place an order
- Min/Max distance — sets the range for searching for the «Quoted Asset Volume». If the searched volume is outside the set range, the order will be placed at the Min/Max distance from the current price
Example:
- Volume buffer — sets the range within which the order will not be moved, this value is divided into two by half in each direction from the order
- Min/Max Buffer — sets the range for the buffer by volume, when leaving which the buffer boundaries will be set to Min/Max buffer
Example:
- Stop if out of range — if checked, the algorithm checks whether the desired volume is within the Min/Max distance range and then places an order within the specified Min/Max distance range, if the desired volume leaves the specified range the order will be canceled. If the checkbox is unchecked, the order will not be canceled when the specified range is exceeded, but will be placed at the level specified in the Min/Max distance range
- Use high frequency order book — the checkboxaffects the frequency of receiving data via websocket. If the checkbox is turned off, the frequency of receiving updates is once every 1 sec for the Spot market and once every 0.5 sec for the Futures market, if it is turned on, it is once every 0.1 sec, which multiplies the frequency of calls to the exchange and the amount of received data, which must be processed in the order of receipt. When using high frequency order book updates on a large number of trading pairs, data on the current state of the stack in the terminal and its current state on the exchange may be unsynchronized, as well as API limits set by the exchange will be exhausted faster
- Follow Price Delay — sets the delay in seconds until the expiration of which the order will not follow the price.
- Replace Delay — sets the delay in seconds until the expiration of which the order will not move AWAY from the price
Order parameters
- Side: allows the user to select which type of order to place to the algorithm Buy (Long) or Sell (Short).
- Client Order type: sets the type of order to be placed by the algorithm. You can read more about the order type in the documentation of the Exchange itself.
- Stop Price: sets a certain distance from the price level at which the Stop Limit Order is placed to the price that triggers the Stop Limit Order.
- Order size: ordervalue set in USDT. This value takes into account the leverage of users. For example, for trading on the BTCUSDT pair, the minimum order is 0.001 BTC, at the price of BTC 45000$ will be equal to 45$. It is necessary to specify from 45, this value will already be leveraged, i.e. with a leverage of x125 — your funds will be involved 0.36$. Try to specify a little higher than the minimum value for correct execution of the order.
- Iceberg: when activated, hides the true order size by buying/selling with smaller and equal volumes. Allows the user to hide large volume orders in the order book. Enabled separately for new orders and Take Profit orders.
- Auto join: the filled orders of the algorithms will be joined together, thus shifting the average entry point. After the orders are joined, the distance to the TP/RL will be updated relative to the average price.
- Join Key: Used to join positions of different algorithms. If enabled, all positions with the same key will be joined.
Note: In order to combine orders exclusively within one algorithm, it is necessary to check the Auto join checkbox and set the join key.
Take profit
- Type:
Classic — places a Take Profit order at a specified percentage of the opening price of the trade
Historical — Take Profit will be set to the percentage set by the user of the distance the price has traveled over the last two seconds including the shot. This value should be taken as 100% and the Take Profit percentage should be set from it.
Depth — Take Profit will be set as a percentage of the shot value, just like in Historical TP the shot depth is taken as 100% and the Take Profit percentage is set from it.
- Percentage: sets the distance from the price (at which the order was executed) to Take Profit as a percentage.
- Order Type: sets the type of Take Profit order to be placed by the algorithm. You can read more about the order type in the documentation of the Exchange itself.
Auto price down
Specify the periodicity (Timer) of take profit price lowering, the step, in percentage of the current price, and the threshold, limit, where the auto-reduction will stop. This functionality will help close a trade with a smaller profit where it was not possible to take the expected profit.
- Timer: sets the delay in seconds until the Take Profit starts to decrease to the current price (the same value will be used for both the first step and all subsequent steps).
- Step: sets the percentage value of the Take Profit approach step to the initial price.
- Limit: sets the lowest limit, as a percentage of the initial order, to which Take Profit will drop and stop.
Stop loss
- Percentage: sets the distance from the price (at which the order was executed) to the Stop Loss as a percentage.
- Spread: allows the user to set a distance in percentage of the current price that will determine where the Stop Loss will be placed once the price crosses the stop trigger.
- Delay: The delay of placing a Stop Loss in seconds, after the order is executed.
- Order type: sets the type of Stop Loss order to be placed by the algorithm. You can read more about the order type in the documentation of the Exchange itself.
Trailing stop
- Spread: value in percent of price movement, in the profitable direction from the initial price, after traveling which, the Stop Loss will be placed at the distance specified in the parameter «Stop Loss -> Percentage», calculated from the new current price.
Second Stop Loss
Enables/disables a special Stop Loss function that cancels the original Stop Loss and places a new one after the price moves in a profitable direction relative to the side of the position by a certain amount. Thus, if the function is enabled, the second Stop Loss will cancel the initial Stop Loss and, once price reaches the distance of the second SL trigger, place a new Stop Loss at a distance from this level equal to the distance of the second SL. For example: if the trigger of the second SL is 0.5% and the percentage of the distance of the second SL is 0.2%, then once price reaches the second SL’s trigger of 0.5%, the second Stop Loss will be placed at a distance of 0.3% (0.5% — 0.2%). The second SL can also be assigned a trailing function that will allow it to track the current price at a distance equal to the trailing spread (similar to the trailing function of the initial stop loss).
- Trigger distance: a value in percent of price movement, when reached, the trigger will work and set a new Stop Loss (by the specified percentage of the «Second Stop Distance» parameter) to replace the first one. This parameter can be used to move the Stop Loss to breakeven, when reaching half of the distance to Take Profit.
- Percentage: thedistance in percentage from the price at the moment of triggering the «Second Stop Trigger» to the new Stop Loss, replacing the old one.
- Second Stop Trailing: enabling the option — Trailing SL (following the price) for the second Stop Loss.
- Spread: value in percent of price movement, in the profitable direction from the initial price, after traveling which, the Stop Loss will be placed at the distance specified in the parameter «Second Stop Loss -> Percentage», calculated from the new current price.