2. Averages/Averages group

The general concept: the idea is to create an algorithm that detects a short-term trend change that goes against the long-term trend, allowing the trader to benefit from a short period of time when the market «predictably» undergoes a correction.

Mechanism of action: by selecting a long period and a short period, the algorithm technically compares the two average values.

  • For intervals greater than 1 minute: ((minimum + maximum value of the corresponding candles) / 2.
  • For intervals less than 1 minute: average price of all intervals of 0.5 seconds / number of intervals in seconds.

From this you set the «Relative Delta between intervals«, which is the distance between the values of the average price, long (long period) and short (short period) time intervals. The trigger distance can take both positive and negative values. If you are looking for a short period average price that is lower than the long period average, you must set the trigger distance to a negative value and vice versa. Once this rule is set, you can decide at what distance from the current price the new order should be placed (Buy or Sell order of choice). This is achieved by the «Distance to Place Order» value, which can also be either positive or negative. 

Another set of parameters specific to this algorithm are the «Multi-Order» parameters, the grid mode. You can turn this mode on or off as you choose. It allows the algorithm to place multiple orders at a certain distance from each other or from the initial price level (if order aggregation mode is enabled), and there is also an option to increase each subsequent order. If automatic TP/SL aggregation for several orders is enabled, the algorithm will automatically join the existing TP/SL when the parameter «Join on first fill» is enabled, or after the expiration of the «Cancel delay» period. This mode will also cancel orders that have not been executed. «Cancel delay» specifies to you how long it will take for the algorithm to start scanning the market again for the algorithm’s conditions to be met.

To add a new algorithm, click the Add New button on the Algorithms tab. The following pop-up window will appear:

The user has a choice between the AVERAGES algorithm and the AVERAGES GROUP. The first one runs the algorithm on one trading pair, the second one runs several trading pairs or the whole market.

Consider the AVERAGES GROUP:

General

Name the Algorithm. For optimal functioning, enable auto-restart so the Algorithm would restart after a set Delay follwoing execution, until manually stopped. Please note that it is better to set the restart delay equal to or larger than the long period to avoid repetitive signals.

  • Info: Specify the name of your algorithm so that you can easily identify it in the full list of algorithms. You can specify parameters in the name for convenience, for example — «1min/1sec-0.4/0.3-long».
  • Auto start: the on/off switch allows the user to choose whether the algorithm will start automatically after the kernel starts.
  • Open graph on trigger: if this option is enabled, the chart of the pair on which the algorithm was triggered will automatically open.
  • Auto restart: allows you to allow or disallow the automatic launch of the logic algorithm, if an order has been previously placed.
  • Restart delay: delay of the algorithm from triggering again. In seconds.
  • Do not trigger if active: if the parameter is enabled and there is an open trade of this algorithm on a currency pair, new orders will not be placed until the open order is closed. This also applies to the grid of orders. After the capture of the first order in the grid, the remaining orders will remain and wait for execution (if a long delay is set or is disabled altogether), but there will be no new triggering of the grid of orders.
  • Max active markets: allows the user to limit the number of active pairs for the algorithm. Suppose the algorithm does not open trades on more than 4 currency pairs. When you have 4 pairs in your positions, the algorithm will wait for the closing of one of the positions, so as to continue its work.
  • Max orders: allows you to limit the total number of simultaneous orders for all markets.
  • Emulation: if checked, the algorithm operates in «emulation» mode, without placing orders on the exchange. (In this mode, the reports do not take into account the commission, for the analysis you need to calculate yourself)

Market filters

Chose the Market type (Futures/Spot/Margin) and the trading pair or a list of pairs, separated by comma, for the algorithm to trade on if the market fulfils the remaining conditions. The markets can be put in as a group traded against a Quoted asset (e.g. USDT, BTC, ETH), as a separate Whitelist (e.g. BTCUSDT, BNBETH); you can also exclude a group of Markets as a Blacklist (e.g. XRPPAX, BTCDAI) from the above mentioned groups.

  • Exchange type: allows the user to select the exchange where the trading will take place.
  • Market Type: allows the user to select the desired market type for trading: Spot/Margin/Futures/Quota.
  • Quote assets: quoted asset (e.g. usdt or btc). If you want to trade the whole market to Tether currency, specify usdt.
  • Whitelist: The «white list» currency pairs. If you fill this field, it is necessary to leave blank the item «Quote assets«! Suppose you want to trade only two pairs BTCUSDT and ETHUSDT, specify them in this field separated by commas. Other pairs will not be traded. The format is btcusdt, ethusdt, etc.
  • Blacklist: «blacklisted» currency pairs. Suppose you specified the quoted asset usdt in the «Quoted Pair», but do not want to trade on currency pairs BTCUSDT and ETHUSDT, specify them separated by comma. The format is btcusdt, ethusdt, etc.
  • Delta check frequency: the time, in seconds, how often the algorithm polls the values of current deltas in the market. For «slow» algorithms, it is desirable to interrogate deltas less frequently in order to reduce the load on the kernel.
  • Use quantitative rules: (For Binance only) includes protection from being banned under the category of quantitative rules. Read more on the Binance official website: https://www.binance.com/ru/support/faq/4f462ebe6ff445d4a170be7d9e897272

Use price step filter

  • Range: (from and to, in absolute value) sets the algorithm interval 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).

Mark price filter

  • Range: sets the algorithm the interval of deviation of the marking price from the current market price (in percent) within which the order will be placed. IMPORTANT: it accepts RELATIVE values! That is, you can set both negative and positive values. Orders will be placed as long as the mark price is within the specified range.

Note: only works on futures and quarterly futures.

Coin delta filter

Enables / Disables delta filters for each coin that the algorithm is set up to place orders on. This option allows you to add one or more filters that can differ by time frame and delta range. The delta range can either be relative (if values are introduced with a “-”) or absolute (values introduced as positive integers) and should be introduced from smaller (left field) to larger (right field).

  • Timeframe: the time interval of the delta, currency pairs (which will be selected, given the data of the quoted currency, «white list», «black list»). You can choose one of the options — 1, 3, 5, 15, 30 or 60 minutes. In the future, the framework of the minimum and maximum delta of currencies, 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 the orders will not be placed. For example, if you have selected a time frame of 5 minutes, and you specify a range of 0.5% to 2%, then the algorithm will trigger only on those pairs, on which the price has changed within 5 minutes, at most 2% and at least 0.5% — the price direction is not important. The values are only positive. You can see the deltas in the client — the «Market Live» tab.
  • Use relative delta: If checked, you must specify relative deltas in the «range» field. If negative, then with a minus sign (for example -1.4), if positive, you don’t need to specify the sign.
  • Cancel if out of range: If the checkbox is checked, then when deltas leave the selected range, the orders in this algorithm will be canceled.

Coin qav24 filter

A market filter based on the Daily trading Volume. The values are given in terms of Quote Assets (e.g. for BTCUSDT, BNBUSDT markets, the volumes are given in USDT). Set a range to specify your desired trading conditions.

  • Range: specify the range of minimum and maximum volume for 24 hours, of currency pairs (which will be selected considering the data of the quoted currency, «white list», «black list»). In case the volume of the chosen currency pair will be lower than the value set in the first field or higher than the value in the second field, the algorithm will not work and the orders will not be placed. You can see the volumes in the client — the «Market Live» tab.

Delta filters

Enables / Disables delta filters for a specific coin that the algorithm will check to determine whether or not to place orders on the trading pairs that the algorithm is set to run on. This option allows you to add one or more Coins that can be attributed a different time frame and delta range to be checked. The delta range can either be relative (if values are introduced with a “-”) or absolute (values introduced as positive integers) and should be introduced from smaller (left field) to larger (right field).

  • Symbol: The trading pair in relation to the delta of which the filter will be activated. For example BTCUSDT.
  • Timeframe: the time interval of the BTC currency delta. You can choose from 1, 3, 5, 15, 30 or 60 minutes. In the future, the framework of the minimum and maximum delta of BTC will be based on this interval.
  • Range: Specify the range of the minimum and maximum delta of BTC. From N1% to N2%. If BTC’s delta is outside the selected range, the algorithm will not work and orders will not be placed on the selected pairs. The values are only positive. You can see the BTC deltas in the client — «Market Live» tab.
  • Use relative delta: if checked, then relative deltas must be specified in the «range» field. If negative, then with a minus sign (for example -1.4), if positive, you don’t need to specify the sign.
  • Cancel if out of range: If the checkbox is checked, then when deltas leave the selected range, the orders in this algorithm will be canceled.

Algorithm parameters

Set the Long and Short time frame that will be used to count the average price and compare them between the two intervals. If the price of the Short interval will move up in relationship to the average price of the Long interval an increase in price has been detected and vice-versa. The relative delta between the two time frames (Triger Distance) should have a negative (-) value if a decrease in price is to be detected. The Order Price distance (where the order should be placed) determines whether the Order is to be placed at the current price or at a small distance from the price in expectation for a trend continuation.

  • Long period: defines a long period of time (in seconds) to be used for the algorithm.
  • Short period: defines the short period of time (in seconds) to be used for the algorithm.
  • Trigger distance: specifies the value (in percent) of the difference between the long and short period that will lead to the placement of the order. This may be either a positive or negative value.
  • Order price distance: sets the distance from the current price (in percent) at the moment of algorithm’s triggering to the initial order to be placed by the algorithm. Can be either a positive or negative value.

Order details

Chose the order direction (Buy or Sell / Short or Long) and the order size in USDT. Set the delay after which the Order will be removed.

  • Side: allows the user to select which type of order to place to the Buy (Long) or Sell (Short) algorithm.
  • Client order type: sets the type of order, which will be placed by the algorithm. You can read more about the order type in the documentation of the Exchange.
  • Stop price: sets a certain distance from the price level at which the stop-limit order is placed to the price which triggers the stop-limit order.
  • Order size: The value of the order set in USDT. This value takes into account the user’s leverage. For example, to trade on the BTCUSDT pair, the minimum order size is 0.001 BTC, at a BTC price of $45,000, it will be $45. It is necessary to specify from 45, this value will already be with a leverage, i.e. at a leverage of x125 — your means will be involved 0,36$. Try to specify a little above the minimum value for the correct execution of the order.
  • Max position size: Maximum volume which an order can gain by averaging, or the total volume of separately executed orders on one pair for this algorithm.

Use cancel delay

Enables/Disables a specified Cancel Delay that will cancel orders placed by the Algorithm after passing of set seconds. The «do not cancel if executed» parameter, when enabled, will cancel the Cancel Delay (orders will not have an expiration time), IF one of the orders from the placed grid will get executed. The «cancel on first deal» parameter will cancel all unexecuted orders placed by the algorithm after the first opened position (from an order placed by the algo) was closed.

  • Cancel delay: delay until the cancellation of an unexecuted order or several orders placed by the algorithm.
  • Do not cancel if executed: disables the cancellation of the order grid when the first order is executed.
  • Cancel on first deal: Cancels an order or a grid of orders when the TP/SL is executed.

Multi order

Set the number of additional orders, the distance at which these will be placed between them and the percentage increase in order size relative to either the initial order or the previous order if in the event of a signal you want to place more than 1 Order. The auto-join TP/SL option is used if you want to have a joint position in the event of more orders are filled.

  • Order relative to: you can choose the type of increase each subsequent order in the grid. If you select from the Original order, then with the parameter «Increase each subsequent order by» for example 100, each subsequent order will be increased by 100% of the first order. Example — 100, 200, 300, 400. If you select from the Previous order, each subsequent order will be increased by 100% of the previous order. Example — 100, 200, 400, 800.
  • Count: Sets the number of orders in the grid. Not counting the first order.
  • Distance: Sets the distance in percent between orders in the grid.
  • Size increase: increases the size of each subsequent order in the grid. The value is specified as a percentage.
  • Auto join Tpsl: enables orders to be merged after the «Orders lifetime» delay has expired. The same orders will be merged with existing orders with the same type of algorithm. After merging the orders, the distance to TP/SL will be updated relative to the average price.
  • Join on first fill: enables automatic merging of orders in the grid, immediately after the next order execution, regardless of the «Cancel Delay» parameter.

Take profit

Set a percentage distance from the entry price where the Take Profit order will be placed. Chose the Take Profit order type, we recommend using Limit, which will equate to a real order on the exchange.

  • Percentage: Sets the distance from the price (at which the order was executed) to the Take Profit in percent.
  • 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

Set a periodicity (Timer) for the take profit to be closing in on the price at a certain Step up to a specific Limit where the Auto Price Down will stop. This will help you close a trade at a lower profit if the expected profit could not be achieved.

  • Timer: sets the delay in seconds until Take Profit starts to decrease to the current price (the same value will be used for the first step as well as for all subsequent steps).
  • Step: Sets the percentage value of the step of approximation of Take Profit to the starting price.
  • Limit: Sets the lowest limit in percentage of the initial order, up to which Take Profit will decrease and stop.

Stop loss

Set a distance in percent from the entry price where a Stop Loss order will be placed to close the deal. The Spread is the added distance to the Stop Loss level that will aid in avoiding price slippage. We recommend using a Market order — Virtual order type that will work in conjunction with a real Take Profit. For large order sizes, it might be reasonable to use different order types such as Real, Stop-Limit stop loss orders placed on the Exchange or a Limit order type. The delay can be used when trading on low liquidity markets with a volatile and poorly filled order book to mitigate the risk of executing the stop loss in an empty order book immediately after opening a trade.

  • 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 the distance in percent of the current price that will determine where the Stop Loss will be placed as soon as the price crosses the stop trigger.
  • Delay: sets the delay in placing a Stop Loss in seconds after an order has been executed.
  • Order Type: Sets the type of Stop Loss order to be placed by the algorithm. You can read more about the type of orders in the documentation of the Exchange itself.

Trailing stop

Creates a possibility for the Stop Loss to automatically move in the profitable direction if the current price has also moved in the profitable direction. The Spread in this case is the buffer that will smooth out minor price fluctuations or the price’s Spread, and will move the Stop-Loss only if the price has moved by a distance larger than the Spread. This does not enable the Stop Loss to move away from the price, just trail it.

  • Spread: the value in percent of the price movement, in the opposite direction from the initial price. At which Stop Loss will follow the current price at a specified distance in the «Stop Loss —> Percentage» parameter.

Use second stop loss

Enables / Disables a special Stop Loss feature that moves the Stop Loss to a different price level after the price has moved into the profitable direction relative to the position side. Thus if enabled, the Second Stop Loss will cancel the initial Stop Loss and once the price reaches the Second SL trigger distance, will place a new Stop Loss at a distance from that level equal to the Second SL percentage. E.g.: if the Second SL trigger distance is 0.5% and the Second SL percentage is 0.2%, once the price reaches a distance above the entry level of 0.5%, the second stop loss will be placed at 0.3% (0.5%-0.2%). The Second SL may also be attributed a trailing function that will allow it to trail the current price at a distance equal to the Trailing Spread (similar to the trailing function of the original stop loss).

  • Second sl trigger distance: The value in percentage of price movement at which the trigger will be triggered and set a new Stop Loss (by the set percentage of the Second Stop Distance parameter) in place of the first one. This parameter can be used to move Stop Loss to Breakeven when half of the distance to Take Profit is reached.
  • Second sl percentage: the distance in percent of the price at the moment of the Second Stop trigger to the new Stop Loss, replacing the old one.
  • Second sl trailing: enabling the Trailing SL (follow the price) option for the second Stop Loss.
  • Second sl trailing spread: The value in percent of the price movement, in the opposite direction from the initial price. At which the Stop Loss will follow the current price by the specified distance in the «Stop Loss (Second) —> Percentage» parameter.