Demark pivot point

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #211932 quote
    luxrun
    Participant
    Master

    Con una ricerca sul sito ho trovato un codice dei pivot point Demark che vorrei fosse modificato in alcuni punti, io non ne sono capace. Si tratta di effettuare il calcolo a chiusura della barra di fine mese e avere sul grafico dei prezzi il tracciato fisso per il mese in corso. Quindi, in altri termini, chiedo di effettuare il calcolo e le condizioni l’ultimo giorno del mese, a chiusura, e di avere per tutto il mese successivo la proiezione sui prezzi. Questo sotto è il codice reperito, che cambia ogni giorni i pivot point. Grazie

    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”

    #211937 quote
    robertogozzi
    Moderator
    Master

    Prova questo:

    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.
    ///////////////////////////////////////////////////////////
    ONCE HH = high
    ONCE LL = low
    ONCE OO = open
    ONCE CC = close
    IF OpenMonth <> OpenMonth[1] THEN
    OO     = open
    HH     = high
    LL     = low
    CC     = close
    xHigh  = HH[1]
    xLow   = LL[1]
    xClose = CC[1]
    xOpen  = OO[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
    ELSE
    HH = max(HH,high)
    LL = min(LL,low)
    CC = close
    ENDIF
    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"
    #211948 quote
    luxrun
    Participant
    Master

    Perfetto, Roberto, valori precisi al millesimo con il mio foglio excel. Grazie mille!

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

Demark pivot point


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
luxrun @luxrun Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by luxrun
2 years, 12 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 03/22/2023
Status: Active
Attachments: No files
Logo Logo
Loading...