Your interactive trading laboratory!
5 users online

Polarized Fractal Efficiency (PFE)
Q Merlin wrote 16 days ago, and edited 16 days ago ...

In one of my existing Ninja strategies, i'm using Polarized Fractal Efficiency Indicator. The Polarized Fractal Efficiency indicator was developed by Hans Hannula and was introduced in the January 1994 issue of the TASC magazine. Is this Indicator available in QS and if not, can it be made available?


Attachment

Cancel

Responses
Q Glitch posted 16 days ago

We will get this implemented in the next TASC Extensions update!

We will get this implemented in the next TASC Extensions update!
Q Glitch posted 13 days ago

PFE is now available in Qcom, will update QStudio and the open source project shortly. Of note, I added some static methods to the core TimeSeries to make it much easier to code indicators. More will come as needed, but here's the code for PFE (this won't work in QStudio until the next Q152 update).

        //populate
        public override void Populate()
        {
            TimeSeries source = Parameters[0].AsTimeSeries;
            int period = Parameters[1].AsInt;
            int smoothing = Parameters[2].AsInt;
            TimeSeries pfe = Sqrt(Pow(source - (source >> period), 2.0) + 100.0);
            TimeSeries c2c = Sum(Sqrt(Pow(source - (source >> 1), 2.0) + 1.0), period);
            TimeSeries xFrac = BooleanTest(source - (source >> period), Round(pfe / c2c * 100.0), Round(pfe / c2c * -100.0));
            TimeSeries ema = EMA.Series(xFrac, smoothing);
            Values = ema.Values;
        }
PFE is now available in Qcom, will update QStudio and the open source project shortly. Of note, I added some static methods to the core TimeSeries to make it much easier to code indicators. More will come as needed, but here's the code for PFE (this won't work in QStudio until the next Q152 update). [CODE] //populate public override void Populate() { TimeSeries source = Parameters[0].AsTimeSeries; int period = Parameters[1].AsInt; int smoothing = Parameters[2].AsInt; TimeSeries pfe = Sqrt(Pow(source - (source >> period), 2.0) + 100.0); TimeSeries c2c = Sum(Sqrt(Pow(source - (source >> 1), 2.0) + 1.0), period); TimeSeries xFrac = BooleanTest(source - (source >> period), Round(pfe / c2c * 100.0), Round(pfe / c2c * -100.0)); TimeSeries ema = EMA.Series(xFrac, smoothing); Values = ema.Values; } [/CODE]
Q Merlin posted 11 days ago

Makes absolutely sense. It's much more efficient to consume static methods.

Makes absolutely sense. It's much more efficient to consume static methods.
Forum Tips

Please sign in if you want to participate in our forum.

Our forum uses Markdown syntax to format posts.

To embed code snippets, enclose them in [CODE][/CODE] tags.