Standard Deviation & Standard Error Linear Regression Channel

v10.3
Standard Deviation & Standard Error Linear Regression Channel

Here is the code for the linear regression channel of standard deviation and standard error. It is the same one than the tools of the platform.

You can change the lookback period which correspond of the amount of candlesticks for the linear regression calculation.

The ChannelType setting is used to change the calculation type of the upper and lower channel between the standard deviation and the standard error. You can also change the deviation multiplier which is set to 1 by default.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Maxime Baudin • 03/12/2019 #

    Very helpful! Thank you Nicolas

  2. Pere • 03/12/2019 #

    Thanks again Nicolas. My question is, how can I set a general delay to make backtests: for example, to set the standard lookback of 200 but starting x bars before and ending also x bars before. I want to see how this indicator behaves depending of the time, to define strategies for buying and selling. Lookback should be the same, only delayed on the time.
    And the other question is how to set an automatic trading herewith: as the lines are segments, I cannot define my strategy like “IF close > upperband THEN SELL..”

    • Nicolas • 03/12/2019 #

      Just add a linear regression moving average of 200 periods on the chart and you’ll get the same.

  3. Partha Banerjee • 03/12/2019 #

    Hello Nicolas, this is great, however the actual PRT standard error and standard deviation channels keep on plotting themselves keeping the starting bar fixed and changing with the new bar dynamically. Do you have a code for these 2 dynamic channels please? Many thanks.

    • Nicolas • 03/12/2019 #

      If you want to anchor the channel to a specific candlestick, that would be possible but with custom coding. Please open a new topic in the ProBuilder forum and ask your question there, with as much details as possible. Thanks in advance.

  4. Newbie • 03/12/2019 #

    Would it be possible to modify this so it drew each bar one at a time? So with say 3 dots per candle (top, middle & bottom), rather than a line between start-finish? To see where each candle stands independently.

  5. carlinettone • 03/12/2019 #

    Hallo. Sehr guter Trendline Indikator. Ich würde gerne die Linien dicker haben. Kann mir jemand sagen was ich beim Indikator ändern kann damit diese dicker und grösser werden? Danke.

    • Nicolas • 03/12/2019 #

      Es ist in prorealtime v10.3 nicht möglich, sorry 🙂
      Wenn Sie v11 verwenden, können Sie möglicherweise STYLE (line,2) am Ende jeder DRAWSEGMENT-Zeile hinzufügen

  6. Gianluca • 03/12/2019 #

    Hello, is it possible to use this channel in a strategy? i tried to apply in a code but the value of the channel change like a normal bollinger band not like a channel.

    • Nicolas • 03/12/2019 #

      Because this is indeed nothing more of what you describe. A mean with +/- standard deviation is known as the Bollinger Bands. A standard deviation channel is a projection in the past of a least square moving average with upper and lower lines made with STD or STE multiplied by a factor.

  7. ozet • 03/12/2019 #

    std and ste returns 0 on a call… how can i calculate it in a call?

    okay i got it “ste[lookback](close)” “(close)” was missing.

  8. Jack86gv • 03/12/2019 #

    Ciao Nicolas, e possibile fare uno screener con questo codice ovvero vorrei sapere quando il prezzo esce dal canale sia sulla parte superiore che inferiore.
    Grazie mille

    • Nicolas • 03/12/2019 #

      https://www.prorealcode.com/topic/screener-regressione-canale/

  9. wharfdog • 03/12/2019 #

    Hi Nicolas,

    Fantastic work, I’m really grateful for this. I was wondering if it would be possible to remove (or make transparent) the middle line. Could you please let me know what code should I add to the indicator code to make this happen? Thank you very much.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Vonasi There are actually two ways to calculate standard deviations and I seem to have used the ver...
Vonasi There are actually two ways to calculate standard deviations and I seem to have used the ver...
segie Can something similar be done with Supertrends?
Vonasi Not sure I fully understand what you are asking for. Are you asking for MTF Supertrend level...
Kris75 very interesting; thanks !
Nicolas How to import file page: in the help section of the website explains howto
kenssa import through the indicator page/window in the Proreal time
chicoteca Buenas, no consigo que se me muestre en el chart de DAX. ¿Cómo procedo? Gracias.-
Ludwig Bonjour Merci pour le code, je souhaite intégrer un break even et mette en place un réinves...
superfalcio hello, this strategy is pretty interesting, anyway on index after diferent suggestion and im...
Fralex Hello everyone I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a pe...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
HeikinAshi https://www.prorealcode.com/topic/ssl-channel/
jobswaps oyes aste uno de soportes y recistencias
jobswaps eso lo necesitamos
redactv7 On my charts, the indicator doesnt go on the upper pannel, on prices, but under like an osci...
Nicolas apply in on the chart, look at this how-to video: https://www.prorealcode.com/blog/video-tut...
jonpt88 interesting code thanks!
Nicolas Sorry I do not provide assistance for Tradestation code.
surfeur Bonjour, Je suis pas expert en PRT donc si qq'un peut m'expliquer un peu le code ? Par...
Nicolas src c'est bien le customclose en effet. ATR, si aucune série de données n'est spécifié, il u...
carlvan That's a great indicator and I especially the use of colors, more or less pronounced to indi...
diegofe_2000 CORDIAL SALUDO. CUANDO REALIZO UN PROGRAMA CON ESTE INDICADOR ME SALE EL SIGUIENTE LETRE...
ALE Hello do you want to explain to me in more detail what you have to do? Please replay here:...
Vonasi
5 years ago
Balmora74 Thanks for this code. i will try to adapt it in the EUR/USD Pac Man Strategy who is based on...
Vonasi I still have two versions of the PacMan strategy on forward test although there have been va...
Balmora74 I use your version on a real account and the strategy is profitable and i did not have any p...
sir_i Bonjour à tous, Je suis nouveau sur le forum et sur la plateforme, pourriez-vous me dire com...
Nicolas Il faut simplement l'appliquer sur le prix.
sir_i Merci pour la réponse, je ne suis pas familier avec l'application de cette procédure simple,...
Nicolas File and code are updated.
Zasinas2000 Hi allo I am not sure I am doing it correctly, but this adds to proreal as an indicator. ...
Trimicha Hi, when I copy the code, i get an error message that LinRegPeriod is not defined. Doe...
Tarkus1954 Hi. When I add this indicator it loads it in a separate window. How do I get the indicator...
Nicolas By adding it on the price chart. Use the wrench on the left upper side of the price chart.
ervelasco Thank you for your posting! I was missing the indicator when trying to select Keltner bands ...
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...
Nicolas S11 variable is not a loop but a ratio calculation. In real time the codes is processed on e...
Stephan_V Nicolas, This regression delivers damn good results, especially for trends ! I'm wonde...
Nicolas Least square method is used here in order to get the perfect y = ax2 + bx + c
Canale di Fill By Filippo si si... farò un video a breve
AngelPujalt ok. Gracias.
Stenozar Hi Filippo, any news about your video to explain how to use this indicator? thanks
Vonasi Jissey - Je pense qu'il est préférable que vous commenciez un sujet sur le forum ProOrder et...
jissey Bonjour Vonasi, ma stratégie est simple; Passage du niveau 50 par la closeline , à l'achat ...
Vonasi I cannot communicate in French with you. Please start a topic in the forums to discuss your ...

Top