Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 9/7/2012 Posts: 34
|
Hi
I am using version 12.4 of TC2000.
Try the formula:
(c > MAX(o1,c1)) and (o < MIN(o1,c1))
The MAX and MIN function return the same results (just use the testing facility on a few stocks). I view this as important given that you make decisions based on your own formulas.
This is incredible, unless there is something basic I do not understand.
Thanks,
Gordon
|
|
Gold Customer
Joined: 9/7/2012 Posts: 34
|
[QUOTE=gordon.erlebach]
Hi
I am using version 12.4 of TC2000.
Try the formula:
(c > MAX(o1,c1)) and (o < MIN(o1,c1))
Try the following as well:
MAX(o1,c1) and MAX(c1,o1)
and test the formulas. The results of the two are different! How can this possibly be?
The MAX and MIN function return the same results (just use the testing facility on a few stocks). I view this as important given that you make decisions based on your own formulas.
This is incredible, unless there is something basic I do not understand.
Thanks,
Gordon
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Your PCFs are not using proper syntax.
Thanks
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Bruce, I found two formulas in my files and I am wonering what they are stating in English. Also can these formulas be used in Vs 7 and 12? XAVGC5 - C1 <= 0 && C - XAVGC5 >= .02 && (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) < 0 and XAVGC5 - C1 >= 0 && C - XAVGC5 <= .02 && (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) > 0 TY
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gordon.erlebach,
The MAX() and MIN() functions do not do what you seem to be assuming.
The MAX() function checks for the maximum value of an indicator over time. It does not check for higher of two values.
The MIN() function checks for the minimum vaule of an indicator over time. It does not check for the lower of two values.
PCF Formula Descriptions
If you want to check for the higher of O1 and C1, you could use:
ABS(O1 >= C1) * O1 + ABS(O1 < C1) * C1
Or possibly:
(O1 + C1 + ABS(O1 - C1)) / 2
If you want to check for the lower of O1 and C1, you could use:
ABS(O1 <= C1) * O1 + ABS(O1 > C1) * C1
(O1 + C1 - ABS(O1 - C1)) / 2
Min Max PCFs
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Quiktdr,
The Personal Criteria Formula does not recognize && syntax and it should not be used.
XAVGC5 - C1 <= 0 AND C - XAVGC5 >= .02 AND (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) < 0
Would check for the current 5-period exponential moving average to be less than or equal to the previous close, the current price to be at least .02 above the current 5-period exponential moving average and the current MS to be less than 5 bars ago. The formula could be shortened significantly.
XAVGC5 <= C1 AND C >= XAVGC5 + .02 AND MS < MS1.5
While:
XAVGC5 - C1 >= 0 AND C - XAVGC5 <= .02 AND (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) > 0
Would check for the current 5-period exponential moving average to be greater than or equal to the previous close, the current price to be at least .02 below the current 5-period exponential moving average and the current MS to be greater than 5 bars ago. The formula could be shortened significantly.
XAVGC5 >= C1 AND C <= XAVGC5 + .02 AND MS > MS1.5
The formulas without the &&s in them can be used in both TC2000 version 7 and TC2000 version 12.4.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
I appreciate your answrer but your shortened version does not seem to be the same as their are some differences in revised version. XAVGC5 - C1 <= 0 AND C - XAVGC5 >= .02 AND (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) < 0 and XAVGC5 - C1 >= 0 AND C - XAVGC5 <= .02 AND (100* (MS - MS1.5) / ( max(ms1,99) - min(ms1,99) )) > 0 mimic the original formula by replacing the and instead of &&.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The long and short versions of the formulas without the &&s in them definitely return exactly the same results on my system.
Neither revised version of the formulas match the results of the versions with &&s in them because the && syntax is not valid.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
You are correct! Thank you
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
you are correct on the daily but it is different on the 15' Thank you
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I get identical results when the long and short versions of each formula are set to 15 minutes as well as when they are set to daily. They just have to be set to the same time frame.
I do not know why you would be getting different results. The formulas are mathematically equivalent to each other.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |