Conversion Indicateur Enveloppe d’elder

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #196148 quote
    maxlysmaxlys
    Participant
    Senior

    Bonjour à tous,

    Je n’ai pas su trouver si l’indicateur enveloppe sur prix suivant ELDER a été proposé sur le site.

    Si non, est-il possible de retranscrire le code ci dessous de TV ? merci

     

    //@version=3
    study("Elder AutoEnvelope", overlay = true)
    myema = input(26, title="Center EMA", minval = 0)
    lookback = input(100, title="Lookback", minval = 0)
    multiplier = input(2, title="Multiplier", minval = 0, step = 0.01)
    shortema = input(13, title="Short EMA", minval=1)
    mode = input(title="Use Close?", type=bool, defval=true)
    
    centerline = ema(close, myema)
    myvar = mode == true ? abs(close - centerline) : max(abs(high - centerline), abs(low - centerline))
    myvars = myvar * myvar
    mymov = sqrt(sma(myvars, lookback))
    
    newmax = max(mymov, max(mymov[1], max(mymov[2], max(mymov[3], max(mymov[4], mymov[5] ) ) ) ) )
    
    upper = centerline + (newmax * multiplier)
    lower = centerline - (newmax * multiplier)
    
    plot(centerline, title="Center EMA", color=#FFFF00, linewidth=3)
    plot(ema(close,shortema), title="Short EMA", color=#c900ff, linewidth=3)
    plot(upper, title="Upper Channel", linewidth=3)
    plot(lower, title="Lower Channel", linewidth=3)
    
    #196256 quote
    NicolasNicolas
    Keymaster
    Legend

    Ci-joint le code des enveloppes d’Elder pour ProRealTime:

    myema = 26 //Center EMA
    lookback = 100 //Lookback
    multiplier = 2 //Multiplier
    shortema = 13 //Short EMA
    mode = 1 //Use Close?
    
    centerline = average[myema,1](close)
    if mode then
    myvar = abs(close - centerline) 
    else
    myvar = max(abs(high - centerline), abs(low - centerline))
    endif
    myvars = myvar * myvar
    mymov = sqrt(average[lookback](myvars))
    
    newmax = max(mymov, max(mymov[1], max(mymov[2], max(mymov[3], max(mymov[4], mymov[5] ) ) ) ) )
    
    upper = centerline + (newmax * multiplier)
    lower = centerline - (newmax * multiplier)
    
    return centerline as "Center EMA" style(line,3),average[shortema,1](close) as "Short EMA" style(line,3),upper as "Upper Channel" style(line,3),lower as "Lower Channel" style(line,3)
    elder-envelopes.png elder-envelopes.png
    #196487 quote
    maxlysmaxlys
    Participant
    Senior

    merci Nicolas

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

Conversion Indicateur Enveloppe d’elder


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
maxlys @maxlys Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by maxlysmaxlys
4 years, 2 months ago.

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