duncanstroud

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 автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?

Связанные идеи