DPO borné 0 à 100

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192348 quote
    Pensera
    Participant
    Junior

    Bonjour,
    Est-il possible de borner le DPO de zéro à 100? comme un RSI par exemple…
    J’ai collé le code du DPO de Nicolas
    D’avance merci pour vos réponses
    Arnaud

    // **** DPO of past moving average and not future ones :
     
    p = p1
     
    avg = average[p](customclose)
    r = round(p/2) +1
    b = customclose - avg[r]
    myDPO = b
     
    RETURN myDPO as "Detrented Price Oscillator of past datas", 0 coloured(10,10,255) as "0"
    #192352 quote
    Nicolas
    Keymaster
    Master

    Pour cela il faut le normaliser, donc choisir une période de normalisation que j’ai appelé “period” dans le code ci-dessous.

    // **** DPO stochastic
    
    p = 10
    
    avg = average[p](customclose)
    r = round(p/2) +1
    b = customclose - avg[r]
    
    //normalisation 
    period = 100
    hh = highest[period](b)
    ll = lowest[period](b)
    norm = (b-ll)/(hh-ll)*100
     
    RETURN norm

    C’est donc la stochastique du DPO.

    dpo-stochastic.png dpo-stochastic.png
    #192365 quote
    Pensera
    Participant
    Junior

    Bonjour Nicolas

    merci beaucoup !

    je posterais plus tard ce à quoi cela va servir.

    bonne journée !

    #192371 quote
    Nicolas
    Keymaster
    Master

    Merci par avance pour ton retour à ce sujet, c’est toujours intéressant de comprendre le pourquoi d’une demande 🙂

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

DPO borné 0 à 100


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Pensera @pensera Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
3 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/27/2022
Status: Active
Attachments: 1 files
Logo Logo
Loading...