# Range Filter Trading System

**Sample AFL Code - Range Filter Trading System**

Range Filter is a non-ATR-based trend-following strategy. Range Filter is an experimental study designed to filter out minor price action for a clearer view of trends. Here is the Amibroker Trend Following Strategy code based on the Range Filter.\
\
**How Range Filter is Calculated?**\
1\) a smooth average price range is calculated for the basis of the filter and multiplied by a specified amount.\
2\) the filter is calculated by gating price movements that do not exceed the specified range.\
3\) the target ranges are plotted to display the prices that will trigger filter movement.<br>

&#x20;<mark style="color:blue;">Download Sample Code here</mark>

{% file src="/files/pGqvyQHPeRilJ6aFaKep" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.algomojo.com/algomojo/strategies/amibroker/range-filter-trading-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
