# R-Squared correlation coefficient – R²

In statistics, the coefficient of determination, denoted R2 or r2 and pronounced “R squared”, is the proportion of the variance in the dependent variable that is predictable from the independent variable(s) (wikipedia).

The R-squared indicator gives a correlation coefficient between 0 to 1 (0 = no correlation , 1 = highly correlated) by comparing the injected data to a straight linear regression line.

This indicator gives the same values as the R2 instruction. Some asked me the code to study the embedded instruction of the platform, here it is.

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?

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

#### Likes

Related users ' posts
Nicolas
7 months ago
v10.3
17
Indicators
Bonjour Nicolas, comment coder un indicateur de rsi de Divergence? Merci pour ta réponse
En apprenant la programmation :) Plus sérieusement, il y a quantité d'exemples dans la libra...
Bonjour Nicolas, Très bel indicateur! Bravo!
Actaru5
11 months ago
v10.3
6
Indicators
Caio Jan, con ognuno dei setting ottieni un indicatore visualizzato diverso, ma tutti sono ...
Hi Actarus, what's the name of the histogram indicator below Apple's chart?
Flag ShowState in setting and show histogram
Bard
11 months ago
v10.3
0
Indicators
Nicolas
2 years ago
v10.3
6
Indicators
Nicolas, can you share with me how PRT calculates LinearRegression ? Is it (3 * WeightedAve...
The above code is the way it is calculated in PRT. However the exact indicator can be found ...
Thanks Nicolas.
Nicolas
2 years ago
v10.3
10
Indicators
Es ist in prorealtime v10.3 nicht möglich, sorry :) Wenn Sie v11 verwenden, können Sie mögli...
Hello, is it possible to use this channel in a strategy? i tried to apply in a code but the ...
Because this is indeed nothing more of what you describe. A mean with +/- standard deviation...
FULVIO09
3 years ago
6
Indicators
Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
Something appears to be wrong with this formula as graphing t shows t to almost never be wit...
Nicolas
3 years ago
6
Indicators
S11 variable is not a loop but a ratio calculation. In real time the codes is processed on e...
Nicolas, This regression delivers damn good results, especially for trends ! I'm wonde...
Least square method is used here in order to get the perfect y = ax2 + bx + c
v10.3
9
Indicators
si si... farò un video a breve
ok. Gracias.
Hi Filippo, any news about your video to explain how to use this indicator? thanks
maurinho
3 years ago
v10.3
3
Indicators
Buonasera Maurinho, interessante l'indicatore che ha i proposto ma ancora di più interessant...
ciao marcot18 l'indicatore pubblico /proffessional lo puoi scaricare si chiama progo di will...
This strategy looks good
laurenzo
4 years ago
5
Indicators
What a gift! 66 no less! Thank you for the work and thank you for sharing it.
This "indicator" alone has completely changed my algorithms for the better! Id even go as fa...
CAN YOU SHARE MT4 FILE
Nicolas
4 years ago
v10.3
0
Indicators
4 years ago
2
Strategies
Hello Marc your strat seems very intersting, will take a look Reb
What exactly is meant by Total price? Is r1 =28 in your example the no of days for "Total P...
Nicolas
4 years ago
v10.3
3
Indicators
Nice, thanks!
Hi Nicolas, I am revisiting this indicator and wanted to ask, is it possible to replace sty...
Nicolas
4 years ago
v10.3
2
Indicators
Ce code n'est valable que sur la V10.3 ? sur le 10.2 il y a une erreur de syntaxe dans le fi...
Oui en effet, c'est un indicateur "10.3" à cause uniquement de la mise en forme des courbes ...
xel
5 years ago
6
Indicators
@DerPat - I don't see any question regarding the indicator.  Anyway, I think I give enough l...
Xel, tu eres el creador de este indicador? Bueno te  cuento que es muy bueno para hacer est...
Buen día @diegofe_2000 -  Claro, mandalo y por aquí lo probamos en otros instrumentos y si g...
Nicolas
5 years ago
v10.3
4
Indicators
Very nice indicator. Why doesn't it refresh as time passes?
It should refresh on each bar.
On my PC it doesn't refresh. I am using intraday tick bars (not minutes). Unfortunately I do...
Nicolas
5 years ago
14
Indicators
I wish to get a clearer unstanding of the theory behind this code. What does j=j+1 imply? Im...
Hi Nicolas. In order to do tests, is there the possibility to set the start and the end of t...
I would not recommend using this version of the linear regression channel, but this one inst...
xel
5 years ago
0
Indicators
Nicolas
6 years ago
0
Indicators
Nicolas
6 years ago
3
Indicators
Really liking this indicator. Thanks
Moving your last response to this post. Thanks for conforming the code below. How does PRT/...
It is obtained by substracting the x days before Close from today’s Close. X is the paramete...

Top