Registered User Joined: 10/2/2008 Posts: 16
|
Hi,
I would like help developing a PCF for the following:
- Price has been above the simple 150MA for the last four months.
I am using TC2000 ver12.
Thanks,
Au197
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You would have to check for every one of those days. Assuming months with about 21-trading days, a Condition Formula for this would be:
C > AVGC150 AND C1 > AVGC150.1 AND C2 > AVGC150.2 AND C3 > AVGC150.3 AND C4 > AVGC150.4 AND C5 > AVGC150.5 AND C6 > AVGC150.6 AND C7 > AVGC150.7 AND C8 > AVGC150.8 AND C9 > AVGC150.9 AND C10 > AVGC150.10 AND C11 > AVGC150.11 AND C12 > AVGC150.12 AND C13 > AVGC150.13 AND C14 > AVGC150.14 AND C15 > AVGC150.15 AND C16 > AVGC150.16 AND C17 > AVGC150.17 AND C18 > AVGC150.18 AND C19 > AVGC150.19 AND C20 > AVGC150.20 AND C21 > AVGC150.21 AND C22 > AVGC150.22 AND C23 > AVGC150.23 AND C24 > AVGC150.24 AND C25 > AVGC150.25 AND C26 > AVGC150.26 AND C27 > AVGC150.27 AND C28 > AVGC150.28 AND C29 > AVGC150.29 AND C30 > AVGC150.30 AND C31 > AVGC150.31 AND C32 > AVGC150.32 AND C33 > AVGC150.33 AND C34 > AVGC150.34 AND C35 > AVGC150.35 AND C36 > AVGC150.36 AND C37 > AVGC150.37 AND C38 > AVGC150.38 AND C39 > AVGC150.39 AND C40 > AVGC150.40 AND C41 > AVGC150.41 AND C42 > AVGC150.42 AND C43 > AVGC150.43 AND C44 > AVGC150.44 AND C45 > AVGC150.45 AND C46 > AVGC150.46 AND C47 > AVGC150.47 AND C48 > AVGC150.48 AND C49 > AVGC150.49 AND C50 > AVGC150.50 AND C51 > AVGC150.51 AND C52 > AVGC150.52 AND C53 > AVGC150.53 AND C54 > AVGC150.54 AND C55 > AVGC150.55 AND C56 > AVGC150.56 AND C57 > AVGC150.57 AND C58 > AVGC150.58 AND C59 > AVGC150.59 AND C60 > AVGC150.60 AND C61 > AVGC150.61 AND C62 > AVGC150.62 AND C63 > AVGC150.63 AND C64 > AVGC150.64 AND C65 > AVGC150.65 AND C66 > AVGC150.66 AND C67 > AVGC150.67 AND C68 > AVGC150.68 AND C69 > AVGC150.69 AND C70 > AVGC150.70 AND C71 > AVGC150.71 AND C72 > AVGC150.72 AND C73 > AVGC150.73 AND C74 > AVGC150.74 AND C75 > AVGC150.75 AND C76 > AVGC150.76 AND C77 > AVGC150.77 AND C78 > AVGC150.78 AND C79 > AVGC150.79 AND C80 > AVGC150.80 AND C81 > AVGC150.81 AND C82 > AVGC150.82 AND C83 > AVGC150.83
You may want to substitute the low for the close if you don't want the price to have ever been below the Moving Average for even part of a day:
L > AVGC150 AND L1 > AVGC150.1 AND L2 > AVGC150.2 AND L3 > AVGC150.3 AND L4 > AVGC150.4 AND L5 > AVGC150.5 AND L6 > AVGC150.6 AND L7 > AVGC150.7 AND L8 > AVGC150.8 AND L9 > AVGC150.9 AND L10 > AVGC150.10 AND L11 > AVGC150.11 AND L12 > AVGC150.12 AND L13 > AVGC150.13 AND L14 > AVGC150.14 AND L15 > AVGC150.15 AND L16 > AVGC150.16 AND L17 > AVGC150.17 AND L18 > AVGC150.18 AND L19 > AVGC150.19 AND L20 > AVGC150.20 AND L21 > AVGC150.21 AND L22 > AVGC150.22 AND L23 > AVGC150.23 AND L24 > AVGC150.24 AND L25 > AVGC150.25 AND L26 > AVGC150.26 AND L27 > AVGC150.27 AND L28 > AVGC150.28 AND L29 > AVGC150.29 AND L30 > AVGC150.30 AND L31 > AVGC150.31 AND L32 > AVGC150.32 AND L33 > AVGC150.33 AND L34 > AVGC150.34 AND L35 > AVGC150.35 AND L36 > AVGC150.36 AND L37 > AVGC150.37 AND L38 > AVGC150.38 AND L39 > AVGC150.39 AND L40 > AVGC150.40 AND L41 > AVGC150.41 AND L42 > AVGC150.42 AND L43 > AVGC150.43 AND L44 > AVGC150.44 AND L45 > AVGC150.45 AND L46 > AVGC150.46 AND L47 > AVGC150.47 AND L48 > AVGC150.48 AND L49 > AVGC150.49 AND L50 > AVGC150.50 AND L51 > AVGC150.51 AND L52 > AVGC150.52 AND L53 > AVGC150.53 AND L54 > AVGC150.54 AND L55 > AVGC150.55 AND L56 > AVGC150.56 AND L57 > AVGC150.57 AND L58 > AVGC150.58 AND L59 > AVGC150.59 AND L60 > AVGC150.60 AND L61 > AVGC150.61 AND L62 > AVGC150.62 AND L63 > AVGC150.63 AND L64 > AVGC150.64 AND L65 > AVGC150.65 AND L66 > AVGC150.66 AND L67 > AVGC150.67 AND L68 > AVGC150.68 AND L69 > AVGC150.69 AND L70 > AVGC150.70 AND L71 > AVGC150.71 AND L72 > AVGC150.72 AND L73 > AVGC150.73 AND L74 > AVGC150.74 AND L75 > AVGC150.75 AND L76 > AVGC150.76 AND L77 > AVGC150.77 AND L78 > AVGC150.78 AND L79 > AVGC150.79 AND L80 > AVGC150.80 AND L81 > AVGC150.81 AND L82 > AVGC150.82 AND L83 > AVGC150.83
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
A better way to do this would probably be to create a Custom PCF % True Indicator using either:
C > AVGC150
Or:
L > AVGC150
As the Boolean Formula with the Period set to 84 and the Average Type set to Simple. You could then click on the Custom PCF % True Indicator and select Create Scan Condition to create a Condition. You would set the Condition drop-down to Greater Than and the Greater than setting to 99. It would then return true when the Custom PCF % True Indicator was at 100 (meaning the Boolean Formula was true for 100% of those 84 bars).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|