formule points pivots "quarterly"

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #51149 quote
    Ice
    Participant
    New

    Bonjour,

    Dans l’une des files de ce forum , j’ai vu que les points pivots “quarterly” avaient déjà été codés et faisaient l’objet d’un post.

    Mais (mal réveillé ??…) je n’ai pu le trouver (après recherche méticuleuse!).

    Si quelqu’un veut bien mettre le lien de ce post ?

    D’avance, merci.

    Ice

    #51187 quote
    Nicolas
    Keymaster
    Master

    Quarterly high/low retrouvé dans ce post: https://www.prorealcode.com/topic/monthly-high-low-close-indicator/#post-38207

    On peut partir de ce code pour en faire des points pivots.

    #51188 quote
    jhonhamy
    Participant
    Average

    Bonjour,

    Tu recherche ce genre de code ?

    John

    Once mode = 0
    ////ONCE PIVOT TRIMESTRIAL////
    Once lasttrimestrialBarIndex = 0
    Once trimestrialHigh = undefined
    Once trimestrialLow = undefined
    Once trimestrialPivot = undefined
    Once trimestrialR1 = undefined
    Once trimestrialS1 = undefined
    Once trimestrialR2 = undefined
    Once trimestrialS2 = undefined
    Once trimestrialR3 = undefined
    Once trimestrialS3 = undefined
    
    ////PIVOT TRIMESTRIAL////
    If month<>month[1] then
    if month=4 or month=7 or month=10 or month= 0 then
    trimestrialHigh = Highest[BarIndex - lasttrimestrialBarIndex](High)[1]
    trimestrialLow = Lowest[BarIndex - lasttrimestrialBarIndex](Low)[1]
    lasttrimestrialBarIndex = BarIndex
    
    If mode = 0 then
    trimestrialPivot = (trimestrialHigh + trimestrialLow + Close[1]) / 3
    Elsif mode = 1 then
    trimestrialPivot = (Open + trimestrialHigh + trimestrialLow + Close[1]) / 4
    Elsif mode = 2 then
    trimestrialPivot = (trimestrialHigh + trimestrialLow + Close[1]*2) / 4
    Else
    trimestrialPivot = (Open*2 + trimestrialHigh + trimestrialLow) / 4
    Endif
    trimestrialR1 = 2*trimestrialPivot - trimestrialLow
    trimestrialS1 = 2*trimestrialPivot - trimestrialHigh
    trimestrialR2 = trimestrialPivot + (trimestrialHigh - trimestrialLow)
    trimestrialS2 = trimestrialPivot - (trimestrialHigh - trimestrialLow)
    trimestrialR3 = trimestrialR1 + (trimestrialHigh - trimestrialLow)
    trimestrialS3 = trimestrialS1 - (trimestrialHigh - trimestrialLow)
    endif
    endif
    
    
    Return  trimestrialPivot coloured(217, 255, 3) as "Monthly P", trimestrialR1 coloured(46, 134, 193) as "Monthly R1", trimestrialS1 coloured(46, 134, 193) as "Monthly S1", trimestrialR2 coloured(0,0,0) as "Monthly R2", trimestrialS2 coloured(0,0,0) as "Monthly S2", trimestrialR3 coloured(250, 47, 47) as "Monthly R3", trimestrialS3 coloured(250, 47, 47) as "Monthly S3"
    Nicolas thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

formule points pivots "quarterly"


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Ice @ice Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/31/2017
Status: Active
Attachments: No files
Logo Logo
Loading...