The BB stops stochastic indicator defines trend trigger depending of the cross of the stochastic over the upper or lower bands of a Bollinger Bands applied to it.
Various typical settings of these indicators can be applied: periods of MA, standard deviation periods, etc.
If you are looking for the “famous” BBands Stop indicator but applied to the price, you can find it here: BBands stop
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
//PRC_ BBstops Stochastic| indicator //27.03.2019 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT4 version // --- settings StoPeriod = 32 // Stochastic period StoSlowing = 9 // Stochastic slowing period MaPeriod = 20 // Bollinger bands period MaMethod = 0 // Moving average method DevPeriod = 20 // Deviations period Deviation = 1 // Deviation Risk = 1 // Risk // --- end of settings PriceC = customclose // Sotchastic price applied sto = stochastic[StoPeriod,StoSlowing](PriceC) dev = std[DevPeriod](sto) ma = average[MaPeriod,MaMethod](sto) amax = ma+dev*Deviation amin = ma-dev*Deviation bmax = amax+0.5*(Risk-1)*(amax-amin) bmin = amin-0.5*(Risk-1)*(amax-amin) if sto>amax[1] then trend=1 elsif sto<amin[1] then trend=-1 endif if trend=-1 and amax>amax[1] then amax=amax[1] endif if trend = 1 and amin<amin[1] then amin=amin[1] endif if trend=-1 and bmax>bmax[1] then bmax=bmax[1] endif if trend=1 and bmin<bmin[1] then bmin=bmin[1] endif if sto crosses over amax then upr=30 upg=144 upb=255 upalpha=255 dnr=168 dng=168 dnb=168 dnalpha=100 if(dot<=0) then drawtext("•",barindex[1],bmin[1],Dialog,Standard,20) coloured(upr,upg,upb) dot=1 endif elsif sto crosses under amin then upr=168 upg=168 upb=168 upalpha=100 dnr=244 dng=164 dnb=96 dnalpha=255 if(dot>=0) then drawtext("•",barindex[1],bmax[1],Dialog,Standard,20) coloured(dnr,dng,dnb) dot=-1 endif endif return sto coloured(168,168,168) STYLE(dottedline,2) as "stochastic",bmax coloured(dnr,dng,dnb,dnalpha) style(line,2),bmin coloured(upr,upg,upb,upalpha) style(line,2) |
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
Hello Nicolas, le code fonctionne parfaitement bien mais la variable “Risk” ne sert à rien dans l’état actuel puisqu’elle n’a pas de référence dans l’indicateur (possible une extension pour une stratégie de suivie ?), cordialement Swapping
En effet merci, erreur corrigée, la variable Risk affecte désormais comme il se doit les calculs de l’indicateur.
How can we get this indicator on MT4
You can ask for private custom coding to our programming services: https://www.prorealcode.com/trading-programming-services/