Bollinger Divergencia %B
Forums › ProRealTime foro Español › Soporte ProScreener › Bollinger Divergencia %B
- This topic has 2 replies, 2 voices, and was last updated 3 hours ago by
Iván.
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
05/08/2025 at 10:37 PM #246909
Hola:
No se si es posible crear un Screener que cumpla con lo siguiente,
Que localice valores en máximos con sucesivos mínimos decrecientes y que se de en el mismo una Divergencia en el indicador Bollinger %B.
Adjunto figura en la que se observa, creo, lo que pretendo
Gracias,
05/09/2025 at 8:34 AM #246914Perdón quise decir con sucesivos máximos decrecientes tal como se aprecia en el gráfico.
05/09/2025 at 3:09 PM #246933buenas. he reutilizado uno de los indicadores publicados para adaptarlo a cualquier oscilador.
De esta forma definiendo la variable osc se pueden calcular los pivots de ésta, compararlo con el precio y así ver si hay o no divergencia.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107//----------------------------------------------////PRC_Any OSCILLATOR Divergence Indicator//version = 0//09.05.25//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//----------------------------------------------////-----Inputs-----------------------------------////----------------------------------------------//src=closelbr=5 //pivot lookback Rightlbl=5 //pivot lookback LeftrangeUpper=60 //Max lookback rangerangeLower=5 //Min lookback rangeplotBull=1plotHiddenBull=1plotBear=1plotHiddenBear=1//----------------------------------------------////-----OSCILLATOR Calculation-------------------////----------------------------------------------//len=20bbtop=bollingerup[len](src)bbbot=bollingerdown[len](src)pctBol=(src-bbbot)/(bbtop-bbbot)*100osc=pctBol//----------------------------------------------////-----Pivots High and Low----------------------////----------------------------------------------////---Pivots lowif osc > osc[lbr] and lowest[lbr](osc) > osc[lbr] and osc[lbr] < lowest[lbl](osc)[lbr+1] then$ply[z+1] = osc[lbr]$plx[z+1] = barindex[lbr]$pricel[z+1] = low[lbr]drawpoint(barindex[lbr],osc[lbr],2)coloured("red",80)z = z + 1endif//---Pivots highif osc < osc[lbr] and highest[lbr](osc)<osc[lbr] and osc[lbr]>highest[lbl](osc)[lbr+1] then$phy[t+1]=osc[lbr]$phx[t+1]=barindex[lbr]$priceH[t+1]=high[lbr]drawpoint(barindex[lbr],osc[lbr],2)coloured("blue",80)t=t+1endif//---Pivot detectionif z<>z[1] thenplFound=1elsif t<>t[1] thenphFound=1elseplFound=0phFound=0endifbarsPL=barssince(plFound[1])inrangePL=rangelower<=barsPL and barsPL<=rangeupperbarsPH=barssince(pHFound[1])inrangePH=rangelower<=barsPH and barsPH<=rangeupper//----------------------------------------------////-----Regular Bullish--------------------------////----------------------------------------------//oscHL=osc[lbr]>$ply[max(0,z-1)] and inrangePLpriceLL=low[lbr]<$pricel[max(0,z-1)]bullCondAlert=priceLL and oscHL and plFoundbullCond=plotBull and bullCondalertif plFound and bullCond thendrawsegment($plx[max(0,z-1)],$ply[max(0,z-1)],$plx[z],$ply[z])coloured("green")style(line,2)endif//----------------------------------------------////-----Hidden Bullish---------------------------////----------------------------------------------//oscLL=osc[lbr]<$ply[max(0,z-1)] and inrangePLpriceHL=low[lbr]>$pricel[max(0,z-1)]hiddenBullCondAlert=priceHL and oscLL and plFoundhiddenBullCond=hiddenBullCondAlert and plotHiddenBullif plFound and hiddenBullCond thendrawsegment($plx[max(0,z-1)],$ply[max(0,z-1)],$plx[z],$ply[z])coloured("green",80)style(line,2)endif//----------------------------------------------////-----Regular Bearish--------------------------////----------------------------------------------//oscLH=osc[lbr]<$phy[max(0,t-1)] and inrangePHpriceHH=high[lbr]>$priceH[max(0,t-1)]bearCondAlert=priceHH and oscLH and pHFoundbearCond=plotBear and bearCondalertif pHFound and bearCond thendrawsegment($phx[max(0,t-1)],$phy[max(0,t-1)],$phx[t],$phy[t])coloured("red")style(line,2)endif//----------------------------------------------////-----Hidden Bearish---------------------------////----------------------------------------------//oscHH=osc[lbr]>$phy[max(0,t-1)] and inrangePHpriceLH=high[lbr]<$priceh[max(0,t-1)]hiddenBearCondAlert=priceLH and oscHH and phFoundhiddenBearCond=hiddenBearCondAlert and plotHiddenBearif pHFound and hiddenBearCond thendrawsegment($phx[max(0,t-1)],$phy[max(0,t-1)],$phx[t],$phy[t])coloured("red",80)style(line,2)endif//----------------------------------------------//return osc as "Oscillator"coloured("blue")style(line,2) -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: