[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GEN - PFE



PureBytes Links

Trading Reference Links

Hi Neal and RT's,

Only on some of my daily charts does the sawtooth pattern exists. It seems
to be related to how much movement there is in the price and how smooth the
movement is.

I would like to be able to system test the PFE and this cannot be done from
an indicator. As I only have Supercharts, I cannot convert it to a function
that a system can use. Would someone be kind enough to change it to a User
function? I have no experience with Tradestation, but I think that the code
that I have written below should work. This was originally the code for the
indicator that someone sent me and I have modified it for a function.

As to the question about the loss of the sawtooth pattern, a wild guess is
that this may be related to the 0.333 value. In the code below, I have given
it the name FRCT so that it can be changed to see what effect it has on the
curve.



{User Function called EMA (series type)
Input LOOKBK is the look back period
Input FRCT should be 0.333 for the standard indicator
}

Inputs: LOOKBK(NumericSimple),FRCT(NumericSimple);
Vars:  PFE(0), C2C(0), COUNTER(0), FRACEFF(0), EMA(0);

PFE = 0;
C2C = 0;
COUNTER = 0;
FRACEFF = 0;
EMA = 0;

PFE = SquareRoot (Power(Close - Close[LOOKBK], 2) + 100);

FOR COUNTER = 1 TO LOOKBK
Begin
         C2C = C2C + SquareRoot(Power((Close[COUNTER - 1]
-Close[COUNTER]),2) + 1);
END;

If (Close - Close[LOOKBK]) > 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 * FRCT) + (EMA[1] * (1 -  FRCT)),0);






Thanks
Simon Trevor


>Today I discovered something unusual about the PFE indicator, and it is
>contrary to the information I sent to some list members.  I said that the
>time frame did not matter in regard to the waveshape.  This may not be
>true.
>I have not had time to investigate this further, but at this point it
>appears that as the time frame increases, the indicator shape changes.  I
>have not seen this before in any other indicator so it is puzzling to me. 
>For example, the RSI indicator will have similar characteristics whether
>it is applied to a 5 minute bar or a daily chart.
>With the PFE indicator the characteristic sawtooth wave form can readily
>be seen when applied to 3 or 5 minute bars.  As the time frame increases,
>however, this sawtooth pattern is noticeably lost.  By the time you reach
>daily data, very seldom do you see the sawtooth.
>I make this comment based on only a few charts, and will continue to
>research this.  Please make any comments to help understand this.
>Due to requests from several realtraders, I have attached the ELA file of
>the PFE indicator that I modified to be able to change the lookback period
>(default = 9).  Note: the observations above were made with the "standard"
>PFE indicator.