DPO borné 0 à 100

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192348 quote
    PenseraPensera
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    PenseraPensera
    Participant
    Junior

    Bonjour Nicolas

    merci beaucoup !

    je posterais plus tard ce à quoi cela va servir.

    bonne journée !

    #192371 quote
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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 NicolasNicolas
4 years, 4 months ago.

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