> 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-trade-count.md).

# Filter by trade count

<mark style="color:$tint;">This filter is available to Binance. It compares the number of market transactions per pair for selected bars with a given threshold. The condition is both directions.</mark>

### Add a filter to the task

<mark style="color:$tint;">Open up the</mark> [<mark style="color:$tint;">Binance robot</mark>](/en/binance-robot/binance-first-task-and-launch.md) <mark style="color:$tint;">task. In the filter block, select</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**By number of transactions**</mark><mark style="color:$tint;">.</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;">**Calculation**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">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).</mark>
* <mark style="color:$tint;">Period number of bars to sum the number of transactions. The starting value is 60.</mark>
* <mark style="color:$tint;">**The number of transactions**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">is the threshold for the number of market transactions. The new form is 0.</mark>
* <mark style="color:$tint;">**Allow entry if**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">Call of transactions is greater than the given value or Call of transactions is less than the given value. By default, the first condition is selected.</mark>

### When the filter allows action

* <mark style="color:$tint;">The counter refers to the market's trades in a trading pair. It doesn't count your tasks, your robot cycles, or your personal orders.</mark>
* <mark style="color:$tint;">The number of transactions greater than a given amount allows for action at a minimum threshold amount.</mark>

### Determine the meaning of the parameters

<mark style="color:$tint;">The period is measured in the bars of the selected timeframe. In the current bar, his counter keeps changing until it closes.</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 results of the command for your robot in the Binance task description. —</mark> [<mark style="color:$tint;">Binance tasks</mark>](/en/binance-robot/binance-robot-tasks-and-active-trades.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>
