The ZiBoll Style Indicator is based on special view of the bollinger bands. The bollinger values are computed with the help of a weighted average of the Low’s and of the High’s.
When those MA’s are computed , they where compared with the close to create a Boolean result.
Signals are given by red and blue arrows. (arrows into red and blue circles). Compare with the backtest arrows, it don’t fit. I like to discuss this matter.
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
// Settings Once p = 20 Once s = 0.5 // Computes the basic moving average from the low and from the high BollMALow = WeightedAverage[p](Low) BollMAHigh= Weightedaverage[p](High) // Computes the Standard Deviation (You can also take fx for colculate the "StdSTD[20](close)") IF barindex >= p-1 THEN sumy2 = 0 sumy = 0 FOR i = 0 TO p-1 do sumy2 = sumy2 + SQUARE(close[i]) sumy = sumy + close[i] NEXT STDDEV =SQRT(sumy2 / p - SQUARE(sumy / p)) ELSE STDDEV = undefined ENDIF //Compute the Special Bollinger Bands. //Instead of two times the STDDEV we calculate 0.5 times the STDDEV , and subtract it from the LowMA //For the upper value we take 0.5 times the STDDEV and add it to the HighMA BdnL = BollMALow - (s * STDDEV) buph = bollmahigh + (s * STDDEV) //Compare the results with the close of each candle //Lower than the close its -1 //Higher than the close its +1 //Between the two values equals the previous values if close < BdnL then ZHL=-1 elsif close > Buph then ZHL=1 else ZHL=ZHL[1] endif //The Boolean value of ZHL if ZHL crosses over 0 then Dnh=Buph drawtext("●",barindex,low-2*AverageTrueRange[14](close),Dialog,Bold,30) coloured(55,55,255,55) DRAWARROWUP(barindex, low-2*AverageTrueRange[14](close))coloured(0,0,255,255) endif if ZHL crosses under 0 then Uph=Bdnl drawtext("●",barindex,high+2*AverageTrueRange[14](close),Dialog,Bold,30) coloured(255,55,55,55) DRAWARROWDOWN(barindex, high+2*AverageTrueRange[14](close))coloured(255,0,0,255) endif RETURN dnh coloured(205,55,55,255) as"boll-" , uph coloured(55,55,155,255)as"boll+" |
Share this
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
hi is posible you put the code for version 11.thank you
Normaly it do work in version 11.
Hello to all, please does a coder can bring the indication of the price level on the chart of when the fleche applies…thank you in advance.
@bertrandpinoy
add between line 50 and 51 : drawtext(“#dnh#”,barindex,low-2.618*AverageTrueRange[14](close),Dialog,Bold,30) coloured(55,55,255,255)
add also between line 55 and 56 : drawtext(“#upH#”,barindex,low-2.618*AverageTrueRange[14](close),Dialog,Bold,30) coloured(0,255,255,255)