Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 7/5/2009 Posts: 191
|
Hi,
Can a trainer please assist in creating a PCF for the following:
stock closed above the 50 day moving average today and yesterday the stock closed below the 50 day moving average and the 50 day moving today is above the 200 day moving average OR stock closed above the 200 day moving average today and yesterday the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following Condition Formula.
(C > AVGC50 AND C1 < AVGC50.1 AND AVGC50 > AVGC200) OR (C > AVGC200 AND C1 < AVGC200.1 AND AVGC200 > AVGC50)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/5/2009 Posts: 191
|
Thank you Bruce! So glad you're back! Can you help me with a modifiction I made to this (highlighted in bold)
stock closed above the 50 day moving average today and the last 10 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 10 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
stock closed above the 50 day moving average today and the last 15 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 15 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
stock closed above the 50 day moving average today and the last 20 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 20 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (daledalmada) stock closed above the 50 day moving average today and the last 10 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 10 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
You will need to check for each of these bars manually in TC2000 v12.5.
(C > AVGC50 AND C1 < AVGC50.1 AND C2 < AVGC50.2 AND C3 < AVGC50.3 AND C4 < AVGC50.4 AND C5 < AVGC50.5 AND C6 < AVGC50.6 AND C7 < AVGC50.7 AND C8 < AVGC50.8 AND C9 < AVGC50.9 AND C10 < AVGC50.10 AND AVGC50 > AVGC200) OR (C > AVGC200 AND C1 < AVGC200.1 AND C2 < AVGC200.2 AND C3 < AVGC200.3 AND C4 < AVGC200.4 AND C5 < AVGC200.5 AND C6 < AVGC200.6 AND C7 < AVGC200.7 AND C8 < AVGC200.8 AND C9 < AVGC200.9 AND C10 < AVGC200.10 AND AVGC200 > AVGC50)
QUOTE (daledalmada) stock closed above the 50 day moving average today and the last 15 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 15 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
So you would just add more days when doing 15 days.
(C > AVGC50 AND C1 < AVGC50.1 AND C2 < AVGC50.2 AND C3 < AVGC50.3 AND C4 < AVGC50.4 AND C5 < AVGC50.5 AND C6 < AVGC50.6 AND C7 < AVGC50.7 AND C8 < AVGC50.8 AND C9 < AVGC50.9 AND C10 < AVGC50.10 AND C11 < AVGC50.11 AND C12 < AVGC50.12 AND C13 < AVGC50.13 AND C14 < AVGC50.14 AND C15 < AVGC50.15 AND AVGC50 > AVGC200) OR (C > AVGC200 AND C1 < AVGC200.1 AND C2 < AVGC200.2 AND C3 < AVGC200.3 AND C4 < AVGC200.4 AND C5 < AVGC200.5 AND C6 < AVGC200.6 AND C7 < AVGC200.7 AND C8 < AVGC200.8 AND C9 < AVGC200.9 AND C10 < AVGC200.10 AND C11 < AVGC200.11 AND C12 < AVGC200.12 AND C13 < AVGC200.13 AND C14 < AVGC200.14 AND C15 < AVGC200.15 AND AVGC200 > AVGC50)
QUOTE (daledalmada) stock closed above the 50 day moving average today and the last 20 days or more prior to today the stock closed below the 50 day moving average and the 50 day moving average today is above the 200 day moving average OR stock closed above the 200 day moving average today and the last 20 days or more prior to today the stock closed below the 200 day moving average and the 200 day moving average today is above the 50 day moving average
Or 20 days.
(C > AVGC50 AND C1 < AVGC50.1 AND C2 < AVGC50.2 AND C3 < AVGC50.3 AND C4 < AVGC50.4 AND C5 < AVGC50.5 AND C6 < AVGC50.6 AND C7 < AVGC50.7 AND C8 < AVGC50.8 AND C9 < AVGC50.9 AND C10 < AVGC50.10 AND C11 < AVGC50.11 AND C12 < AVGC50.12 AND C13 < AVGC50.13 AND C14 < AVGC50.14 AND C15 < AVGC50.15 AND C16 < AVGC50.16 AND C17 < AVGC50.17 AND C18 < AVGC50.18 AND C19 < AVGC50.19 AND C20 < AVGC50.20 AND AVGC50 > AVGC200) OR (C > AVGC200 AND C1 < AVGC200.1 AND C2 < AVGC200.2 AND C3 < AVGC200.3 AND C4 < AVGC200.4 AND C5 < AVGC200.5 AND C6 < AVGC200.6 AND C7 < AVGC200.7 AND C8 < AVGC200.8 AND C9 < AVGC200.9 AND C10 < AVGC200.10 AND C11 < AVGC200.11 AND C12 < AVGC200.12 AND C13 < AVGC200.13 AND C14 < AVGC200.14 AND C15 < AVGC200.15 AND C16 < AVGC200.16 AND C17 < AVGC200.17 AND C18 < AVGC200.18 AND C19 < AVGC200.19 AND C20 < AVGC200.20 AND AVGC200 > AVGC50)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/5/2009 Posts: 191
|
Thank you very much Bruce! I have two questions:
1. What did you mean when you said I would need to check for each of these bars manually in TC 2000 v12.5...which is what I use?
2. Why do the moving averages values in Telechart differ from Stockcharts.com? For example, I ran one of the pcfs above on us common stocks and one of the stocks that came up was VTR. In Telechart, VTR shows the 200 SMA at 66.62 and Stockcharts.com shows it as 64.69 (both as of today's close). So using Stockcharts.com, it would have got me in on 4/10 (when it closed above the 200 SMA according to Stockcharts) instead of today when it closed above the 200 SMA according to Telechart). There are several other stocks that came up in the scan as well with the exact same issue...different values for the 50 SMA and 200 SMA for Telechart vs Stockcharts.com Any idea why the discrepency? How do you know which one is more accurate? I'd like to enter the stock as soon as it closes above the moving average so accuracy is critical.
Thank you for your insight!
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
VTR pays frequent dividends so I assume the other site is adjusting their prices for the divident payments. In TC2000, we do not adjust stock prices for dividends.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In TC2000 v17 we could have written the first formula as the following instead of explicitly writing out a comparison of price to its moving average for each bar.
(C > AVGC50 AND TrueInRow(C1 < AVGC50.1, 10) AND AVGC50 > AVGC200) OR (C > AVGC200 AND TrueInRow(C1 < AVGC200.1, 10) AND AVGC200 > AVGC50)
Which makes changing the formulas into the 15 and 20 bar versions of just changing both of the 10s in the TrueInRow() functions to 15 or 20 instead.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/5/2009 Posts: 191
|
Thank you Administration and Bruce! Very much appreciated!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |