ProScreener de dos indicadores

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #254001 quote
    NicoGB67
    Participant
    New

    Buenas, no sé si se podrá hacer el ProScreener que me gustaría tener, para mí sería lo que ando buscando desde hace tiempo y es obtener información valiosa de dos de mis indicadores favoritos en tiempo real, se trata del Smart Money Concepts y del ZigZag SR, ambos subidos por Iván; tengo el ProScrrener de ambos que generosamente Iván me hizo, pero lo que busco es algo conjunto de ambos y no sé como hacerlo; se trata de que me avise cuando tras un CHoCH o un BOS alcista se crea una onda impulsiva (LH), y que cuando el CHoCH o BOS sea bajista la onda sea correctiva (HL) ;no sé si me explico bien, quiero que cuando se dé en tiempo real un LH antes se haya producido un CHoCH o BOS alcista y al contrario con del bajista, los ProScreener que Iván hizo lo dejo abajo:

     

    //——————————————————————————–//
    //Screener_Smart Money Concepts
    //version = 1
    //29.07.2024
    //Iván González @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //——————————————————————————–//
    //—–Inputs———————————————————————//
    length=15

    showbull=3//1=all 2=bos 3=CHoCH
    showbear=3//1=all 2=bos 3=CHoCH

    //——————————————————————————–//
    //—–Swings———————————————————————//
    //—Swing length
    os=0
    upper=highest[length](high)
    lower=lowest[length](low)

    if high[length]>upper then
    os=0
    elsif low[length]<lower then
    os=1
    else
    os=os[1]
    endif

    if os=0 and os[1]<>0 then
    mytop=high[length]
    else
    mytop=0
    endif

    if os=1 and os[1]<>1 then
    mybot=low[length]
    else
    mybot=0
    endif
    //——————————————————————————–//
    //—–Pivot High—————————————————————–//
    if mytop then
    topcross=1
    topy=mytop
    endif
    //——————————————————————————–//
    //—–Pivot Low——————————————————————//
    if mybot then
    botcross=1
    boty=mybot
    endif
    //Detect bullish Structure
    signalLong=0
    if close crosses over topy and topcross then
    choch=undefined
    if trend<0 then
    choch=1
    endif

    if showbull=1 or (showbull=2 and not choch) or (showbull=3 and choch) then
    signalLong=1
    endif

    topcross=0
    trend=1
    endif

    //Detect Bullish Strcuture
    signalshort=0
    if close crosses under boty and botcross then
    choch=undefined
    if trend>0 then
    choch=1
    endif

    if showbear=1 or (showbear=2 and not choch) or (showbear=3 and choch) then
    signalshort=1
    endif

    botcross=0
    trend=-1
    endif

    screener[signalLong or signalShort](signalLong as “long”,signalShort as “short”)

     


     

    //————————————//
    // Inputs
    //————————————//
    prd=15
    //atr=averagetruerange[14](close)
    //————————————//
    // Calculate Pivot High and Low
    //————————————//
    ph = high=highest[prd](high)
    pl = low=lowest[prd](low)
    //————————————//
    // Calculate Direction
    //————————————//
    if ph and pl=0 then
    dir=1
    elsif pl and ph=0 then
    dir=-1
    else
    dir=dir
    endif
    dirchanged=dir<>dir[1]
    //————————————//
    // Calculate ZizZag levels and x
    //————————————//
    if ph or pl then
    if dirchanged then
    if dir=1 then
    $zigzag[t+1]=highest[prd](high)
    $zigzagidx[t+1]=barindex
    $dir[t+1]=1
    t=t+1
    elsif dir=-1 then
    $zigzag[t+1]=lowest[prd](low)
    $zigzagidx[t+1]=barindex
    $dir[t+1]=-1
    t=t+1
    endif
    else
    if dir=1 and highest[prd](high)> $zigzag[t] then
    $zigzag[t]=highest[prd](high)
    $zigzagidx[t]=barindex
    elsif dir=-1 and lowest[prd](low)< $zigzag[t] then
    $zigzag[t]=lowest[prd](low)
    $zigzagidx[t]=barindex
    endif
    endif
    endif
    //————————————//
    // Draw ZigZag and Levels
    //————————————//

    if islastbarupdate then

    if $dir[t]=1 then

    if $zigzag[t]<$zigzag[t-2] then
    type=12 //IMPULSIVA
    else
    type=11 //ALTO
    endif
    elsif $dir[t]=-1 then
    if $zigzag[t]<$zigzag[t-2] then
    type=22 //BAJO
    else
    type=21 // CORRECTIVA
    endif
    endif

    endif
    //————————————//
    screener[dirchanged](type as “Tipo”)

    #254003 quote
    Iván González
    Moderator
    Master

    Aquí tienes.

    // -------------------------------------------------------------------------
    // ProScreener: SMC + ZigZag Combinado
    // Propósito: Detectar LH en estructura Alcista y HL en estructura Bajista
    // -------------------------------------------------------------------------
    
    // CONFIGURACIÓN
    prd = 10 // Periodo común para ambos indicadores
    
    // -------------------------------------------------------------------------
    // LÓGICA 1: SMART MONEY CONCEPTS (DETERMINACIÓN DE TENDENCIA)
    // -------------------------------------------------------------------------
    
    // Variables de estado para SMC
    ONCE os = 0
    ONCE mytop = 0
    ONCE mybot = 0
    ONCE topcross = 0
    ONCE botcross = 0
    ONCE smcTrend = 0 // 1 = Alcista, -1 = Bajista
    
    // Cálculo de Swings
    upper = highest[prd](high)
    lower = lowest[prd](low)
    
    IF high[prd] > upper THEN
       os = 0
    ELSIF low[prd] < lower THEN
       os = 1
    ELSE
       os = os[1]
    ENDIF
    
    IF os = 0 AND os[1] <> 0 THEN
       mytop = high[prd]
    ENDIF
    
    IF os = 1 AND os[1] <> 1 THEN
       mybot = low[prd]
    ENDIF
    
    // Gestión de Pivotes SMC
    IF mytop > 0 THEN
       topcross = 1
       topy = mytop
    ENDIF
    
    IF mybot > 0 THEN
       botcross = 1
       boty = mybot
    ENDIF
    
    // Determinación de Estructura (BOS/CHoCH)
    // Actualizamos la variable 'smcTrend' que usaremos como filtro
    IF close CROSSES OVER topy AND topcross = 1 THEN
       smcTrend = 1
       topcross = 0
    ENDIF
    
    IF close CROSSES UNDER boty AND botcross = 1 THEN
       smcTrend = -1
       botcross = 0
    ENDIF
    
    // -------------------------------------------------------------------------
    // LÓGICA 2: ZIGZAG SR (DETECCIÓN DE ONDAS)
    // -------------------------------------------------------------------------
    
    // Cálculo de Pivotes ZigZag
    ph = 0
    pl = 0
    
    IF high = highest[prd](high) THEN
       ph = 1
    ENDIF
    
    IF low = lowest[prd](low) THEN
       pl = 1
    ENDIF
    
    // Cálculo de Dirección
    ONCE dir = 0
    
    IF ph = 1 AND pl = 0 THEN
       dir = 1
    ELSIF pl = 1 AND ph = 0 THEN
       dir = -1
    ELSE
       dir = dir // Mantiene dirección previa
    ENDIF
    
    dirchanged = (dir <> dir[1])
    
    // Lógica de Arrays y Detección de Patrones
    senal = 0
    
    IF ph = 1 OR pl = 1 THEN
       
       IF dirchanged THEN
          // Se ha confirmado un nuevo tramo
          
          IF dir = 1 THEN
             // Nuevo Pico Detectado
             pivothigh3=pivothigh2
             
             pivothigh2=pivothigh1
             
             pivothigh1 = highest[prd](high)
             
             
             // CONDICIÓN DE COMPRA: Estructura Alcista (SMC) + Onda LH (ZigZag)
             // LH (Lower High) = Pico actual menor que el pico anterior (t-2)
             IF smcTrend = 1 AND pivothigh1 < pivothigh3 THEN
                senal = 1 // Señal Alcista
             ENDIF
             
          ELSIF dir = -1 THEN
             // Nuevo Valle Detectado
             pivotlow3=pivotlow2
             
             pivotlow2=pivotlow1
             
             pivotlow1 = lowest[prd](low)
             
             // CONDICIÓN DE VENTA: Estructura Bajista (SMC) + Onda HL (Higher Low)
             // HL (Higher Low) = Valle actual mayor que el valle anterior (t-2)
             IF smcTrend = -1 AND pivotlow1 > pivotlow3 THEN
                senal = 2 // Señal Bajista
             ENDIF
             
          ENDIF
          
       ELSE
          // Actualización del tramo actual (si el precio sigue extendiendo el movimiento)
          IF dir = 1 AND highest[prd](high) > pivothigh1 THEN
             pivothigh1 = highest[prd](high)
             
          ELSIF dir = -1 AND lowest[prd](low) < pivotlow1 THEN
             pivotlow1 = lowest[prd](low)
             
          ENDIF
       ENDIF
    ENDIF
    
    // ----------------------------------------------
    // SCREENER
    // ----------------------------------------------
    SCREENER[senal > 0](senal AS "Senal")
    
    #254004 quote
    NicoGB67
    Participant
    New

    Buenos días, quería hacer un inciso sobre mi petición; me he dado cuenta mirando en tiempo real el gráfico que cuando se está formando una línea zig zag por ejemplo LH a la que yo renombro “Onda Impulsiva”, esta no se queda con el LH fijado hasta que no comienza otro cambio de línea zig zag contraria y es etiquetada con un HL, porque mientras no se dé dicho HL, el zig zag podría seguir bajando y pasar de LH (onda Impulsiva) a LL (Bajo o suelo); (no sé si me explico bien), por lo que mi petición sería que se diera un LH (Onda Impulsiva) una vez fijado tras una cambio de zig zag con el HL, ya que mientras no salga dicho HL se puede dar la vuelta y no llegar a ser LH fijo.

    pd.- no veas el rollo que he escrito, me temo no me entiendan.

    #254005 quote
    NicoGB67
    Participant
    New

    Hola Iván, muchas gracias por tu trabajo y responder con tanta rapidez, pero creo que algo no va bien, al menos he puesto en mi gráfico el ProScreener que me has puesto y no me sale ningún aviso, en cambio busco algunos valores y si que se está produciendo lo que yo pedía, no sé si puedo enviar un archivo con el gráfico para que puedas ver lo que digo; ahora mismo tengo por ejemplo la  empresa ELECNOR dónde el 7 de Octubre se creo un BOS, el pasado 21 de Noviembre se ha creado un LH ya que hoy mismo el zig zag que sube, ha pintado un HL confirmando dicho HL. No sé si el ProScreener que has hecho es de alguna manera diferente y crea una alerta que puede que sea incluso mejor, no lo sé porque aún no me llego la posibilidad de comprobarlo hasta que veo algún aviso, saludos.

    #254009 quote
    NicoGB67
    Participant
    New

    Hola de nuevo Iván, pues he estado casi toda la mañana comprobando como evolucionaba el ProScreener en 1 min. EUR/USD (lo puse en esa temporalidad para tener más señales)  y falla, no me avisa cuando espero que me avise, y cuando alguna vez avisa lo hace en algo que no le pido como al darse un HH, además cuando sale el mensaje, este dura segundos, por lo cual si voy al aseo por ejemplo, al llegar no me entero de si pasó algo, te agradezco todo tu esfuerzo pero puede que mi solicitud entiendo sea complicado de llevar a buen puerto.

    #254120 quote
    NicoGB67
    Participant
    New

    Buenos días, creo que el ProScreener falla debido a qué no se tuvo en cuenta de que el indicador ZigZag_SR cuando se está iniciando es cambiable, me explico, si por ejemplo al formar un HH (alto) al comenzar a bajar el Zig Zag del indicador nombra la línea de bajada LH, pero dicho LH puede variar y  puede cambiar a  LL (bajo) si rompe el suelo anterior del Zig Zag, si por el contrario se iniciara un Zig Zag hacia arriba sin haber roto soporte, éste no será etiquetado como LH (onda impulsiva) para SIEMPRE hasta que el Zig Zag que sube se le etiquete con un HL (onda correctiva); y por lo que a mí me gusta este indicador es porque casi siempre dicho HL romperá el máximo anterior y por ende ya no será HL (onda correctiva), se renombrará como HH (alto); creo que me expliqué mejor que en anteriores post, gracias.

    #254126 quote
    Iván González
    Moderator
    Master

    Buff… creo que hacer lo que pides sería mejor crear de nuevo el indicador/screener. Esto serían varias horas de trabajo…
    Intentaré hacerlo, pero ahora mismo la carga de trabajo que tengo es importante.

    NicoGB67 thanked this post
    #254128 quote
    NicoGB67
    Participant
    New

    Hola Iván, no es mi intención que tengas que pegarte horas haciendo el ProScreener y menos con trabajo acumulado que tienes, cuando puedas y si lo quieres hacer, no deseo que te sientas obligado, gracias por todo, saludos.

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

ProScreener de dos indicadores


Soporte ProScreener

New Reply
Author
author-avatar
NicoGB67 @nicogb67 Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by NicoGB67
1 month, 4 weeks ago.

Topic Details
Forum: Soporte ProScreener
Language: Spanish
Started: 11/26/2025
Status: Active
Attachments: No files
Logo Logo
Loading...