Truncated Bandpass Filter

Author: Optuma Team Last updated: Jun 29, 2023 16:22
Included in Professional Services Included in Enterprise Services

Overview

The performance of some, but not all, indicators can be greatly enhanced by truncation. There are two fundamentally different types of digital filters, FIR and IIR. FIR stands for Finite Impulse Response, which means a fixed window of data is used to calculate a point of the filter output. That window slides across the data, and the output points are connected to provide the indicator. A Simple Moving Average (SMA) is an example of such a filter. RSI and Stochastic are examples of indicators that use this principle. FIR filters and indicators can only be degraded by truncation. IIR stands for Infinite Impulse Response, where the computation of the filter or indicator depends on a previous calculation of that filter. The Exponential Moving Average (EMA), and consequently the MACD and other indicators, are IIR types. Of course, the computation of an IIR filter does not extend to infinity. The filter computation can only start at the beginning of the data being used.

Therein lies the problem. The answer your get from an IIR filter will be different depending on your data length. If the data stream is sufficiently long the answer may be the same for all practical purposes, but it will be different nonetheless. So, initialization is one problem that is resolved by truncating the indicators. The memory of IIR indicators can also impact performance because a major data disturbance can cause the transient response of the indicator to ring like a bell, using that data disturbance in its output long after the event has occurred. This is particularly important because market data is nonstationary.

MASEHLTBF Large

To add the tool to your chart, select the tool from the Ehlers tool group, and left-click on the chart to add the tool. Optuma will then draw the tool in a window below the chart using the default settings.

Scripting Function: EHLTBF()

Actions & Properties

Actions

Actions

Copy Data to Clipboard: Will copy the tool’s values to the clipboard which can then be inserted into a spreadsheet, for example, allowing for further analysis.

Add to Toolbar: Adds the selected tool to your custom toolbar.

Apply Settings to All: When multiple Truncated Bandpass Filter tools have been applied to a chart, page or workbook, this action can be used to apply the settings of the one selected to other instances of the tool. This is a great time saver if an adjustment is made to the tool - such as line colour - as this allows all the other Truncated Bandpass Filter tools in the chart, page or entire workbook to be updated instantly.

Copy Tool: Allows you to copy the selected tool, which can then be pasted onto a different chart window.

Move to Back: If the tool is displaying in front of other tools or indicators clicking this action will move the tool view to the background.

Move to Front: If the tool is displaying behind other tools or indicators on the chart, clicking this action will bring the tool to the forefront.

Restore Default Settings: Click this action if you have adjusted the default settings of the tool, and wish to return to the standard properties originally installed with Optuma.

Save Settings as Default: If you have adjusted any of the tool’s properties (colour, for example) you can save the adjustments as your new default setting. Each time you apply a new Truncated Bandpass Filter to a chart, the tool will display using the new settings.

Delete: Deletes the tool from the chart.

Properties

Properties

Tool Name: Allows you to adjust the name of the tool, as it’s displayed in the Structure Panel.

Period: Adjusts the number of periods used in calculating the tool.

Length: Length is the truncation length - the number of lookback bars to be truncated.

Bandwidth: Bandwidth of the filter coefficient.

Bandpass Plot Style: This option expands to display the following:

  • Plot Style - Allows you to adjust the display style for the tool. There are 8 options available: Line, Dot, Histogram, Step, Shaded, Shaded Step, Bars, Candles.
  • Line Style - When the Plot Style is set to Line, Histogram, Step, or Shaded Step, this property allows you to adjust the type of line displayed. There are 8 options available: Solid, Dots, Dash, Dash Dots, Long Dash, Long Dash Dot, Long Dash Dot Dot, Stippled.
  • Line Width - Allows you to adjust the width of the line for the tool. Moving the slider bar to the right increases the thickness of the line.
  • Colour Scheme - Allows you to choose between the following colour schemes for the tool: Copy Colours from Price Chart, Single Colour, Positive / Negative, Custom.
  • Line Colour - When the Colour Scheme is set to Single Colour, this property allows you to adjust the colour of the line. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Positive - When the Colour Scheme is set to Positive/Negative, this property allows you to adjust the colour of the tool when it is above the Positive / Negative Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Negative - When the Colour Scheme is set to Positive / Negative, this property allows you to adjust the colour of the tool when it is below the Positive / Negative Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Positive / Negative Barrier - When the Colour Scheme is set to Positive / Negative, this property allows you to adjust the barrier value. The default value is 0.00.
  • Custom Colour Scripts - When the Colour Scheme is set to Custom, this property allows you to set the colour of the tool according to your scripts. For more information on this, please click here. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Up / Down Barrier - When the Plot Style is set to Shaded, this property allows you to adjust the barrier value. The default value is 0.00.
  • Fill Up Colour - When the Plot Style is set to Shaded, this property allows you to adjust the fill colour of the tool when it is above the Fill Up / Down Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Down Colour - When the Plot Style is set to Shaded, this property allows you to adjust the fill colour of the tool when it is below the Fill Up / Down Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Transparency - When the Plot Style is set to Shaded, use this slider bar to adjust the transparency of the filled portion of the tool. Moving the slider to the left will increase the transparency.
  • Visible - Un-tick this checkbox to hide the line from the chart.

Truncated Plot Style: This option expands to display the properties as shown for the Bandpass Plot Style.

Equilibrium Line Style: This option expands to display the following:

  • Line Style - When the Plot Style is set to Line, Histogram, Step, or Shaded Step, this property allows you to adjust the type of line displayed. There are 8 options available: Solid, Dots, Dash, Dash Dots, Long Dash, Long Dash Dot, Long Dash Dot Dot, Stippled.
  • Line Width - Allows you to adjust the width of the line for the tool. Moving the slider bar to the right increases the thickness of the line.
  • Line Colour - Allows you to adjust the colour of the line. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Tool Transparency - Use this slider bar to adjust the transparency of the line. Moving the slider to the left will increase the transparency of the line.
  • Visible - Un-tick this checkbox to hide the line from the chart.

Offset: Moves the tool forward or backward in time. The offset is measured in bars, so a value of 2 will push the tool forward 2 bars and -2 will move the tool back 2 bars.

Tool Transparency: Use this slider bar to adjust the transparency of the tool. Moving the slider to the left will increase the transparency of the tool.

Visible: Un-tick this checkbox to hide the tool from the chart.

Show In Price Scale: When selected, the current Truncated Bandpass Filter value will be displayed in the Price Scale.

Discussion