Over the years, many FIR filters have been proposed by the Pine community, with the standard way of computing them being `for` loops. The arrival of arrays allows for a new, more efficient way to compute them.
This script provides a template showing how you can compute FIR filters using Pine arrays.
FIR stands for "Finite Impulse Response", and...
FIR filters (finite impulse response) are widely used in technical analysis, there is the simple or arithmetic moving average, the triangular, the weighted, the least squares...etc. A FIR filter is characterized by the fact that its impulse response (the output of a filter using an impulse as input) is finite, this mean that the impulse response...
Who doesn't like smooth things? I'd like a smooth market price for christmas! But i can't get it, instead its so noisy...so you apply a filter to smooth it, such filters are called low-pass filters, they smooth and its great but they have lag, so nobody really use them, but they are pretty to look at.
Its on a childish note that i will introduce...
Today i propose an hybrid filter that use a classical FIR architecture while using recursion. The proposed method aim to reduce the lag generated by fir filters. This particular filter is a sine weighted moving average, but you can change it since the indicator is built with the custom filter template (1). Even if it use recursion it still is a FIR...
Finite Impulse Response (FIR) Filter indicator script.
This indicator was originally developed by John F. Ehlers (Stocks & Commodities V. 20:7 (26-31): Zero-Lag Data Smoothers).
NOTE: Ehlers' favorite FIR filter had 1, 2, 3, 3, 2, 1, 0 coefficients.