DeMark Pivot Point

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35567 quote
    bolsatrilera
    Participant
    Master

    Estoy intentando adaptar a Prorealtimev10.3 este ineteresante indicador aparecido en la plataforma Tradingview :https://es.tradingview.com/script/5ylLrNiE-DeMark-Pivot-Points/

    ¿Alguién puede ayudar en la adaptación ? no doy con ello.El código es:

    ////////////////////////////////////////////////////////////
    // Copyright by HPotter v1.0 15/05/2017
    // Demark Pivot Points start with a different base and use different formulas for support
    // and resistance. These Pivot Points are conditional on the relationship between the
    // close and the open.
    ////////////////////////////////////////////////////////////
    study(title=”DeMark Pivot Points”, shorttitle=”Pivot Point”, overlay = true)
    width = input(2, minval=1)
    xHigh = security(tickerid,”D”, high[1])
    xLow = security(tickerid,”D”, low[1])
    xClose = security(tickerid,”D”, close[1])
    xOpen = security(tickerid,”D”, open[1])
    xP = iff(xClose < xOpen, xHigh + (2 * xLow) + xClose,
    iff(xClose > xOpen, (2 * xHigh) + xLow + xClose,
    iff(xClose == xOpen, xHigh + xLow + (2 * xClose), xClose)))
    xPP = xP / 4
    vR1 = xP / 2 – xLow
    vS1 = xP / 2 – xHigh
    plot(xPP, color=blue, title=”PP”, style = circles, linewidth = width)
    plot(vS1, color=#009600, title=”S1″, style = circles, linewidth = width)
    plot(vR1, color=#ff0000, title=”R1″, style = circles, linewidth = width)

    #35590 quote
    Nicolas
    Keymaster
    Master

    ¿Encontraste este código de los puntos del pivote del demark en la tela, es exacto con el de tradingview?

    IF DCLOSE(1) > DOPEN(1) THEN
         
         phigh = DHIGH(1) + (DCLOSE(1) - DLOW(1)) / 2
         plow = (DLOW(1) + DCLOSE(1)) / 2
         
    ELSIF DCLOSE(1) < DOPEN(1) THEN
         
         phigh = (DHIGH(1) + DCLOSE(1)) / 2
         plow = DLOW(1) - (DHIGH(1) - DCLOSE(1)) / 2
         
    ELSE
         
         phigh = DCLOSE(1) + (DHIGH(1) - DLOW(1)) / 2
         plow = DCLOSE(1) - (DHIGH(1) - DLOW(1)) / 2
         
    ENDIF
    
    RETURN phigh AS"DEMARK R", plow AS"DEMARK S"
    #35674 quote
    bolsatrilera
    Participant
    Master

    Buenos días Nicolas.Ese código me sale de la misma forma que el intento de traducción del código de Traingview que tengo,el problema es que visualmente no salen lineas paralelas como en el de Tradingview y no sé como hacerlo….

    REM DEMARK PIVOT POINTS
    //adaptación para Prorealtimev10.3
    //indicador aparecido en la plataforma Tradignview
    ////////////////////////////////////////////////////////////
    //  Copyright by HPotter v1.0 15/05/2017
    // Demark Pivot Points start with a different base and use different formulas for support
    // and resistance. These Pivot Points are conditional on the relationship between the
    // close and the open.
    ///////////////////////////////////////////////////////////
    
    xHigh  =  high[1]
    xLow   = low[1]
    xClose = close[1]
    xOpen =  open[1]
    
    
    if xClose < xOpen then
    xP= xHigh + (2 * xLow) + xClose
    endif
    
    if xClose > xOpen then
    xP=(2 * xHigh) + xLow + xClose
    endif
    
    if xClose = xOpen then
    xP= xHigh + xLow + (2 * xClose)
    endif
    
    xPP = xP / 4
    vR1 = xP/ 2 - xLow
    vS1 = xP / 2 - xHigh
    
    
    return xPP coloured(0,0,255)style(point,2)as "PP",vS1 coloured(0,100,0)style(point,2)as "S1",vR1 coloured(255,0,0)style(point,2)as "R1"
    
    #35682 quote
    Nicolas
    Keymaster
    Master

    Si desea obtener líneas en lugar de puntos, debe eliminar todos los “style(point,2)” en tu código.

    #35698 quote
    bolsatrilera
    Participant
    Master

    creo que ahora lo comprendo Nicolas.Para que se vea como en el original  hay que tener intradia (tiempo real).Lo mismo ocurre con el indicador de la biblioteca  Pivot Point (Dayly)

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

DeMark Pivot Point


ProBuilder: Indicadores y Herramientas

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by bolsatrilera
8 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 05/15/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...