Tape indicator made of 3 linear regression trend of 3 different periods.
This indicator was made in French forums with the help of supertiti and Nicolas
The trends information s take place under the chart with different colours to have a better clear view of what happen on chart without the linear regression lines on it.
// Courbe de régresssion linéaire bandeau
// Réalisation collégiale
// Mettre "periode1, periode2 et periode3" en variable
periode1 = 10
periode2 = 14
periode3 = 30
//___________________________________________
RLx1 = LinearRegression[periode1](close)
// Création du bandeau
If RLx1[0] > RLx1[1] then
color1 = 1.3
Elsif RLx1[0] < RLx1[1] then
color1 = -1.3
Endif
//____________________________________________
RLx2 = LinearRegression[periode2](close)
// Création du bandeau 2
If RLx2[0] > RLx2[1] then
color2 = 1.2
Elsif RLx2[0] < RLx2[1] then
color2 = -1.2
Endif
//____________________________________________
RLx3 = LinearRegression[periode3](close)
// Création du bandeau 3
If RLx3[0] > RLx3[1] then
color3 = 1.1
Elsif RLx3[0] < RLx3[1] then
color3 = -1.1
Endif
//____________________________________________
//Création du bandeau 4 qui ne sert qu'à obtenir une égale hauteur d'histogrammes pour les 3 courbes précédentes
RLx4 = LinearRegression[2](close)
If RLx4[0] > RLx4[1] then
color4 = 1.01
Elsif RLx4[0] < RLx4[1] then
color4 = -1.01
Endif
//____________________________________________
Return 1.3 coloured by color1 as "RL bandeau1", 1.2 coloured by color2 as "RL bandeau2", 1.1 coloured by color3 as "RL bandeau3", 1.01 coloured by color4