RealTest User Guide
RealTest User Guide

 

 

Navigation: RealTest Script Language > Syntax Element Details >

EhlersBP

 

 

 

 

Category

Multi-Bar Functions

Description

Bandpass filter as described by John Ehlers.

Syntax

EhlersBP(expr, count, bandwidth)

Parameters

expr - data series formula

count - lookback period

bandwidth - passband width

Notes

Isolates a specific frequency band centered on the given period, with the bandwidth parameter controlling how narrow the passband is (smaller values = narrower band).

The count and bandwidth arguments may be formulas rather than constants. Non-constant arguments are re-evaluated on every bar: the filter coefficients are recomputed from that bar’s values and the recursion continues from the stored prior outputs, the same adaptive model used by AEMA. The formulas may even reference the enclosing Data item’s own prior values at offsets of 1 or more, allowing self-tuning filters.

On bars where the period or bandwidth evaluates to n/a, the output is n/a (not 0), and the recursion re-seeds when both are valid again. The effective period is internally clamped to a minimum of 2 bars.

This function supports one-pass calculation when used in the Data Section.

Example

EhlersBP(Close, 20, 0.3)

Isolates the frequency band centered on a 20-bar cycle.

Useful for extracting a specific cyclical component from price data while rejecting both trend and noise outside that band.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC