Hybrid Convolution Filter


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 filter since the impulse response is finite.

The Indicator

In red the hybrid swma and in blue the classic swma of both the same period. The difference can be seen.

The switch between the input price and the past values of the previous convolution values is made by using exponential averaging, the window function is the same as f(x) in the code.

Any filter can use this architecture, the indicator is built around the custom fir template, see (1)


I presented a FIR filter using recursion in its calculation, the integration is made with respect to the proposed template, therefore any user can simply modify f(x) to have different filter without the need to make any change. However curious users might want to change the window function of the exponential averager, in order to do so change sgn = f(i/length) in line 11 for sgn = fun(i/length) where fun is your custom function, make sure to add it at the start of the script where all the other functions declarations are.

Thanks for reading !


從喜愛的腳本中移除 添加到喜愛的腳本
You can check my indicator papers here :
Could you modify this to where you could have up to 8-16 convolution filter lines? It would be nice to use it for a fibonacci moving avg filter type of fan.
What a great enhanced improvment for the FIR filter; thank you Alex =D
+1 回覆
Great, as usual! i would love to see what you come up with if you incorporate volume, for instance, VWAP is used by institutional investors and volume profile is a great way to see where institutions are accumulating,
+1 回覆
DannyBaker DannyBaker
@DannyBaker, sometimes following the market makers/institutions is the best thing we can do
+1 回覆
alexgrover DannyBaker
@DannyBaker, Thanks for the support :)
classic one Alex - Thanks
+1 回覆
alexgrover idrisbengali
@idrisbengali, Thanks, i really wanted to test this one out :)
Very cool, I really dig the modularity. Thanks dude!
+1 回覆
@wroclai, Glad you like it :) Thanks for always leaving a comment.
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 網站規則 版主 網站 & 經紀商解決方案 小工具 圖表解決方案 幫助中心 功能請求 部落格 & 新聞 常見問題 維基 推特
概述 個人資料設定 賬戶和賬單 TradingView幣 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出