Conversione dell'indicatore AEMA dal software di trading Tradestation

Forums ProRealTime forum Italiano Supporto ProBuilder Conversione dell'indicatore AEMA dal software di trading Tradestation

Viewing 2 posts - 1 through 2 (of 2 total)
  • #113576

    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

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

    La prossima volta aggiungi una foto alla tua richiesta.

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login