Skip to content
S&P 5007,818.93up +0.58%Nasdaq27,599.89up +0.45%Dow51,521.28up +0.49%DAX25,449.19up +0.77%GBP/USD1.3261down −0.11%EUR/GBP0.8479down −0.01%Brent101.74up +1.15%Gold4,180.5down −0.16%Bitcoin85,321down −0.26%Prices at 02:26
ChartsView

Mogalef Bands code pro real time

More
13 years 11 months ago - 13 years 11 months ago #505 by remo
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
Last edit: 13 years 11 months ago by remo.

Please Log in or Create an account to join the conversation.

Moderators: remo
Powered by Kunena Forum
Use the arrow keys to move and Enter to openSearch every page

Share tips