ALMA (Arnaud Legoux MA) Indicator for ThinkorSwim

M

Miket

New member
Hello All, here is my contribution to the blog as I don't believe in taking without giving back. I hope someone can find as useful as I have.

The goal of the Arnaud Legoux Average is to decrease the noise and generate a more reliable signal than the conventional moving averages.

It does this by applying the average from left to right (the usual way), and then it applies the reverse and makes a combo line. This combo signal is then adjusted by applying a Gaussian Offset that can adjust the combo line to the current price and a sigma (standard deviation).

thinkScript Code
Rich (BB code):
script ALMA {
 input Data = close;
 input Window = 9;
 input Sigma = 6;
 input Offset = 0.85;

 def m = (Offset * (Window - 1));
 def s = Window/Sigma;

 def SumVectorData = fold y = 0 to Window with WS do WS + Exp(-(sqr(y-m))/(2*sqr(s))) * getvalue(Data, (Window-1)-y);
 def SumVector = fold z = 0 to Window with CW do CW + Exp(-(sqr(z-m))/(2*sqr(s)));

 plot ALMA = SumVectorData / SumVector;
}

input Window = 9;
input Sigma = 6;
input Offset = 0.85;

plot ALMA = ALMA (close, Window, Sigma, Offset);
ALMA.setPaintingStrategy(PaintingStrategy.LINE);
ALMA.SetDefaultColor(Color.CYAN);
ALMA.HideTitle();
ALMA.HideBubble();
Shareable Link
http://tos.mx/9mznij

 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
@Miket Thanks for sharing. I renamed the title of the post and also included the source code just in case anyone want to take a sneak peak at it before adding.

 
Last edited:
S

San

New member
VIP
@Miket, Thanks for sharing this indicator and this is something different than EMA. Do you suggest any other indicator which we can combine with this.

 
Last edited:
M

Miket

New member
Any other indicator that would help confirm trend would be beneficial. I like it because its doesnt have overshoot one way or the other. It's tight.

 
Last edited:
Top