Registered User Joined: 7/29/2010 Posts: 417
|
Bruce,
I keep getting error messages trying to create a pcf for bars in the squeeze :
TrueInRow(STDDEV20*4<=3*ATR20,100)
I think the above is what gives me the error message.
The error says I need a ( at position 9.
Please help.
Also, when using something like the above, if I want to only include situtations where the squeeze has lasted at least say 3 bars I just append it with another condition at the end like this:
TrueInRow(STDDEV20*4<=3*ATR20,100) >=3
Is that correct?
Thank you,
Don
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The formula just works when I copy and paste it from your forum post into TC2000 v17. Are you sure the version on your computer doesn't have a space between TrueInRow and the opening parenthesis or something similar?
Yes, just adding >= 3 to the end should accomplish at least my understanding of what you are trying to do.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 7/29/2010 Posts: 417
|
Bruce,
Thank you.
I will have to pay attention to this..."have a space between TrueInRow and the opening parenthesis or something similar." This may be the problem .
So any formula can be appended with a numeric value restriction at the end.
ie.
< or > or = some number less than the period number.
Don
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You cannot just append any old formula with a Boolean relational operator and a number and have it make sense. It won't make sense if the formula is already Boolean and returns true or false instead of a numeric value.
The TrueInRow() function specifically returns an integer from 0 to its period. So the TrueInRow() function on its own is numeric and not Boolean.
You can add a Boolean relational operator followed by a numeric value (or something else returning a numeric value) to the end of formulas returning numeric values to convert the formula into a condition returning true or false instead.
Boolean Relational Operators and Functions Table
-Bruce Personal Criteria Formulas TC2000 Support Articles
|