I came across a 'Fractal Dimension Index' indicator, which should (with the emphasize on should ;)) be a useful trend filter. This indicator, develop by Erik Long, is published here (. I've Googled for the code, and found one that looked promising (here (), but the code in that indicator differences from the code in that article and it also looks different when plotted. When I try myself to code the indicator from that article, I get stuck in the math, also since the Greek signs are missing from it.
Who can help me translate the code below? Any suggestion would be more then helpful.
Here's what I have so far, with the original formula in the comments.