DETRENDED PRICE OSCILLATOR (DPO)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #13674 quote
    larouedegannlarouedegann
    Participant
    Master

    Bonjour,

    Je souhaite utiliser la commande DPO dans un trading automatique.

    Celle-fonctionne très bien en backtest. Mais dès que je veux mettre en place le trading automatique,j’ai un refus pure et simple

    de prorealtime….

    Je l’utilise en TIMEFRAME 4H.

    Si quelqu’un à une idée

    RAPPEL : DPO = cours de cloture – MMp(P/2-1)

    P= période choisie

    MMp = Moyenne Mobile de P que l’on a appliqué sur un nombre x de jours

    #13675 quote
    larouedegannlarouedegann
    Participant
    Master

    Voici ce que je souhaite utiliser en 4H

     

    once rr=1
    mb=average[20](typicalprice)
    k=48
    n=(k*2)-4
    p=(n/2)-1
    h1=DPO[n](high)

    moyh=high-h1
    hi=(moyh-moyh[1]+(high[p])/n)*n
    hi=(round(hi*100))/100
    l1=DPO[n](low)

    moyl=low-l1
    lo=(moyl-moyl[1]+(low[p])/n)*n
    lo=(round(lo*100))/100
    clo1=DPO[n](close)

    #13677 quote
    larouedegannlarouedegann
    Participant
    Master

    et ce que j’ai fait mais je n’obtient pas le meme résultat

    once rr=1
    mb=average[20](typicalprice)
    k=48
    n=(k*2)-4
    p=(n/2)-1

    avg1 = Average[n](high)
    r = round(n/2+1)
    MyDPO1 = high-avg1[r]
    h1 = MyDPO1
    moyh=high-h1
    hi=(moyh-moyh[1]+(high[p])/n)*n
    hi=(round(hi*100))/100
    avg2 = Average[n](low)
    MyDPO2 = low-avg2[r]
    l1 = MyDPO2
    moyl=low-l1
    lo=(moyl-moyl[1]+(low[p])/n)*n
    lo=(round(lo*100))/100

    avg3 = Average[n](close)
    MyDPO3 = close-avg3[3]
    clo1 = MyDPO3
    moyc=close-clo1
    clot=(moyc-moyc[1]+(close[p])/n)*n
    clot=(round(clot*100))/100

    #13684 quote
    NicolasNicolas
    Keymaster
    Legend

    Merci d’utiliser le bouton adéquat pour poster du code  😉

    Le DPO utilise les données du futur, on ne peut donc pas l’utiliser pour le trading automatique. C’est un sujet déjà largement abordé sur les forums, tu n’ai pas le premier à poser des questions sur l’utilisation du DPO ! 😊

    #13702 quote
    larouedegannlarouedegann
    Participant
    Master

    Merci Nicolas,

    Est+ce que tu connaitrais la fomule dpo avec les moyennes mobiles passées?

    #13722 quote
    NicolasNicolas
    Keymaster
    Legend

    La fonction recherche est ton ami  😊

    http://www.prorealcode.com/topic/dpo/

    #13741 quote
    larouedegannlarouedegann
    Participant
    Master

    C-est ce que j’avais fait,mais j’ai un bog sur

    h1 = Mydpo[n](high)

    il n’accepte pas

    DEFPARAM CUMULATEORDERS = FALSE
    
    Positionsize = 2
    
    
    once rr=1
    mb=average[20](typicalprice)
    k=48
    n=(k*2)-4
    p=(n/2)-1
    
    
    z = 14
    
    avg = average[p](close)
    r = round(z/2) +1
    b= customclose - avg[r]
    Mydpo=b
    
    
    h1=myDPO[n](high)
    moyh=high-h1
    hi=(moyh-moyh[1]+(high[p])/n)*n
    hi=(round(hi*100))/100
    
    l1=mydpo[n](low)
    moyl=low-l1
    lo=(moyl-moyl[1]+(low[p])/n)*n
    lo=(round(lo*100))/100
    
    clo1=mydpo[n](close)
    moyc=close-clo1
    clot=(moyc-moyc[1]+(close[p])/n)*n
    clot=(round(clot*100))/100
    #13747 quote
    NicolasNicolas
    Keymaster
    Legend

    Je ne sais pas vraiment ce que tu cherches à faire, mais la bonne formule pour le calcul du DPO sur le passé est celle-ci :

    // **** DPO of past moving average and not future ones :
    
    p = 14
    
    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"
    #13750 quote
    larouedegannlarouedegann
    Participant
    Master

    tu as raison c’est un peu confus,je vais refaire un topic complet sur ce que je souhaite faire.

Viewing 9 posts - 1 through 9 (of 9 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

DETRENDED PRICE OSCILLATOR (DPO)


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 8 replies,
has 2 voices, and was last updated by larouedegannlarouedegann
10 years ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 09/24/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...