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).
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
https://tos.mx/9mznij
Last edited by a moderator: