CP=(open+high+low+2*close)/5
F=LinearRegression[3](CP)
E=std[7](F)
if barindex less than 8 then
Mediane = undefined
BandeHaute = undefined
BandeBasse = undefined
Else
BandeHaute = F+(E*2)
BandeBasse = F-(E*2)
if F less than BandeHaute[1] and F greather than BandeBasse[1] then
BandeHaute=BandeHaute[1]
BandeBasse=BandeBasse[1]
endif
Mediane =(BandeHaute+BandeBasse)/2
Endif
Return BandeHaute , Mediane , BandeBasse