---
title: Retracement Filter
description: "  [![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Buy.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Buy.png) [![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell.png)   This filter measures a retracement within an instrument's historical price range. It compares the closing price with percentage levels calculated from the highest and lowest closing prices over your selected period. Use the retracement level as…"
url: "https://portfolioboss.com/documentation/retracement-filter/"
updated: "2026-10-21"
category: "Chapter 7 - Filters & Rules"
---

# Retracement Filter

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Buy.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Buy.png)

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell.png)

 

This filter measures a retracement within an instrument's historical price range. It compares the closing price with percentage levels calculated from the highest and lowest closing prices over your selected period.

Use the retracement level as a condition for entering or exiting a Position. Reaching a level does not establish that the price will rebound, reach a new peak, or produce a profit.

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Example-1_00000.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Example-1_00000.png)

This filter looks at the highest and lowest *closing-prices* of an instrument during the past certain days/months, and uses a specified percentage of the *vertical distance* between that peak and trough to calculate a price level.

Let's say for the past 200 days an instrument's *lowest* price is $25 and the *highest* price is $35, which means a distance of $10 between the trough and peak. Therefore, a percentage of 50% means $5 *from the highest price*, which equals a price of $30.

In this example, the 50% retracement level is $30. You can use that level to define a filter condition; it does not establish that $30 will act as support or resistance.

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Overview_00000.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Overview_00000.png)

 

You can choose different percentage levels, such as 23.6%, 38.2%, 50%, or 66%, to define the condition you want to test.

The examples below use 50% and 66% to illustrate the settings. These are example thresholds, not predictions of a bounce or a trend reversal.

Note that this filter is best used with another filter that confirms you're in a trend (let's say the ["Moving Average Cross Over Filter"](https://portfolioboss.com/documentation/moving-average-cross-over-filter/)).

You can also use a retracement condition in a strategy for a *downtrend*, for example when you're trading [Short Positions](https://portfolioboss.com/documentation/a-strategy-for-short-selling/). For example, a short strategy can use a rally toward the 50% level as an entry condition. The condition alone does not indicate that the price will turn downward.

 

---

 

**1.**  The first parameter defines whether the instrument's *closing-price* must be "Greater than", "Less than", "Between", or "Not between" the percentage line(s). "Greater than" means the instrument's price must be "below" the percentage line, that is, it's actually going cheaper than the percentage line. 

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Percentage-Calculation_00000.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Percentage-Calculation_00000.png)

 

And vice versa with "Less than", i.e. the price must be "above" the percentage line.

Let's say during an *uptrend*, you will enter a Position when the instrument's price drops toward 50%; then set a value of "Greater than" "49%" for this filter. Another example, you will *get out* of a Position if the price drop is "Greater than" "66%".

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-1st-Param.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-1st-Param.png)

Or another example for entering a Short Position: You will borrow (and then sell) the instrument only if it hits the 50% line, which means the instrument's price must *increase* toward that 50% line to meet the example entry condition; so you set this filter to "Less than" "51%".

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-1st-Param-B-000.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-1st-Param-B-000.png)

But note, these "Greater/Less than" values are *not* the most intuitive:

- First, if you set "Greater Than", the price might actually be *far below* the percentage line (thus indicating a trend reversal instead of bouncing back), but still the strategy will enter that Position anyway.
- Second, if you use "Less than", the price may actually be *far above* the percentage line, thus you don't get as much discount as possible but the strategy will enter that position anyway.

To restrict the condition to a specific retracement range, use the "Between" value. Thus, in the above example, you will only enter a Position if the instrument's price falls *between* 40% and 50%. 

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Between-Param.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Between-Param.png)

 

This limits the entry condition to the selected retracement range. It does not rule out a further decline after entry.

With that being said, "Greater/Less than" *may* make more sense if you use this filter as a Sell Filter (exiting positions). So continuing with the above example, after you make sure you buy instruments that don't breach the 50% level, then you make this Stop-Loss:

- if any of these Positions start breaking the 66% level, then get out of that Position. So, set this sell-filter as "Greater than" "66%".

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell-66.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Sell-66.png)

 

---

 

**2.**  The second parameter defines the percentage line between those highest and lowest prices of the past certain days. 

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-2nd-Param.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-2nd-Param.png)

 

Remember that this percentage line is always calculated from the highest price, that is, 0% is at the highest price and 100% is at the lowest price.

 

---

 

**3.**  The third parameter defines how many days (or months) to look for the highest and lowest prices. 

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-3rd-Param.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-3rd-Param.png)

 

Remember that this is a moving window; for example, a value of 200 days here means the strategy will find the highest and lowest prices *from today* until 200 days ago.

 

---

 

#### Notes:

 

 

- After you applied this filter, some indicators will be overlaid on the [Price Chart](https://portfolioboss.com/documentation/instrument-tab/): one indicator is for the *highest price* of x days/months ago, one indicator is for the *lowest price* of the x days/months ago, and one indicator for the percentage line (or lines, if you use multiple percentage lines with the "Between" value, as explained before).

 

[![](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Indicators.png)](https://portfolioboss.com/wp-content/uploads/2019/10/Retracement-Filter-Indicators.png)

 

- You may use this filter with another filter that finds *currently* bearish instruments (instruments that are *currently* going downhill), such as the [Primitive Pattern filter](https://portfolioboss.com/documentation/primitive-pattern-filter/) (closing price 1 day ago is higher than the closing price 0 day ago a.k.a today). That's because this Retracement Filter by itself may buy instruments that are already well underway on the rally, so you don't get the best discounts from the beginning.

 

 

 

 

[**Back to Top**](https://portfolioboss.com/documentation/retracement-filter/#backtotop)

 

 
