TheLark

FREE INDICATOR: Laguerre Moving Average by TheLark

6763 48 981
About:
The Laguerre Average was discovered by John Ehlers.
It's a newer type of averaging that is meant to take out as much of the inherent lag that your typical EMA and SMA's give at the start of a major trend change.
So what you get is an average that turns more quickly at major trend changes, and doesn't get tripped up on the noise (as much).

Usage:
Simply use this in place of EMA or SMA averages, and integrate with your trading style!

By changing the gamma, you change the "length", play with it to see how the average reacts to different inputs, find something you like and run with it!
You can turn off the trend change dots if desired.

Grab the code here: http://pastebin.com/kiMNGrkZ

         ·´¯`·.¸¸.·´¯`· Feel free to follow me to keep up with my latest scripts! ·´¯`·.¸¸.·´¯`·
·´¯`·.¸¸.·´¯`· PLEASE THUMB UP OR STAR IF YOU LIKE THIS INDICATOR! ·´¯`·.¸¸.·´¯`·
                                   I'd like as many people as possible to get it :)
Remove from Favorite Scripts Add to Favorite Scripts
study(title = "TheLark: Laguerre Moving Average", shorttitle="TheLark LMA", overlay=true)

//•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//   
//                                             //
//            LAGUERRE MA BY THELARK           //
//                 ~ 2-11-14 ~                 //
//                                             //
//                     •/•                     //
//                                             //
//    https://www.tradingview.com/u/TheLark    //
//     (please do not remove this heading)     //
//                                             //
//•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//

// The Laguerre Average was discovered by John Ehlers.
// It's a newer type of averaging that is meant to take out as much of the
// inherent lag that your typical EMA and SMA's give at the start of a major trend change.
// So what you get is an average that turns more quickly at major trend changes,
// and doesn't get tripped up on the noise (as much). 


//setups
h = high
l = low
//inputs
Gamma = input(0.77)
sd = input(true, title="Show dots?")
//calc
lag(g) =>
    p = (h + l)/2
    L0 = (1 - g)*p+g*nz(L0[1])
    L1 = -g*L0+nz(L0[1])+g*nz(L1[1])
    L2 = -g*L1+nz(L1[1])+g*nz(L2[1])
    L3 = -g*L2+nz(L2[1])+g*nz(L3[1])
    f = (L0 + 2*L1 + 2*L2 + L3)/6
    f
//plots
lma = lag(Gamma)
col =  lma > lma[1] ? #0094FF : #FF3571
up = lma > lma[1] ? 1 : 0
down = lma < lma[1] ? 1 : 0
plot(lma,linewidth=2,color=col)
plot(sd and cross(up,down) ? lma : na,style=circles, linewidth=4, color=col )
Thank you very much!

Looks like a usefull indicator
+1 Reply
TheLark PRO HermanBrummer
3 years ago
Hopefully! Thanks for the feedback
+1 Reply
TheLark PRO
3 years ago
The script has been updated, you can now turn off the color changing on the line.
+1 Reply
Algokid PRO
3 years ago
Good job ! , Simple and clean. :)
+1 Reply
TheLark PRO Algokid
3 years ago
That right there is the goal, thanks! Also, judging by your name "Algo", I suspect you have some fun things going on behind these scenes ;D
+1 Reply
Algokid PRO TheLark
3 years ago
I'm trying to learn this new language here. Will spent this long weekend here trying to develop some simple indicators.
+1 Reply
TheLark PRO Algokid
3 years ago
It's fairly easy, If you are coming from other programming languages you might need to "dumb down" a little, but I really like it, great for hashing out ideas quickly, but could stand to be a bit more powerful. It's in beta though, so it's great for now :)
+1 Reply
fcha PRO
3 years ago
Is it fit for AAPL?
+1 Reply
TheLark PRO fcha
3 years ago
Yes, it will work with any symbol, you may need to change the gamma to find a fit you really like, but 0.77 seems to do well on a lot of different daily charts. Use it like any other moving average, you can even combine it with multiple instances to get crossovers if you'd like
+1 Reply
fcha PRO TheLark
3 years ago
Nice! Grab the code and change, how to do that? Click the arrow on chart and make it mine.
+1 Reply
TheLark PRO fcha
3 years ago
Yes, you can click the "make it mine" and chages can be made in the settings menu for the indicator (click the little gear next to the indicator name when it's on the chart)

@ChrisMoody has made a nice video that shows how to deal with custom scripts:
http://vimeopro.com/user14689865/tradingviewcom-how-to-videos
+1 Reply
fcha PRO TheLark
3 years ago
Ha, ha I did it! Thank you, I love it. Make me even better trade now. I did change the blue line in to green but the dot did not change. Anything you can do about it.
+1 Reply
TheLark PRO fcha
3 years ago
http://s30.postimg.org/ej54a89ht/Screen_Shot_2014_02_13_at_9_38_24_AM.png change the color in both of these places
+1 Reply
fcha PRO TheLark
3 years ago
The Lark indicator is not show up on indicator section like Chris did it on video, mine is show up on custom indicator section
+1 Reply
TheLark PRO fcha
3 years ago
Custom indicators only show up int he indicator section if you are doing a search, otherwise they always go to the custom indicator section. You can also press the star next to the indicator, and it will put it in your favorites section :)
+1 Reply
fcha PRO TheLark
3 years ago
got it!
+1 Reply
fcha PRO TheLark
3 years ago
Perfect! Thanks so much! Can I import all Chris custom indicator? Chris is a
+1 Reply
TheLark PRO fcha
3 years ago
Yes, you can do it the same way you did it with mine ;)
+1 Reply
fcha PRO TheLark
3 years ago
Thanks! He's a great teacher.
+1 Reply
ChrisMoody PRO fcha
3 years ago
FCHA and Algokid...now that you found TheLark...AKA The Coding Genius...you guys will have no use for me any more
+1 Reply
Algokid PRO ChrisMoody
3 years ago
No no no , I'm counting on both of you to reduce my learning curve. :)
+1 Reply
fcha PRO ChrisMoody
3 years ago
I never forget you who trying help us, you are wonderful people!
+1 Reply
TheLark PRO ChrisMoody
3 years ago
GRRRRRR
+1 Reply
fcha PRO TheLark
3 years ago
Really! I m done, I import all and I did some changes. That was fun!
+1 Reply
fcha PRO TheLark
3 years ago
How long to learn that coding?
+1 Reply
TheLark PRO fcha
3 years ago
Me? It took me about an hour, but I know a similar language so the learning curve wasn't very bad, and I knew what to expect from it. Good job importing all of Chris' scripts :)
+1 Reply
fcha PRO TheLark
3 years ago
The Coding Genius, that was great title. I think both of you are from Mars.
+1 Reply
fcha PRO TheLark
3 years ago
One of Chris custom indicator is really fit with my trade, amazing! Do you provide courses?
+1 Reply
fcha PRO ChrisMoody
3 years ago
Chris, I cant import your moon indicator.
+1 Reply
ChrisMoody PRO fcha
3 years ago
Fcha...you know I have Love for you...but I hope your joking...its a free indicator with all the other ones...but I appreciate that you think I could have created that indicator...YOU HEAR THAT LARK....You might not even be able to pull that one off....

"Moon Phases" in the indicators section..OH Wait I forgot I did code that one from scratch!!! Can't believe TradingView stole that from me...
+1 Reply
Algokid PRO ChrisMoody
3 years ago
Hey Chris

I didn't even realized that your "moon phase" indicator was now available. this is great. Congrat ! and yes , you did program that, i have proof :) .
+1 Reply
TheLark PRO ChrisMoody
3 years ago
Hmmmm, no I don't think I could :P But I think you're cheating, you know, using magic.
+1 Reply
fcha PRO ChrisMoody
3 years ago
I m serious, you did code that full/half moon.
+1 Reply
isomorph
3 years ago
hey... i happened to see one of your charts and was wondering what that squiggly blue/red line was. laguerre! nice job. are you by any chance working on porting any of the other ehlers indicators to TV? i'm thinking the MESA suite.
+1 Reply
TheLark PRO isomorph
3 years ago
Hey there, glad you've found me here, sometimes I feel we are the only two pushing Pine to its limits, judging by our posts on their get satisfaction! hehe Anyways, yes I have a couple things that I'm interested in from MESA, I currently have the Laguerre RSI coded, and will possibly do more, but got sidetracked on some new ideas that I'd like to combine into a strategy. PM me if you'd like the RSI, I've not released it publicly yet
+1 Reply
ScottY
3 years ago
Every time I paste and try and save it says I need a title----it is clearly on there ????????

Any ideas ?
+1 Reply
TheLark PRO ScottY
3 years ago
Did you clear everything in the "new Script" box? I Sometimes forget to and end up with two title tags, it doesn't like that :) Other than that, hmmm
+1 Reply
ScottY TheLark
3 years ago
Yes I cleared all the data in the scripts box. I have tried it 6 or 7 different times with the same error message that the file needs a title. Love your indicator...would sure like to use it.
+1 Reply
TheLark PRO ScottY
3 years ago
Another idea -- whitespace sometimes messes things up, where are you copying the script from? If from the pastebin link above, I've found that copying the first rendition of the code (that has line numbers and a scroll bar), grabs unnecessary whitespace, try copying the rendition below that in the greyd out box
+1 Reply
ScottY TheLark
3 years ago
new info---getting a is a null
Reply
ScottY TheLark
3 years ago
saved file anyways---tried to run it and said failed to compile
Reply
ScottY TheLark
3 years ago
Lark
Got it---used RAW data below- Yea !
Reply
TheLark PRO ScottY
3 years ago
Awesome, had a feeling that might be it! I'll make a disclaimer in my next posting :)
+1 Reply
joe_vijay PRO
2 years ago
How better is this indicator , than the Triple EMA provided by TV?
+1 Reply
joe_vijay PRO joe_vijay
2 years ago
Please see below for a comparison:

snapshot

+1 Reply
TheLark PRO joe_vijay
2 years ago
LMA is actually sort of mis-named, and I'd change it now if I could to LF (Laguerre Filter), it works more like a filter. It only uses 4 data points to come to it's number, which means it can have less inherent lag. Also the fact that it uses a gamma for adjustment rather than a lookback period means it can be easily auto adjusted for different market conditions while program trading.
+1 Reply
Codetrader
2 years ago
Hi The,

Have you used this currency pairs? If so what setting have you come up with you find work best? Thanks
Reply
StockSwinger PRO
2 years ago
Hello Lark:
First of all, thank you for this very helpful indicator! I am superimposing your LMA over my price chart, and it is providing excellent entry and exit signals. I have been also plotting the VWMA with it; producing a crude Vol-Price Conformation Indicator (VPCI). The question I have is it possible to add volume to the Laguerre MA calculation producing a LVWMA?
Thanks Michael
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out