Moyenne mobile de Uhl sur oscillateur et non sur prix

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #173334 quote
    DenisDenis
    Participant
    Senior

    Bonjour à tous,

    Je cherche à utiliser la moyenne mobile de Uhl (code établi par Nicolas ici )

    non pas sur les prix mais sur un oscillateur constitué par la différence de deux indicateurs de momentum (moyenne mobile et filtre de Butterworth).

    Cf. code ci-après

    Malgré tous mes efforts, la moyenne mobile de Uhl (CA)  reste désespérément à zéro.

    Si quelqu’un a une idée d’une modification à faire sur le code, je lui en serai reconnaissant.

    Bonne journée à tout le monde.

    //OSCILLATEUR
    
    Series=customclose
    
    Period = MAX(Period,1)
    // NumBars = 4
    NumBars = 4
    LR = LinearRegression[NumBars](Series)
    
    AFR = ExponentialAverage[Period](LR)
    
    IF BarIndex < 2 THEN
    Butterworth = Close
    ELSE
    Butterworth = Butterworth[1] - (Butterworth[2] / (G*3.414)) + (Close/(G*3.414))
    ENDIF
    
    Indic=(AFR-Butterworth)*100/Series
    
    
    //SIGNAL - Corrected MA by A. UHL
    
    if(barindex>Period3) then
    n=Period3
    SA = average[n](Indic)
    v1 = SQUARE(STD[n](Indic))
    v2 = SQUARE(CA[1]-SA)
     
    if(v2<v1) then
    k=0
    else
    k=1-v1/v2
    CA=CA[1]+K*(SA-CA[1])
    endif
    endif
    
    Return Indic coloured by momentum(Indic[1]) as "Indic", CA as "Signal"
    #173336 quote
    DenisDenis
    Participant
    Senior

    Je crois que j’ai fini par trouver, il faut mettre ligne 23

    if barindex>Period3*3 then

    Merci à ceux qui avaient commencé à regarder et bon apm à tout le monde

    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Moyenne mobile de Uhl sur oscillateur et non sur prix


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Denis @desclos Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by DenisDenis
5 years, 2 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 07/08/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...