Conversione dell'indicatore AEMA dal software di trading Tradestation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #113576 quote
    matteo zanottimatteo zanotti
    Participant
    New

    Codice su Tradestation dell’indicatore Adaptive Exponential Moving Average, pubblicato sul TASC di Aprile del 2018 di Vitali Apirine.

    Indicator: Adaptive Exponential Moving Average
    // Adaptive EMA Indicator
    // TASC APR 2018
    // Vitali Apirine
    inputs:
    Period( 10 ),
    PDS( 10 ) ;

    variables:
    AEMA( 0 ) ;

    AEMA = _AEMA( Period, PDS ) ;

    Plot1( AEMA, “AEMA” ) ;

    Strategy: Adaptive Exponential Moving Average
    // Adaptive EMA Strategy
    // TASC APR 2018
    // Vitali Apirine

    inputs:
    Period( 10 ),
    PDS( 10 ),
    EMALength( 10 ) ;

    variables:
    AEMA( 0 ),
    EMA( 0 ) ;

    AEMA = _AEMA( Period, PDS ) ;
    EMA = XAverage( Close, EMALength ) ;

    if AEMA crosses over EMA then
    Buy next bar at Market
    else if EMA crosses over AEMA then
    SellShort next bar at Market ;

    Function: _AEMA
    // Adaptive EMA Function
    // TASC APR 2018
    // Vitali Apirine
    inputs:
    Periods( numericsimple ),
    PDS( numericsimple ) ;

    variables:
    MLTP1( 2 / ( Periods + 1 ) ),
    MLTP2( 0 ),
    Rate( 0 ) ;

    MLTP2 = AbsValue( ( Close – Lowest( Low, PDS ) )
    – ( Highest( High, PDS ) – Close )) / ( Highest( High, PDS )
    – Lowest( Low, PDS ) ) ;

    Rate = MLTP1 * ( 1 + MLTP2 ) ;

    if CurrentBar <= Periods then
    _AEMA = Average( Close, Periods )
    else
    _AEMA = _AEMA[1] + Rate * ( Close – _AEMA[1] ) ;

    #113579 quote
    NicolasNicolas
    Keymaster
    Legend

    Ecco il codice dell'AEMA (Adaptive Exponential Moving Average) tradotto per PROREALTIME.

    // Adaptive EMA Function
    // TASC APR 2018
    // Vitali Apirine
    //inputs:
    Periods=10
    PDS=20
    
    if barindex>max(periods,pds) then 
    //variables:
    MLTP1=( 2 / ( Periods + 1 ) )
    
    MLTP2 = Abs( ( Close - Lowest[pds](Low) )- ( Highest[pds](High) - Close )) / ( Highest[pds](High)- Lowest[pds](low) ) 
    
    Rate = MLTP1 * ( 1 + MLTP2 ) 
    
    AEMA = AEMA[1] + Rate * ( Close - AEMA[1] ) 
    endif
    
    return AEMA

    La prossima volta aggiungi una foto alla tua richiesta.

    matteo zanotti thanked this post
    AEMA-vitali-apirine.png AEMA-vitali-apirine.png
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

Conversione dell'indicatore AEMA dal software di trading Tradestation


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
6 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 11/25/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...