chrism665

Band-Pass Filter

Just a clean script that can be applied on top of other indicators/sources or you can take the function out of the source and use it in other scripts.

The idea for this was taken from https://www.pinecoders.com/techniques/dsp/#fir-band-pass-filters-design except I am utilizing an EMA instead of SMA. Simply put, we are combining a low-pass filter (moving average) with a high-pass filter (smoothed difference between the source and moving average). The result is a filter/moving average that provides a great combination of minimizing noise while still reacting strongly to price and trend changes.

I like to use this filter in place of other MAs in Pine Scripts to smooth my data. So instead of doing something like sma(stochastic,5) I can easily plug in bp(stochastic,5). It works just fine for your primary moving averages against price as well.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?