in Search

Need Formula for Fractal Dimension Index

Last post 11-19-2008, 21:12 by johnl. 2 replies.
Sort Posts: Previous Next
  •  11-10-2008, 6:51 28168

    Need Formula for Fractal Dimension Index

    Does anyone know the formula for Fractal Dimension Index?
  •  11-12-2008, 16:13 28211 in reply to 28168

    Re: Need Formula for Fractal Dimension Index

    I am not sure if the version posted in TASC is true to the original concept?  I thought that to properly compute the Hurst component and then the fractal component would require inner loops which MS cannot support.  The only way to code these correctly would involve using external functions, but anyway here is what was in that issue of TASC.  A copy of the article is at http://www.fractalfinance.com/fracdimin.html

    Code:

    {TASC 5/2003 - Fractal dimension index}
    PD:=100;
    EV:=C/Ref(C,-1);
    XTN:=Sum(EV-Mov(EV,PD,S),PD);
    RANGE:=Highest(XTN)-Lowest(XTN);
    SV:=Stdev(EV,PD);
    XV:=If(Range/SV=0,0.0001,Range/SV);
    Value:=Log(XV)/Log(PD);
    2-If(BarsSince(RANGE/SV=0)>0,Value,0);


    Another version is found at http://forum.vtsystems.com/index.php?showtopic=6597 which is very similar to the above version.
    Code:

    {Provided By: Visual Trading Systems, LLC & Capital Market Services, LLC © Copyright 2007}
    {Description: Fractal Dimension Index (FDI)}
    {Notes: March 2007 Issue - Using the Fractal Dimension Index - Trading Systems and Fractals by Radha Panini}
    {vt_FDI Version 1.0}
    pr:=CLOSE;
    periods:=100;
    Ri:= Log(pr/Ref(pr,-1));
    Mn:= Sum(ri,periods)/periods;
    X:= Sum((Ri-Mn),periods);
    Rn:= HHV(X,periods) - LLV(X,periods);
    Sn:= Stdev(Ri,periods);
    Hurst:= Log(Rn/Sn) / Log(periods/2);
    FDI:= 2 - Hurst;
    FDI;


    http://transcripts.fxstreet.com/2005/05/fractal_dimensi.html might help to decide what to do withit once it has been computed Smile [:)]



    Hope this helps.

    wabbit Big Smile [:D]


    Please update your thread status:

    FREE Equis Formula Primer : http://forum.equis.com/files/19673/download.aspx
    To post code, *code* your code */code*
    To post links, [URL] URL goes here [/URL]
    For custom MetaStock and DLL programming : http://www.wabbit.com.au
    Contact via SkyPE
  •  11-19-2008, 21:12 28302 in reply to 28211

    Re: Need Formula for Fractal Dimension Index


    That is a lot of info. Thanks.
View as RSS news feed in XML