> 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/previous-impulse-filter.md).

# Previous impulse filter

<mark style="color:$tint;">The filter is looking for a price increase or decrease in a given size in recent history. You can allow the action if there's an impulse or not.</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 Past pulse.</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 time of calculation (s) is the length of a short window, from 10 to 100 seconds with step 10. The initial value is 100.</mark>
* <mark style="color:$tint;">Analysis time (m) depth of search: 1, 2, 5, 10, 15, 20 or 25 minutes. By default, 15. The time of calculation must be much shorter than the time of analysis.</mark>
* <mark style="color:$tint;">**The deviation**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">of the percentage threshold: 0,5; 1; 1,5; 2; 2,5; 3; 3,5; 4; 4,5; 5; 10; 15 or 20. The same negative values are allowed; zero is not used. The initial value is 3.</mark>
* <mark style="color:$tint;">Both sides are off by default. To turn it on, type a positive deviation.</mark>
* <mark style="color:$tint;">**Allow entry if**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">there was a pulse or no pulse. By default, there was no pulse.</mark>

### When the filter allows action

* <mark style="color:$tint;">When the field is off, both sides of the positive deviation check for growth, negative decrease. When turned on, the motion in either direction is checked for a given positive threshold.</mark>
* <mark style="color:$tint;">The calculation uses the closing prices of the second bars. In each short window, the increase is measured from the minimum price to the last, the decrease from the maximum to the last. The search will scan through these windows within analysis time.</mark>
* <mark style="color:$tint;">The threshold, including equality, is considered an impulse. There was an impulse that resolves both directions when it was found; there was no impulse when there was no appropriate impulse in the analysis window.</mark>

### Determine the meaning of the parameters

<mark style="color:$tint;">The time of calculation and time of analysis are set by the data windows, not the delay in sending the order. You need a history to make a calculation. The lack of data should not be taken as a confirmed lack of momentum.</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>
