everget

Adaptive Laguerre Filter

Adaptive Laguerre Filter indicator script.

The Adaptive Laguerre Filter was originally developed and described by John Ehlers in his paper `Time Warp – Without Space Travel`.

Thanks to @apozdnyakov for the sorting solution.
版本注释: Correct sorting
版本注释: Refactored
版本注释: Refactored
版本注释:
  • Add coloring
版本注释:
  • Added an alert on color change
  • Refactored
从常用脚本中删除 添加到常用脚本
A list of Free indicators:
https://bit.ly/2S7EPuN

A list of Paid indicators:
https://bit.ly/33MA81f

Earn $30:
https://www.tradingview.com/gopro/?share_your_love=everget

Toss a coin to your witcher:
PayPal: https://www.paypal.me/alexeverget

评论

@everget Hey mate! any way to make an alert trigger when the line changes color? Cheers
+1 回复
everget novak.aleksey
@novak.aleksey, Hi. I did it 1 month ago. Sorry for the late response.
回复
@everget @brobear
Quite new to trading and don't know coding, but did you think of adding a kind of BB (standard deviation) to this wonderful line? Think it would show reversals quite nicely.
Thank you!
+1 回复
Nice work! Thanks for sharing :)

After going through the code, I convinced myself of some changes... Can you verify?

1) Line 16: replace "length" with "medianLength"
2) Line 13: replace "i" with "(i-1)"
...if medianLength = 5, then ceil(medianLength/2) = 3. If line 13 iterates from 0 to 3, that's 4 iterations. Thus grabbing the 4th minimum value, not the 3rd (median of 5).


Here's my rendition of the adaptive part of the Laguerre filter:

length = 20
medianLength = 5
alpha = na
alf = na

error = abs(src - nz(alf))
range = highest(error, length) - lowest(error, length)
perc = range != 0 ? (error - lowest(error, length))/range : nz(alpha)
alpha := percentile_nearest_rank(perc, medianLength, 50.0) // Get value in the set, where 50% of all values are <= this value
//alpha := percentile_linear_interpolation(perc, medianLength, 50.0) // A variation on Ehler's definition

// ... continue with Laguerre filter

----------------------------------

Ironically, I like the behavior of your code, where the 4th value (instead of 3rd) is returned for alpha. This makes the filter more responsive, while still mitigating noise. In my code, if I set the percentile to 75.0 (instead of 50.0), I get the same results as your code.

Cheers
+1 回复
everget brobear
@brobear, Hi, thanks for your comments. I agree with you)
+1 回复
levith brobear
@brobear, @brobear, 1) Line 16: replace "length" with "medianLength"
2) Line 13: replace "i" with "(i-1)"
...if medianLength = 5, then ceil(medianLength/2) = 3. If line 13 iterates from 0 to 3, that's 4 iterations. Thus grabbing the 4th minimum value, not the 3rd (median of 5).
I can't find the corresponding code,can you post a complete script? thank you!
回复
everget levith
@levith, look at the changelog - there were many updates. The current version is correct
回复
levith everget
@everget, 0!thank you!
回复
Thanks for the code! Works great combined with added volatility bands to the ALF.
回复
WagnerOG ecletv
@ecletv, could you share a link to the volatility script you are using? Thanks.
回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 在线聊天 退出