Retrocesos de Fibonacci autogenerados DTFX

Forums ProRealTime foro Español Soporte ProScreener Retrocesos de Fibonacci autogenerados DTFX

Viewing 1 post (of 1 total)
  • #255213

    Buenas Noches:

    Se podría hacer Screener de este indicador indicando Zonas de Soportes y Resistencias.

    Gracias

    //————————————–
    //PRC_DTFX Algo Zones [LuxAlgo]
    //version = 0
    //22.12.2025
    //Iván González @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //————————————–
    // — Parameters —
    //————————————–
    prd = 10
    fibLevel1 = 0.3
    fibLevel2 = 0.5
    fibLevel3 = 0.7
    //————————————–
    // — Pivot Detection —
    //————————————–
    // Pivot high
    IF high[prd] = HIGHEST[2 * prd + 1](high) THEN
       ph = high[prd]
       phx = BARINDEX[prd]
       boxBreak = 0
       drawpoint(phx,ph,1)coloured(“grey”)
    ENDIF
    // Pivot Low
    IF low[prd] = LOWEST[2 * prd + 1](low) THEN
       pl = low[prd]
       plx = BARINDEX[prd]
       boxBreak = 0
       drawpoint(plx,pl,1)coloured(“grey”)
    ENDIF
    //————————————–
    // — Breakout Logic —
    //————————————–
    conditionUp = close CROSSES OVER ph
    conditionDown = close CROSSES UNDER pl
    IF (conditionUp OR conditionDown) AND boxBreak = 0 THEN
       // A new zone is born
       boxBreak = 1
       zoneActive = 1
       // Determine the box origin
       IF phx < plx THEN
          startX = phx
       ELSE
          startX = plx
       ENDIF
       // Store levels for the continuous lines
       rangeSize = ph – pl
       // Calculate Fibonacci levels for this specific zone
       activeFib1 = pl + (rangeSize * fibLevel1)
       activeFib2 = pl + (rangeSize * fibLevel2)
       activeFib3 = pl + (rangeSize * fibLevel3)
       // Set colors based on breakout direction
       IF conditionUp THEN
          // Bullish colors (Greenish)
          r = 8
          g = 153
          b = 129
       ELSE
          // Bearish colors (Reddish)
          r = 242
          g = 54
          b = 69
       ENDIF
       // Draw the static rectangle (from origin to breakout bar)
       DRAWRECTANGLE(startX, ph, BARINDEX, pl) COLOURED(r, g, b, 50) BORDERCOLOR(0, 0, 0, 0)
       // Update the start bar for the moving lines
       lastBreakoutBar = BARINDEX
    ENDIF
    //————————————–
    // — Continuous Fibo Line Projection —
    //————————————–
    IF zoneActive = 1 AND BARINDEX > lastBreakoutBar THEN  // Draw segments from the previous bar to the current one to create a continuous line
       DRAWSEGMENT(BARINDEX[1], activeFib1, BARINDEX, activeFib1) STYLE(DOTTEDLINE, 1) COLOURED(r, g, b)
       DRAWSEGMENT(BARINDEX[1], activeFib2, BARINDEX, activeFib2) STYLE(LINE, 1) COLOURED(r, g, b)
       DRAWSEGMENT(BARINDEX[1], activeFib3, BARINDEX, activeFib3) STYLE(DOTTEDLINE, 1) COLOURED(r, g, b)
    ENDIF
    //————————————–
    // — Internal box lines —
    //————————————–
    IF (conditionUp OR conditionDown) AND boxBreak = 1 THEN
       DRAWSEGMENT(startX, activeFib1, BARINDEX, activeFib1) STYLE(DOTTEDLINE, 1) COLOURED(r, g, b)
       DRAWSEGMENT(startX, activeFib2, BARINDEX, activeFib2) STYLE(LINE, 1) COLOURED(r, g, b)
       DRAWSEGMENT(startX, activeFib3, BARINDEX, activeFib3) STYLE(DOTTEDLINE, 1) COLOURED(r, g, b)
    ENDIF
    //————————————–
    RETURN
Viewing 1 post (of 1 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login