Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 7/25/2011 Posts: 17
|
I am in the process of transitioning from Tradestation to Worden and need to migrate a screen I have. Can you help me with this please. The following is a description of what I need. Thanks.
I. Closing Price_ST_LT cross (Current Bar)
Definition:
1. ST = Moving Linear Regression = 20
2. LT = Moving Linear Regression = 80
Conditions for Positive Screening (All numbers need to be adjustable, e.g., the min and max inputs):
a. Input the “as of date” of the screen – be able to screen based on data as of a chosen date current or past.
b. Price is greater than either ST or LT by
i. Minimum of 0.1%
ii. Maximum of 3.0%
c. Price >= ST and LT
d. ST>LT
i. Minimum of (LT x 0.98)
ii. Maximum of (LT x 1.07)
e. ST > prior bar ST
f. Average 30 day volume > 150000 shares
II. Closing Price_ST_LT cross (Prior 5 Bars)
Definition: I want to be able to screen for any security that screened positively for the conditions above during any of the last 5 bars.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I could probably make this with everything adjustable in StockFinder, but I cannot think of a way to do so using either version of TC2000.
You could use the following Condition Formula as a Custom PCF % True Indicator with the Period set to 5 and the Average Type set to Simple to find symbols where an un-adjustable version of your base requirements have been true at least one of the most recent five bars.
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
(ABS(C / (AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) - 1.0155) <= 0.0145 OR ABS(C / (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) - 1.0155) <= 0.0145) AND C >= AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665 AND C >= AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660 AND ABS((AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) / (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) - 1.025) <= .045 AND AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665 > AVGC20.1 + 9.5 * (9.5 * C1 + 8.5 * C2 + 7.5 * C3 + 6.5 * C4 + 5.5 * C5 + 4.5 * C6 + 3.5 * C7 + 2.5 * C8 + 1.5 * C9 + 0.5 * C10 - 0.5 * C11 - 1.5 * C12 - 2.5 * C13 - 3.5 * C14 - 4.5 * C15 - 5.5 * C16 - 6.5 * C17 - 7.5 * C18 - 8.5 * C19 - 9.5 * C20) / 665 AND AVGV30 > 150000
Any symbol returning greater than 0% would be true at least 1 of the most recent 5-bars. So you could right-click on the Custom PCF % True Indicator and select Create Condition and choose Greater Than set to 0 from the Condition drop-down to create a Condition which could be used as a WatchList Column or as a Scan Condition (you could also just add a WatchList Column to sort by the number of times it has returned true during the most recent 5-bars).
Indicators, Sorting & Scanning
You could add a 1-Period Moving Average with an Offset set to the number of bars ago for which you wish to check and click on it to Create Condition if you wanted to test for a past true result instead of a current true result (although you can visually see if it has been true in the past by just looking at the Custom PCF % True Indicator without doing so).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
Thank you for your help. Can you show me how to adjust the conditions such as changing 7% to 5%, etc. i don't see that in there. thanks. Also is there a way to scan based on a particular day, for example if i want to perform a scan as of Jan 14, 2012 ? thanks.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (JA5) Can you show me how to adjust the conditions such as changing 7% to 5%, etc. i don't see that in there.
Sure, the way it was done keeps the formula short enough to post, but it isn't obvious.
QUOTE (JA5) b. Price is greater than either ST or LT by
i. Minimum of 0.1%
ii. Maximum of 3.0%
The obvious way to do this would be:
(C >= 1.001 * (AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) AND C <= 1.03 * (AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665)) OR (C >= 1.001 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) AND C <= 1.03 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660))
The 1.001 and 1.03 representing 0.1% and 3.0% are easy to see. But it is possible to only calculate the Moving Linear Regression Values once for each comparison instead of twice. The key is check to calculate the midpoint between these two range boundaries ((1.001 + 1.03) / 2 = 1.0155) and then check to make sure Price as less than or equal to half the distance between the two range boundaries from the centerline of two range boundaries ((1.03 - 1.001) / 2 = 0.0145).
(ABS(C / (AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) - 1.0155) <= 0.0145 OR ABS(C / (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) - 1.0155) <= 0.0145)
QUOTE (JA5) d. ST>LT
i. Minimum of (LT x 0.98)
ii. Maximum of (LT x 1.07)
We can use the same technique here. The long way has the 0.98 and 1.07 clearly visible in the formula:
AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665 >= 0.98 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) AND AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665 <= 1.07 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660)
While the shorter way calculates the midpoint between the boundaries:
(0.98 + 1.07) / 2 = 1.025
And half the distance between the boundaries:
(1.07 - 0.98) / 2 = .045
To get:
ABS((AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) / (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) - 1.025) <= .045
QUOTE (JA5) Also is there a way to scan based on a particular day, for example if i want to perform a scan as of Jan 14, 2012 ?
Is there a way, yes. It is possible to replace every bars ago parameter with a date. January 14, 2012 isn't a trading day, but we could use January 13, 2012 instead.
AVGC20
Would become:
AVGC20.'01/13/2012'
C
Would become:
C'01/13/2012'
And:
C1
Would become:
C'01/12/2012'
But there are a lot of bars ago parameters in the formula. It is not something I would do.
I did suggest an alternative however.
QUOTE (Bruce_L) You could add a 1-Period Moving Average with an Offset set to the number of bars ago for which you wish to check and click on it to Create Condition if you wanted to test for a past true result instead of a current true result (although you can visually see if it has been true in the past by just looking at the Custom PCF % True Indicator without doing so).
The hitch is that you need to figure out how many days ago January 13, 2012 is compared to the current date. As of right now (it is February 15, 2012), that would be 22 days. This means you have to set the Offset in the Moving Average to 22.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
is there a way to show you a picture of a chart - paste it in here or email it to you. i want to figure out how to recreate this indicator in tc2000. the base indicator is the moving linear regression, but then it has somewhat of a parrallel or lag line as well. if i can have you see it maybe you can figure out what the second line is a recreate it in tc2000
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The best topic of which I am aware on posting images in the forums is Inserting A Chart into A Worden post.
I will certainly take a look at the indicator, but it is not usually possible to determine the calculation of an indicator based entirely on a picture of that indicator.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
actually i figured out the indicator. thanks anyway. one other question, is it possible to get the vervoot atr on tc2000? there was an old question about that. thanks.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I cannot think of a method of creating the Vervoot Modified ATR in TC2000 which would be short enough to be practical.
It should probably be noted that it is available in StockFinder.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
thanks
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
Bruce, I use a pair of indicators. One is the Moving Linear Regression indicator (set at 80) and the other is a 20 day exponential moving average of the Moving Linear Regression indicator. On tradestation i have it set up so that when the exp MA line turns down relative to the prior data point the color changes from green to purple and when it turns back up it turns from purple to green. the change in color based on the expon MA simultaneously triggers the same change in color for the Moving Linear Regression Indicator line. Is this something you can help me program for TC2000 please? thank you.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I could help you with the color changes in StockFinder using its Paint Schemes feature, but there isn't anything similar available to paint the Moving Linear Regression and Exponential Moving Average in TC2000.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2011 Posts: 17
|
When i adjust the volume requirement, it doesn't seem to change anything. the same number of companies screen out. Can you take a look at that please? Also can we add a minimum market cap requirement of $100million. thank you.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Adjusting the Volume at the end definitely changes the number of symbols returning true. For example, I get 826 symbols returning true in the US Common Stocks WatchList using AVGV30 > 150000, but only 263 symbols if use AVGV30 > 1500000.
Make sure you are re-creating the Condition and then re-adding it as a WatchList Column or Scan Condition after you edit the formula. The Condition is not linked to the indicator after it is created and the program makes copies of the Condition when it is used. Changing the indicator doesn't change an already create Condition and changing the Condition doesn't change an already created WatchList Column or Scan Condition.
You would need to use Capitalization as a Scan Condition along with your current Condition to Scan for Market Capitalization as well. The Personal Criteria Formula Language does not have syntax for referencing fundamentals.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |