Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 1/24/2005 Posts: 97
|
I'm trying to create my own doji with an open and close range not exceeding 5% of the bar
(O - C) < (H - L)/20)
I also tried (O - C) < (.05*(H - L) But keep getting an error in the syntax version on both-any suggestions about what I'm doing wrong....
I already tried the Boolean doji version you have but it's not doing what I want so can someone help me with what I'm doing with this? Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The error messages are probably the result of the mis-matched parentheses, but you are going to want to take the Absolute Value of the Open minus Close instead of using the raw Open minus Close. In the versions you have written, the (O - C) will be negative whenever the Open is higher than the Close. This results in the formula always being True when the Open is Higher than the Close even if they are quite far about relative to the entire Range of the Candle. So what you want is:
ABS(O - C) < (H - L) / 20
Or:
ABS(O - C) < .05 * (H - L)
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 1/24/2005 Posts: 97
|
Bruce-thanks that was helpful-one more thing-just out of curiosity is ABS something that is used just on the Worden platform or is it used across most trading and charting platforms? Thanks!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I can only guarantee the exact format within TeleChart (StockFinder's RealCode uses System.Math.Abs() for example), but lots of other products implement an Absolute Value function and many of those use the ABS() form as well. The reason for this is that Absolute Value is a well defined and widely used concept in mathematics.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |