Bandpass Filters v.02

This is an alternative way to do bandpass filtering. I Still need to update it to support moveable frequency bands. The lowBandpass() is just a 'trick,' as it simply subtracts the highBandpass() from the close data, so it is not really accurate in that it removes the low frequencies, just in a rather less-than-ideal manner.

The "spectrum" of the dataset to filter will always be from 0 to 100, so think of filter boundary as %. So, a boundary of 40% means: 40% of the low-frequencies have been removed from the original data to make the red graph, and 40% of the high-frequencies have been removed from the original data to make the green graph.

This came about after reading the excellent tutorial on signal processing in Pine Script (www.pinecoders.com/techniques/dsp/), as the techniques listed there did not do exactly what I was looking for.

Here is a low-pass graph

Here is a hi-pass graph


TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。