indicador de divergencia Bollinguer %B

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #231972 quote
    Maricarmen
    Participant
    Junior

    Estaría muy agradecido si me pudiesen  adaptar este indicador MACD  a un  indicador de divergencia Bollinger  %B.

    https://www.prorealcode.com/topic/macd-divergence-indicator-with-histogram/#

    Gracias,

    #232010 quote
    Iván González
    Moderator
    Master

    Aqui tienes la divergencia entre el indicador %bollinger y el precio.

    N=40///N is the number of bars to look back for a divergence. Normal values are 20-40. Must be the same in both indicators
    
    //% Bollinger
    bollUp=BollingerUp[20](close) 
    bollDw=BollingerDown[20](close) 
    Pboll = (close-bolldw)/(bollUp-bollDw )*100
    
    
    IF (BarIndex > 10+1+N) THEN
    
    ///divergencia bajista
    IF (Pboll[1]>Pboll AND Pboll[1]>Pboll[2]) THEN
    extremum2=Pboll[1]
    extremum1=highest[N](Pboll)
    
    preciomax2=close[1]
    preciomax=Highest[N](close)
    
    IF(extremum2<extremum1 AND preciomax2>preciomax[1]) THEN
    for i=1 to N
    if Pboll[i]=extremum1 then
    zz=i
    
    drawsegment (barindex[1], Pboll[1], barindex[zz], Pboll[zz]) coloured(200,0,0)
    endif
    next
    
    endif
    endif
    
    ///divergencia alcista
    IF (Pboll[1]<Pboll AND Pboll[1]<Pboll[2]) THEN
    extremum22=Pboll[1]
    extremum11=lowest[N](Pboll)
    
    preciomin2=close[1]
    preciomin=lowest[N](close)
    
    IF(extremum22>extremum11 AND preciomin2<preciomin[1]) THEN
    for i2=1 to N
    if Pboll[i2]=extremum11[1] then
    zz2=i2
    
    drawsegment(barindex[1], Pboll[1], barindex[zz2], Pboll[zz2]) coloured(0,200,0)
    endif
    next
    ENDIF
    
    ENDIF
    endif
    
    return Pboll  as "%Boll", 0 as "0"
    #232072 quote
    P. Marlowe
    Participant
    New

    Good ask  and better answer. A little treasure. Thanks.

    Buena pregunta y mejor respuesta. Un pequeño tesoro. Gracias.

    #232100 quote
    robertogozzi
    Moderator
    Master

    @P. Marlowe

    Publica solo en el idioma del foro en el que publicas. Por ejemplo, inglés solo en foros en inglés y español solo en foros en español. Gracias 🙂

    #232146 quote
    Maricarmen
    Participant
    Junior

    Gracias Iván:

    Lo estuve probando y cumple mis expectativas, ya te seguía en algunos videos tuyos por cierto muy buenos para intentar coger algo de conocimientos de este mundo maravilloso que es la bolsa.

    #232203 quote
    Maricarmen
    Participant
    Junior

    No sé si formulo esta pregunta bien, o la tendría que formular en el apartado de Screeners.
    Le voy a molestar una vez más, se podría adaptar el indicador anterior a un Screener Bollinger %B también. Teniendo en cuenta el archivo adjunto.

    #232355 quote
    Iván González
    Moderator
    Master

    Mejor en el hilo de screeners.
    A la hora de compartir código tienes un botón para introducir el código de PRT.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

indicador de divergencia Bollinguer %B


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Maricarmen @maricarmen Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by Iván González
1 year, 9 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 04/26/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...