Roofing Filter [DW]

This is an experimental study built on the concept of using roofing filters on price data proposed by John Ehlers .
Roofing filters are a type of bandpass filter conventionally used in HF radio receivers in the first IF stage to limit the frequency spectrum passed on to later stages in the receiver.

The goal in applying roofing filters to a price signal is to simultaneously attenuate high frequency noise and low frequency distortion to pass an oscillating signal with a nearly zero mean for analysis and/or further calculation.

In this study, there are three filter types to choose from:
-> Ehlers Roofing Filter, which passes data through a 2 pole high pass filter, then through a Super Smoother filter.
-> Gaussian Roofing Filter, which passes data through a 2 pole Gaussian high pass filter, then through a 2 pole Gaussian low pass filter.
-> Butterworth Roofing Filter, which passes data through a 2 pole Butterworth high pass filter, then through a 2 pole Butterworth low pass filter.
Each filter type has different amplitude and delay characteristics, so play around with each type and see which response suits your needs best.

There is an option to normalize the scale of the output as well. The normalization process in this script is computed by comparing positive and negative outputs to the filter's moving RMS value.

The resulting oscillator can be fed through numerous conventional indicators including Stochastic Oscillator, RSI , CCI , etc. to generate smoother, less distorted indicators for a clearer view of turning points.
Alternatively, it can also act as an indicator itself, as implied by the corresponding color scheme included in the script.

Although roofing filters are not conventionally used in the analysis of market data, applying such spectral analysis techniques may prove to be quite useful for the design of more efficient indicators and more reliable predictions.
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
This is a clean, lovely and useful implementation. THANK YOU.

There are 2 small bugs in the normalization feature.
1) sum should be sma because you need the average of the squares that is sum/len.
2) you should round (or floor) the hp+lp/2 to make sure you have an integer length

You can correct this by changing line 97 to: rms = sqrt(sma(pow(roof, 2), round((hp_per + lp_per)/2)))

Here is a general rms function for reuse:
rms_f(_signal,_len)=>sqrt(sma( pow(_signal,2),round(_len)))
Thank you once again!
John Ehlers studies I love to use it too; thanks for sharing your stuff at TV =D
+1 رد
great indicator as always mate. i added a histogram and it looks amazing.

+1 رد
@francxisz, That's awesome! Very clever way to utilize the filter. I'm glad to see this indicator is already being put to good use.
+2 رد
Docop1 francxisz
@francxisz, How do you get the histogram ? And you pass from 1 line to 2... as with another one or so .. i don't see how the script was modded to.. ? thanks
pshai Docop1
@Docop1, The second line looks like a signal line, similar to what MACD has. So that's simply a moving average of the indicator. The histogram is the difference between those two.
thank you - big fan of your work, sir :)
+3 رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي برامج تعليمية كيف نعمل مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج