Gold Customer
Joined: 10/14/2004 Posts: 202
|
Bruce-
Please write a PCF for the following: Scan for stocks only, no ETFs
Entry Trigger:
Price has crossed above the upper (1 standard deviation; 20 day look back period) Bollinger Band in the last 2 days. And the 20 day MACD has crossed above the zero line within the last 1 day period.
Exit Trigger:
Price has crossed below the upper (1 standard deviation; 20 day look back period) Bollinger Band in the last 2 days. And the 9 day MACD has crossed below the zero line within the last 1 day period.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for price being above the Upper Bollinger Band 20, 1 during the current bar but below 2-bars ago in TC2000 verison 7 can be written as follows.
C > AVGC20 + SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19) AND C2 < AVGC20.2 + SQR(ABS(C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 19)
A Condition Formula for price being below the Upper Bollinger Band 20, 1 during the current bar but above 2-bars ago in TC2000 verison 7 can be written as follows.
C < AVGC20 + SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19) AND C2 > AVGC20.2 + SQR(ABS(C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 19)
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
That said, I do not know what you mean by a 20 day MACD or a 9 day MACD. The plain MACD normally requires two parameters to plot and the MACD trigger or MACD Histogram normally require 3 parameters. You also need to know if the MACD is simple or exponential.
Understanding MACD
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Gold Customer
Joined: 10/14/2004 Posts: 202
|
Bruce-
Sorry for the confusion. Instead of the earlier parameters for the MACD, please write a PCF for the MACD (6 EMA and 19 EMA) combo with the 6 EMA crossing above the 19 EMA which is Bullish.
Also, a PCF for the MACD using the (19 EMA and 39 EMA) combo with the 19 EMA crossing below the 39 EMA which is Bearish.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for price being above the Upper Bollinger Band 20, 1 during the current bar but below 2-bars ago and EMA6 crossing above EMA19 in TC2000 verison 7 can be written as follows
C > AVGC20 + SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19) AND C2 < AVGC20.2 + SQR(ABS(C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 19) AND XAVGC9 > XAVGC19 AND XAVGC9.1 <= XAVGC19.1
A Condition Formula for price being below the Upper Bollinger Band 20, 1 during the current bar but above 2-bars ago and EMA19 crossing below EMA39 in TC2000 verison 7 can be written as follows.
C < AVGC20 + SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 19) AND C2 > AVGC20.2 + SQR(ABS(C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 19) AND XAVGC19 < XAVGC39 AND XAVGC19.1 >= XAVGC39.1
-Bruce Personal Criteria Formulas TC2000 Support Articles
|