Registered User Joined: 5/11/2007 Posts: 19
|
Hi
I would like to know how to refer to an indicator in a pcf.
The one I am interested in now is the stochastics D line. When it is above 70 and below 30.
Also if there is a reference to how to refer to the values of other indicator too such as MACD, OBV and RSI.
Thanks
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
This may help you.
(from an old post of mine):
Value A:
STOC20.1
This is the "raw" stochastic value over 20 periods. Also called %K ------------------------------------------------------------------------------------------------- Value B:
STOC20.3
This is value A smoothed by a 3 period simple moving average.
Also called "slow" stochastic. --------------------------------------------------------------------------------------------------- Value C:
AVG(STOC20.3,3)
This is a 3 period simple smoothing applied to value B.
Also know as %D ----------------------------------------------------------------------------------------------------- Value D:
XAVG(STOC20.3,3)
This is a 3 period exponential smoothing applied to value B.
Also know as %D ------------------------------------------------------------------------------------------------------- Value E:
XAVG(STOC20.1,3)
This is value A "raw" stochastic with 3 period exponential smoothing. --------------------------------------------------------------------------------------------------------
Value D Alternate:
.500488758553275 * (XAVG(STOC20,3) + .5 * (XAVG(STOC20.1.1,3) + .5 * (XAVG(STOC20.1.2,3) + .5 * (XAVG(STOC20.1.3,3) + .5 * (XAVG(STOC20.1.4,3) + .5 * (XAVG(STOC20.1.5,3) + .5 * (XAVG(STOC20.1.6,3) + .5 * (XAVG(STOC20.1.7,3) + .5 * (XAVG(STOC20.1.8,3) + .5 * (XAVG(STOC20.1.9,3)))))))))))
QUOTE (diceman)
How would historical values be written? All these values 7 bars ago?
Value A: STOC20.1.7
Value B: STOC20.3.7
Value C: AVG(STOC20.3.7,3)
Value D: XAVG(STOC20.3.7,3)
Value D Alternate: .500488758553275 * (XAVG(STOC20.1.7,3) + .5 * (XAVG(STOC20.1.8,3) + .5 * (XAVG(STOC20.1.9,3) + .5 * (XAVG(STOC20.1.10,3) + .5 * (XAVG(STOC20.1.11,3) + .5 * (XAVG(STOC20.1.12,3) + .5 * (XAVG(STOC20.1.13,3) + .5 * (XAVG(STOC20.1.14,3) + .5 * (XAVG(STOC20.1.15,3) + .5 * (XAVG(STOC20.1.16,3)))))))))))
Value E: XAVG(STOC20.1.7,3)
---------------------------------------------------------------------------
You may also be interested in this:
Handy PCF example formulas to help you learn the syntax of PCFs!
Thanks diceman
|
Registered User Joined: 5/11/2007 Posts: 19
|
Thanks Diceman
I dont see MACD and OBV in the link but will work with this (stoch) for now.
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
qew, You may want to review the following topic for a longer list of correct Personal Criteria Formula Language syntax:
PCF Formula Descriptions
MACD must be constructed using its component Moving Averages:
Understanding MACD
-Bruce Personal Criteria Formulas TC2000 Support Articles
|