RSI and Linear Regression trading signals

v10.3
RSI and Linear Regression trading signals

Trading signals based upon a linear regression channel applied to a classic RSI indicator.

If the RSI exceeds the upper band, the price should reverse to its mean and therefore a sell signals is announced.

If the RSI breaks the lower band, the price should reverse to its mean and a buy signals is plotted on the indicator.

You can adjust the RSI period of calculation (with variable ‘len’) and the linear regression channel period with “period”. The upper and lower band spread can be adjusted with the “deviations” setting (default is a 2 times multiplier from the mean).

 

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. Demon • 09/25/2020 #

    On this way of exploiting the RSI, read the article by Samuel Rondot:
    https://www.abcbourse.com/analyses/chronique-80_de_taux_de_reussite_sur_le_cac_40_en_15_ans-203.
    Thanks .
    How can I made a difference betteen the high and low deviation?

    • Nicolas • 09/25/2020 #

      In this article, the author uses the standard deviation from the mean of the RSI, in this case this indicator is not the same, use this one instead: https://www.prorealcode.com/prorealtime-indicators/rsi-self-adjusting-bands/

  2. Abz • 09/25/2020 #

    Hello ,
    is it possible to use this in a MTF screener without getting this fault?

    This ProScreener market scan cannot be executed because there is an infinite loop within the program code.
    An infinite loop is a sequence of instructions which repeats itself endlessly when the code is executed. This may happen if:
    – the loop doesn’t have a termination condition
    – the termination condition can never be met
    – the termination causes the loop to start over
    To run the scan, modify the code of your ProScreener.

    • Nicolas • 09/25/2020 #

      Sure, please open a new topic in the ProScreener section of the forum for that specific query. Please respect the posting rules also. Thanks.

  3. Sofitech • 09/25/2020 #

    I try to ad this indicator on DAX or EurUSD on M5 and on tick chart but nothing appears on the price chart. What can be the problem ?

    • Nicolas • 09/25/2020 #

      Try to expand the units displayed on your chart. Or use this simplified code which is the same: https://www.prorealcode.com/topic/infinite-loop-issue/#post-146094

  4. bearbull • 09/25/2020 #

    how would one incorporate an alarm at the buy/sell signal?

    • Nicolas • 09/25/2020 #

      Change the last line with: return irsi, a coloured(r,0,b) style(line,3) as “curve low”,c1 coloured(r,0,b) style(line,3) as “curve”, b coloured(r,0,b) style(line,3) as “curve high”,up,down
      and use the alert tool from the platform with “up” and “down” returned signals.

  5. bearbull • 09/25/2020 #

    Thank you sir!!

  6. bearbull • 09/25/2020 #

    Nicolas…….does this mean that I will now automatically have an alarm on every buy/sell signal? or will I have to manually reset it for every buy/ sell signal?

  7. bearbull • 09/25/2020 #

    ….also note in the alarm settings that for this indicator you cannot get an email email notification?

    • Nicolas • 09/25/2020 #

      email notification are not available for custom indicators.

  8. HappyBunny • 09/25/2020 #

    You are using variables “r” abd “b” for the color red and blue but unfortunately after setting r or b to 255, you reset b with
    b = startingPointY+deviation
    Do you rely on prorealcode knowing difference between integer b (255) and floating point b (deviation), or was this a mistake?

    • Nicolas • 09/25/2020 #

      good spot! indeed, that’s a mistake. Change the variable name for the b color, while I don’t think it would change the calculation result of the indicator itself.

  9. DIOS • 09/25/2020 #

    Bonjour Nicolas, comment coder un indicateur de rsi de Divergence? Merci pour ta réponse

    • Nicolas • 09/25/2020 #

      En apprenant la programmation 🙂 Plus sérieusement, il y a quantité d’exemples dans la library et dans les forums.

  10. DonTony • 09/25/2020 #

    Bonjour Nicolas,
    Très bel indicateur! Bravo!

  11. manafull • 285 days ago #

    Awesome work Nicolas! By any chance, do you have the Screener version for this “RSI and Linear Regression trading signals”. I tried to convert the indicator to screener by replacing the drawing at the end i.e. “SCREENER[Signal](Signal AS “1=↑, 2=↓”)”, where I use the Signal =1 or 2 to replace the two condition of drawing in the codes … but at the end I always get the error “Syntax error: This variable is not used in the {did not show any further info}”. It would complete your indicator perfectly if you can add the screener here for us. Thank you and Best regards.

    • Nicolas • 284 days ago #

      Please open a topic in ProScreener forum with your query, I’ll reply you there. Thank you.

  12. manafull • 282 days ago #

    Thanks Nicolas, I post my question, along with the codes I am trying to convert from your indicator, in the ProScreener Forum… So please review there. Thanks again.

    • Nicolas • 282 days ago #

      I replied to your post here: https://www.prorealcode.com/topic/screener-for-rsi-and-linear-regression-trading-signals/#post-218189

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+3 more likes

Related users ' posts
Marie-Eve Vergoz lorsque je copie les codes, le système me signale des erreurs à la ligne 12 et suivantes
Marie-Eve Vergoz sorry - tout est ok -
AlgoAlex
5 years ago
Marcot18 Alex ti sei superato
AlexF Esagerato!
jobswaps Sube como trazar lineas de tendencias a tantas barras
Frankiesc interesting indicator !! Thanks for sharing!!!
robertogozzi Thank you :)
JJ Tec Hola Las condiciones de entrada / salida vienen en el libro de J. Carter Mastering the trad...
Pixeldd Ich bekomme beim einfügen des Indikators einen Fehler angezeigt. Was bitte muss ich genau än...
HarryPro Hello, Firtly there appears to be a typo on line 6 "lenghkc=20" should this be "lengthkc=...
Jack86gv Ciao Nicolas, e possibile fare uno screener con questo codice ovvero vorrei sapere quando il...
Nicolas https://www.prorealcode.com/topic/screener-regressione-canale/
wharfdog Hi Nicolas, Fantastic work, I'm really grateful for this. I was wondering if it would be ...
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 Il s'agit d'un indicateur compatible avec PRT v11 uniquement. Pour éviter les erreurs de cop...
Sébi Intéressant. Merci pour ce partage Nicolas. L'indicateur ne considère pas les divergences ...
Nicolas ok, pour les divergences chacun voit midi à sa porte je dirai :) Vu qu'il n'y a pas de formu...
Nicolas change the lastline with: RETURN lastsig and check if lastsig change its value with the a...
nectouxg Hello Nicolas, I will try tonight when I get home, just one last question, I trade the DA...
FXtonio Bonjour, j'ai un problème avec le code, il me dit que ce n'est pas correct ligne 26-27-28: ...
mcha merci bien et félicitations pour la réactivité avec laquelle il a été mis dans la bibliothèq...
soulintact Great indicator Nicolas, thanks!
cdc.andersson Hello, when trying to include this wonderful Dynamic RSI on my trading system i get the erro...
Rafyone Bonjour Nicolas et bonne année lol J'ai une erreur qui apparait concernant drawbarchart une...
Nicolas Je pense que tu n'utilises pas le bon éditeur de code, cette instruction est compatible uniq...
Exalaxe Hey, i just noticed you optimized this strategy. Could i see your new version, please?
Andrea.1981 sorry i add my code but it not enter why i dont know
Andrea.1981 this is code simply stop , and you can see another version for stop / Codice principale...
AntoGH how did you backtest it ?
PastaPesto @AntoGH , I dont know if you are asking me, but my backtest was made in an IS of 4 years bet...
Ridder @PastaPesto Do you still running this and how is the results? Thanks
dau710 Are the Bulls Blue & the Bears Red?
dau710 Many thanks :)
lokbuscas is it possible to make a screener with this conditions??? thank you
achel I believe so but I leave it to Nicolas to decide if it is possible
Nicolas Please open a new topic in the screeners forum
myhlo Super Nicolas !! Cet indicateur offre une nouvelle lecture du Rsi ! Ces bandes up & Dawn...
okiki please how can i acess the indicator i like it and want it please am new here
Nicolas download the itf file above and import it into your prorealtime platform: https://www.prorea...
XXXXVII Excellent indicateur ! Déterminer une tendance est devenu un jeu d'enfants ! Félicitation......
gregoire bonjour nicolas j ai cherché partout sur le net et impossible de trouvé ce que je recherch...
Nicolas Merci de poster une demande dans le forum des indicateurs, ainsi on pourra le coder dans ce ...
bala Hi Nicolas, I have been extensively researching for lot of answers here. I found that you...
Nicolas Don't apply it on price, use the main "indicator and trading system" button found on the top...
Bogdan35 Hello, Is there one for MT4?
Nicolas
6 years ago
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...

Top