DYO: Polarized Fractal Efficiency Indicator example


Q:  I found an indicator that is not yet available in Ensign.   I would appreciate it if you could write a DYO for the Polarized Fractal Efficiency  indicator.  Please see the formulas below.

Description: The Polarized Fractal Efficiency indicator (PFE).
             As discussed in the January 1994 issue of  "Technical Analysis of Stocks & Commodities magazine.
             Modified by Clyde Lee to allow specification of length.

inputs:   Price(Close), SmoothingLen(15), BuySellLevel(50), Length(9) ;
vars:
  CalcPrice(0),
  PFE(0),
  C2C(0),
  COUNTER(0),
  FRACEFF(0),
  EMA(0),
  UseLeng(Iff(Length<2,9,Length));

CalcPrice = Average(Price,SmoothignLen);
PFE = 0;  C2C = 0;  COUNTER = 0;  FRACEFF = 0; EMA = 0;
PFE = Squareroot(Power(CalcPrice - CalcPrice[Length], 2) + 100);

for COUNTER = 1 to UseLeng begin
  C2C = C2C + Squareroot(Power((CalcPrice[COUNTER - 1] -CalcPrice[COUNTER]),2) + 1);
end;

if (CalcPrice - CalcPrice[Length]) > 0 then FRACEFF = Round((PFE / C2C) *100,0) else FRACEFF = Round(-(PFE / C2C) *100,0);
if Currentbar = 1 then EMA = FRACEFF else EMA = Round((FRACEFF * 0.333) + (EMA[1] * (1 -0.333)),0);

Plot1(EMA,"E");
Plot2(BuySellLevel,"BUYZONE");
Plot3(-BuySellLevel,"SELLZONE");

A:  Here is my implementation of the formulas you provided for the Polarized Fractal Efficiency Indicator.

A template for this study can be downloaded from the Ensign web site using the Internet Services form.

Template:   1567-FractalEff

Last modified 8/8/08 12:19 PM