Registered User Joined: 12/11/2008 Posts: 39
|
Hi Bruce
Can you convert High/Low metastock formulal to PCF?
HLB:=If(Cum(1)=4, If(H>Ref(H,-1),H,L),
If(PREV>=Ref(H,-1) AND ROC(H,1,$)>0, Max(H,PREV),
If(PREV<=Ref(L,-1) AND ROC(L,1,$)<0, Min(L,PREV),
If(PREV>=Ref(H,-1) AND H<=HHV(L,5),L,
If(PREV<=Ref(L,-1) AND L>=LLV(H,4),H,PREV)))));
HLB
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I actually don't understand the syntax. For example, what does Cum(1)=4 mean or do?
Is PREV the previous value of HLB or something else?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 12/11/2008 Posts: 39
|
HLB - High/Low Breakout - is just a variable name and could be any user defined variable name
PREV command - This is function that allows the user to create a self-referencing formula
indicator + PREV - allows recursive addition of indicator and its previous value. Example usage id this would be needed to create an EMA
Cum(1) formula - Calculates an indicator that rises one point for each day since the beginning of the chart.
ROC is simply Rate of Change - ROC( Data Array, Periods, Diff-Method)
(Diff-Method either Percent or %, Points or $)
HHV - Highest High Value - HHV( Data Array, Periods)
|
Registered User Joined: 12/11/2008 Posts: 39
|
Hi Bruce
Please help to create H/L breakout indicator using PCF.
Thank you in advance.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I have played with this quite a bit and have been able to figure out a way to implement this in the Personal Criteria Formula Language.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|