Registered User Joined: 10/7/2004 Posts: 45
|
Hi - I am working on a pcf condition which finds situations where the Open - Close of todays bar is less than 25% of the daily range of the prior days bar. I have written the pcf as SQR((O-C)*(O-C))<=(H1-L1)*.25. I have used thwe square root of the square of the open - close range so that the result is a positive number reguardless of whether the bar closes higher or lower on the day. When I use this formula to scan a list of 85 stocks, it returns very few positive results and misses many stocks which return "true" when the condition is checked on the individual stocks.
I also have modified the formula to look for the same result when comparing yesterdays open / close range versus the daily range from two day ago. I have written the modified formula as SQR((O1-C1)*(O1-C1))<=(H2-L2)*.25 This version of the pcf always returns every stock in my scan list as "true" even though most of the stocks do not meet the criterea.
Do you have any idea of what I am doing wrong?
Thanks very much!!!!!!!
I would be thrilled to have you call me at 5123-919-1233 as this is driving me crazy
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Open - Close of todays bar is less than 25% of the daily range:
ABS(O-C) / (H1-L1) < .25
Yesterday's open / close range versus the daily range from two days ago:
ABS(O1-C1) / (H2-L2) < .25
|
Registered User Joined: 10/7/2004 Posts: 45
|
Your formula is perfect - thanks very much!
|