Trend Step

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.
Remove from Favorite Scripts Add to Favorite Scripts

Become a Patreon and get access to exclusive technical indicators!

You can also check out some of the indicators I made for luxalgo :


//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
+1 Reply
@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.
+1 Reply
azinc 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
Thanks AlexGrover ,

For your Support and Assistance...
+1 Reply
@ZAQDA, :)
Appreciated your efforts Alexgrover =D
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out