# Trend Step

1885 visningar
Just a modification of my old auto-line script, lot of errors fixed and a correction in the standard deviation. Also changed the tittle because "auto-line" was really confusing.
Patreon: https://www.patreon.com/alexgrover

You can also check out some of the indicators I made for luxalgo : https://www.tradingview.com/u/LuxAlgo/#published-scripts

## Kommentarer

//Lo mismo no te llega este mensaje pero he visto que eres de Sevilla y lo mismo me puedes explicar una línea de código o te digo como la entiendo yo y a ver si no voy mal desencaminado (soy un poco de letras aviso)

//a es una variable ?¿ si el número de observaciones supera lenght tenemos que sumar a a +dev o restar -dev (de hecho estamos sumando y restando 2 desviaciones estandar), supongo que eso captura un 95% en supuesto de //normalidad y a sería todo dato dentro de a +/- dev
//En azul si a > a y en naranja si a <a

//Es así ¿?

//Ahora cojo el traductor y lo pongo en inglés no sea que se mosqueen los chic@ de trading view

The same does not get this message but I have seen that you are from Seville and the same can you explain me a line of code or I tell you how I understand it and see if I am not going wrong (I am a bit of letters warning)

a is a variable? if the number of observations exceeds lenght we have to add aa + dev or subtract -dev (in fact we are adding and subtracting 2 standard deviations), I suppose that captures 95% of course // normal already would be all data within a +/- dev
In blue if a> a and in orange if a <a

Is that so?

Now I take the translator and put it in English, lest the chic @ trading view show
Svara
azinc
@azinc, Hi and thx for your comment, when the absolute difference between a and src exceed dev is when we have to add or subtract a with dev, this allow the output to fit the price better, therefore the absolute difference between src and a can't exceed dev. This indicator has nothing to do with the empirical rule (68–95–99.7 rule), also prices are not normally distributed, so this rule does not apply, however their log returns are approximately normal.
Svara
alexgrover
@alexgrover, Thank you!,...we are going to paint a new line with a new close whenever actual close > a/previous_line_painted(previous_close) + dv or close<a /previous_line_painted(previous_close)- dv if not we keep the same a

As a newbie, I have to say that see the use of the nz "built function" and fixnan "built function" as a big step in my learning curve

If you have any suggest to get better in pinescript I will be very grateful to listen,...Thank you very much, apart of your web, have you got twitter (mine is @PedroHermida) account? I am no a programmer but I am very interested in this domain
Svara
Thanks AlexGrover ,