Conversion DMI OScillator

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #90912 quote
    Vinks_o_7
    Participant
    Master

    Hello
    Ci-joint code du DMI Oscillator vu sur Tradingview si il y a une bonne âme. Merci
    Il est inspiré de cela: “The DMI Stochastic” by Barbara Star, PhD. Technical Analysis of Stocks & Commodities, January 2013.

    //DMI Oscillator
    // Wells Wilders MA
    wwma(l,p) =>
    wwma = (nz(wwma[1]) * (l - 1) + p) / l
    
    // Inputs
    DMIlength = input(14)
    Avglength = input(2)
    
    // Calc
    hiDiff = high - high[1]
    loDiff = low[1] - low
    plusDM = (hiDiff > loDiff) and (hiDiff > 0) ? hiDiff : 0
    minusDM = (loDiff > hiDiff) and (loDiff > 0) ? loDiff : 0
    ATR = wwma(DMIlength, tr)
    PlusDI = 100 * wwma(DMIlength,plusDM) / ATR
    MinusDI = 100 * wwma(DMIlength,minusDM) / ATR
    osc = PlusDI - MinusDI
    col = osc >= 0 ? #99EF0E : #FF0064
    // Plots
    plot(osc,color=col, style=histogram, linewidth=2)
    plot(wwma(Avglength,osc), color=#0EAAEF,title="DI+")
    DMI-oscillator.png DMI-oscillator.png
    #91085 quote
    Nicolas
    Keymaster
    Master

    Pour les demandes de conversion de code d’autres plateformes de trading, merci de respecter les prérogatives de cette page la prochaine fois : Demande de conversion gratuite

    Je m’y penche rapidement, dans la négative merci de me le rappeler vers la fin de semaine.

    #91185 quote
    Plscap
    Participant
    Veteran

    Bonjour,

    J’ai ce DMI en stock mais je ne sais pas du tout si c’est le même que la version TradingView et donc s’il convient.

    Je le post malgré tout.

    Dynamic-Momentum-Index.itf
    #91197 quote
    Nicolas
    Keymaster
    Master

    Il s’agit ni plus ni moins d’un stochastique appliqué au DMI selon cette description:

    Le stochastique DMI utilise la formulation de base pour un oscillateur stochastique 10, 3, 3 trouvé dans la plupart des progiciels de trading, mais remplace le prix de clôture de la barre des prix par la valeur de l’oscillateur DMI à 10 périodes.

    Donc rapidement on pourrait tester:

    osc = stochastic[10,3](di[10])
    avg = average[3](osc)
    
    return osc style(histogram),avg style(line,2)

    (non testé)

    #91214 quote
    Nicolas
    Keymaster
    Master

    A more complete and colorful version is now available here: DMI Stochastic Oscillator

    DMI-stochastic.png DMI-stochastic.png
    #91254 quote
    Nicolas
    Keymaster
    Master

    I think that there’s a problem with the stochastic indicator, I made a technical report to PRT, I will update the code asap.

    #91259 quote
    Nicolas
    Keymaster
    Master

    I have entirely recoded the indicator with the help of a tradingview/pinescript code, and updated the library version: DMI Stochastic Oscillator

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

Conversion DMI OScillator


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Vinks_o_7 @vinks_o_7 Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Nicolas
7 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/08/2019
Status: Active
Attachments: 3 files
Logo Logo
Loading...