Conversión indicador Wedge Maker por Veryfid

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243042 quote
    MaricarmenMaricarmen
    Participant
    Veteran

    Hola Iván:

    Sería posible hacer la conversión de este bonito indicador de Veryfid.

    https://es.tradingview.com/script/f1Lx4HDx-Wedge-Maker/

    Muchísimas gracias,

    #243050 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Aquí lo tienes:

    //-------------------------------------------------//
    //PRC WEDGE MAKER
    //version = 0
    //24.01.25
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //-------------------------------------------------//
    // Inputs
    //-------------------------------------------------//
    // Pivots length
    lenght1=20
    lenght2=20
    // Reference to start draw
    astart=2
    aend=0
    bstart=3
    bend=0
    // Source to pivot calculation
    usesrc=0
    if usesrc then
    src1 = low
    src2 = high
    else
    src1 = close
    src2 = close
    endif
    //-------------------------------------------------//
    // Calculate Pivots
    //-------------------------------------------------//
    // Pivot High
    ph1 = src2 < src2[lenght1]
    ph2 = highest[lenght1](src2) < src2[lenght1]
    ph3 = src2[lenght1] > highest[lenght1](src2)[lenght1+1]
    if ph1 and ph2 and ph3 then
    $pH[t+1] = src2[lenght1]
    $pHx[t+1] = barindex[lenght1]
    t=t+1
    endif
    // Pivot Low
    pl1 = src1 > src1[lenght2]
    pl2 = lowest[lenght2](src1) > src1[lenght2]
    pl3 = src1[lenght2] < lowest[lenght2](src1)[lenght2+1]
    if pl1 and pl2 and pl3 then
    $pL[z+1] = src1[lenght2]
    $pLx[z+1] = barindex[lenght2]
    z=z+1
    endif
    //-------------------------------------------------//
    // Calculate Trend Lines
    //-------------------------------------------------//
    if islastbarupdate then
    if t>astart then
    ux1=$phx[t-aend]
    uy1=$ph[t-aend]
    ux2=$phx[t-astart]
    uy2=$ph[t-astart]
    //(x-x1)/(x2-x1) = (y-y1)/(y2-y1)
    ux=barindex+20
    uy=(ux-ux1)/(ux2-ux1)*(uy2-uy1)+uy1
    drawsegment(ux2,uy2,ux,uy)coloured("green")
    endif
    if z>bstart then
    dx1=$plx[z-bend]
    dy1=$pl[z-bend]
    dx2=$plx[z-bstart]
    dy2=$pl[z-bstart]
    //(x-x1)/(x2-x1) = (y-y1)/(y2-y1)
    dx=barindex+20
    dy=(dx-dx1)/(dx2-dx1)*(dy2-dy1)+dy1
    drawsegment(dx,dy,dx2,dy2)coloured("red")
    endif
    endif
    return
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Conversión indicador Wedge Maker por Veryfid


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Maricarmen @maricarmen Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 7 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 01/23/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...