Premium1 468x60 forex
Page 4 of 33 FirstFirst ... 2 3 4 5 6 14 ... LastLast
Results 31 to 40 of 327
Like Tree72Likes

AllAverages

This is a discussion on AllAverages within the Trading tools forums, part of the Trading Forum category; Hi sohocol, Perhaps I haven't understand, but I thought you say that to calculate an EMA we can use this ...

      
   
  1. #31
    Member
    Join Date
    Jul 2013
    Posts
    40
    Hi sohocol,

    Perhaps I haven't understand, but I thought you say that to calculate an EMA we can use this code, but as you see, in green your code, and in green and EMA (lengh of 10 for both), and it's not quite the same

    An idea ?

    Thanks

    Zilliq

    AllAverages-cac-40-index.png
    Quote Originally Posted by sohocool View Post
    Hi Zilliq ,

    We can do moving exponential like this :

    Regards.

    p.s. : also we can choose period =decimal.



    ///variable period = periode moyenne

    len = MAX((period + 5.0)/3.0-1,1)

    alpha=(2/(len+1))

    if barindex >2 then

    mm= alpha*customclose + (1-alpha)*mm[1]

    endif

    return mm as"exponentielle T3. zillig"

  2. #32
    Junior Member sohocool's Avatar
    Join Date
    Mar 2013
    Location
    BELGIUM
    Posts
    28
    Follow sohocool On Twitter Add sohocool on Google+
    hi ,

    i think your have normal exponential alpha (2/11)

    Mine have the T3 Igor alpha .

    Please check yours expo with period = 4 ,and check normaly the both have same values.

    @+

  3. #33
    Member
    Join Date
    Jul 2013
    Posts
    40
    Gloups not the same with n=4

    ///variable period = periode moyenne

    len = MAX((period + 5.0)/3.0-1,1)

    alpha=(2/(len+1))

    if barindex >2 then

    mm= alpha*customclose + (1-alpha)*mm[1]

    endif

    return mm as "EMA"

    AllAverages-cac-40-index.png

  4. #34
    Junior Member sohocool's Avatar
    Join Date
    Mar 2013
    Location
    BELGIUM
    Posts
    28
    Follow sohocool On Twitter Add sohocool on Google+
    Hi Zilliq,

    I just Check :

    When mine T3 Zilliq have period =10 ,the normal Prt Exponential Must have period =4 (period +5)/5-1 == 4.

    please check with this :


    period =10

    len = MAX((period + 5.0)/3.0-1,1)

    alpha=(2/(len+1))

    if barindex >2 then

    mm= alpha*customclose + (1-alpha)*mm[1]

    endif

    bb=ExponentialAverage[4](customclose)

    return mm as"exponentielle T3. zillig",bb

    Ps : why ? because is two different exponential due to not same alpha calculation .
    Last edited by sohocool; 08-19-2013 at 04:27 PM. Reason: ps

  5. #35
    Member
    Join Date
    Jul 2013
    Posts
    40
    Ok I will see

    First try to "adapt" Jsmooth there is like a problem...

    //Inputs: Price(NumericSeries),
    //Period(NumericSimple),
    //Pow(NumericSimple),
    //Phase(NumericSimple),
    //Opt(NumericSimple);

    Price=close

    bet=(0.45*(Period-1)/(0.45*(Period-1)+2))

    //Filt0(0),alpha(0),Det0(0),Filt1(0),Det1(0),Filt2(0 );

    If barindex < 10 then
    Filt0 = Price
    Filt1 = Price
    Filt2 = Price

    else
    alpha = SQRT(bet)[Pow]

    Filt0 = (1-alpha)*Price + alpha*Filt0[1]

    Det0 = (Price - Filt0)*(1 - bet) + bet*Det0[1]

    Filt1 = Filt0 + Phase*Det0

    Det1 = (Filt1 - Filt2[1]) * SQRT(2)[(1 - alpha)] + alpha*alpha*Det1[1]
    Filt2 = Filt2[1] + Det1

    endif


    return Filt2

  6. #36
    Member
    Join Date
    Jul 2013
    Posts
    40
    When mine T3 Zilliq have perios =10 ,the normal Prt Exponential Must have period =4 (period +5)/5-1 == 4.

    if period=10

    ((period+5)/5)-1=2 not 4

    I think I know where is the problem it calculates an EMA of your T3 zillig, not on close

    I test


    Quote Originally Posted by sohocool View Post
    Hi Zilliq,

    I just Check :

    When mine T3 Zilliq have period =10 ,the normal Prt Exponential Must have period =4 (period +5)/5-1 == 4.

    please check with this :


    period =10

    len = MAX((period + 5.0)/3.0-1,1)

    alpha=(2/(len+1))

    if barindex >2 then

    mm= alpha*customclose + (1-alpha)*mm[1]

    endif

    bb=ExponentialAverage[4](customclose)

    return mm as"exponentielle T3. zillig",bb

    Ps : why ? because is two different exponential due to not same alpha calcul .
    Last edited by zilliq; 08-19-2013 at 04:31 PM.

  7. #37
    Junior Member sohocool's Avatar
    Join Date
    Mar 2013
    Location
    BELGIUM
    Posts
    28
    Follow sohocool On Twitter Add sohocool on Google+
    oups sorry not divide by 5 but by 3 .

  8. #38
    Member
    Join Date
    Jul 2013
    Posts
    40
    I was right,

    On a chart your T3 zillig=EMA but with different period 10/4

    Thanks a lot

    I will see how we can adapt the Jsmooth. Semmes to be difficult...

    Zilliq

    AllAverages-cac-40-index.png
    Last edited by zilliq; 08-19-2013 at 04:37 PM.

  9. #39
    Junior Member sohocool's Avatar
    Join Date
    Mar 2013
    Location
    BELGIUM
    Posts
    28
    Follow sohocool On Twitter Add sohocool on Google+
    hi Zilliq,

    why squareroot ???( alpha = SQRT(bet)[Pow])

    if pow = 1 then alpha = bet

    elseif pow =2then alpha = bet*bet

    elseif pow =3 then alpha = bet*bet*bet

    etc...................

  10. #40
    Member
    Join Date
    Jul 2013
    Posts
    40
    This PRT code calculates exactly an EMA (same period)

    Zilliq

    len = MAX(period,1)

    alpha=(2/(len+1))

    if barindex >2 then

    mm= alpha*customclose + (1-alpha)*mm[1]

    endif

    return mm as "EMA"

Page 4 of 33 FirstFirst ... 2 3 4 5 6 14 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •