For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filter by MACD

The MACD filter checks the ratio of lines, their position relative to zero, or the change in the chosen line. Which direction is allowed depends on the type of filter.

Add a filter to the task

Open up the task of creating or editing a Binance robot or a Bybit robot. — The Bybit robot In the filter block, select MACD.

Field Active is missing. Set the filter for the pair the task is going to work with.

Set the calculation

  • The TF sets the time frame for the calculation. The initial value is 1 minute.

  • The Type of candles is either normal or Heiken-Ash. By default, ordinary candles are used.

  • Calculation On closing the bar or On crossing (every second). The first uses closed bars, the second takes into account the current unopened bar. In the new form, the mode P is selected (every second).

  • The Type of filter determines the directional rule. The new form has the default option By default; the available options are broken down below.

  • The period of the fast moving average, the period of the slow moving average and the period of the signal moving average take values from 2 to 50.

  • The initial values of the periods 12, 26 and 9 respectively. It's the form values, not the recommended strategy parameters.

When the filter allows action

  • By default: the MACD line above the signal resolves the long, below the short, the equation resolves both directions.

  • Above/Beyond 0: Both lines below zero allow a long; both above zero shorts. If the lines on different sides of zero or one is equal to zero, no direction is allowed.

  • By the rise/fall of the MACD line and By the rise/fall of the signal line: the rise of the chosen line resolves the long, the decrease of the short, the unchanged value of the two directions.

  • By growth/reduction of the histogram: the increasing positive histogram resolves the long; the decreasing negative short. Two sets of zeroes allow for both directions. In other cases, this regime doesn't allow anything.

Determine the meaning of the parameters

The default mode checks the lines now. He doesn't require the intersection to take place at the last bar. When you change the filter type, check the directions again.

The directions rules above are for the deactivated Reverse field? is the initial state of the form. If you turn it on, the permissions for the long and short change places. The conditions of both directions and the same direction will remain the same.

Set the action when you exit the filter

Field When the filter is out refers to the situation when the task stops passing this condition. The new card has the Cancel Cycles option. The form also includes Sell by market and Sell by market with deviation (if indicated).

The filter can also affect a task that is already working: the exit from the condition transmits the selected command. Before you save, check the command's implications for your robot in the Binance or Bybit task description. — Binance tasks — Bybit tasks

Save and verify the task

Save the filter card, then check the rest of the conditions and parameters. Several filters should allow it to move at the same time. The filtering permission itself does not mean that the order has been sent or executed.

If the task mode supports the task without a basic signal, the filters can be involved in its start. So the conditions and the action you choose to take when you exit them should be checked before the robot starts.