> For the complete documentation index, see [llms.txt](https://docs.itradingbot.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itradingbot.net/en/signals-and-strategy-conditions/filters/filter-by-moving-average.md).

# Filter by moving average

<mark style="color:$tint;">The filter P. s. median allows direction by price position relative to the median. In normal mode, a lower-middle allowed long, higher than shorts; the field Revers? changes sides.</mark>

### Add a filter to the task

<mark style="color:$tint;">Open up the task of creating or editing a</mark> [<mark style="color:$tint;">Binance robot</mark>](/en/binance-robot/binance-first-task-and-launch.md) <mark style="color:$tint;">or a Bybit robot. —</mark> [<mark style="color:$tint;">The Bybit robot</mark>](/en/bybit-robot/bybit-first-task-and-launch.md) <mark style="color:$tint;">In the filter block, select the middle of the second.</mark>

<mark style="color:$tint;">Field Active is missing. Set the filter for the pair the task is going to work with.</mark>

### Set the calculation

* <mark style="color:$tint;">**The TF**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">sets the time frame for the calculation. The initial value is 1 minute.</mark>
* <mark style="color:$tint;">The</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**Type of candle**</mark><mark style="color:$tint;">s is either normal or Heiken-Ash. By default, ordinary candles are used.</mark>
* <mark style="color:$tint;">Type SMA, EMA, Wilders Moving Average, VWMA or Sr. line MRC (FOMO). The new form is SMA.</mark>
* <mark style="color:$tint;">Period from 5 to 200 bars, by default 100. For the mean line MRC (FOMO), you need the value 200.</mark>
* <mark style="color:$tint;">**Count by**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">the last price or the entire bar range. By default Last price</mark>

### When the filter allows action

* <mark style="color:$tint;">Last price: price below average allows long, price at average or above shorts.</mark>
* <mark style="color:$tint;">The entire bar range: the bar is completely below the middle, allowing a long, completely above the shorts. If the bar range is in or across the middle, no direction is allowed.</mark>
* <mark style="color:$tint;">It's a current status check on the line. No new crossing is required to meet the conditions.</mark>

### Determine the meaning of the parameters

<mark style="color:$tint;">SMA, EMA, and Wilders Moving Average differ in how they smooth the price; VWMA takes the volume into account. The MRC (FOMO) variant uses the middle line of its channel. After the change of type, check the period and the result on the chart.</mark>

<mark style="color:$tint;">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.</mark>

### Set the action when you exit the filter

<mark style="color:$tint;">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).</mark>

<mark style="color:$tint;">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. —</mark> [<mark style="color:$tint;">Binance tasks</mark>](/en/binance-robot/binance-robot-tasks-and-active-trades.md) <mark style="color:$tint;">—</mark> [<mark style="color:$tint;">Bybit tasks</mark>](/en/bybit-robot/bybit-robot-tasks.md)

### Save and verify the task

<mark style="color:$tint;">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.</mark>

<mark style="color:$tint;">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.</mark>
