Forums › ProRealTime forum Français › Support ProBuilder › EMA RENKO sur prix › Reply To: EMA RENKO sur prix
05/08/2024 at 11:02 AM
#232467
Mira ici a un exemple
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
//—settings boxsize=10//8//100//8 //renko bricks size in points/pips transparency=100 //brick colours alpha wicksize=0 //width of wicks //—end of settings //EMA7=exponentialaverage [7](close) size=boxsize*pointsize once upbox = close once downbox = close - size once lowwick = close*100 IF close > upbox + size THEN upbox = upbox + size downbox = downbox + size r=0 g=200 begin=barindex highwick=close wickbar=barindex-round((barindex-begin[1])/2) ELSIF close < downbox - size THEN upbox = upbox - size downbox = downbox - size r=200 g=0 begin=barindex wickbar=barindex-round((barindex-begin[1])/2) ENDIF //draw renko candlesticks drawcandle(upbox,upbox,downbox,downbox)coloured(r,g,0,min(transparency,255)) Mid = (upbox+downbox)/2 EMA7 = ExponentialAverage[7](Mid) EMA20 = ExponentialAverage[20](Mid) EMA50 = ExponentialAverage[50](Mid) RETURN EMA7 as "EMA 7", EMA20 coloured(0,0,255) as "EMA 20", EMA50 coloured(255,0,0) as "EMA 50" |