Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/4/2005 Posts: 13
|
Is there a way to do a search for stocks making an all-time high in Telechart?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I do not know of a way to write a Personal Criteria Formula for an "all time high". That said, you may wish to try the following:
Watch this short video: Sort by Visual Value to find new highs and lows in price and indicators
Once its over, open TeleChart, make your charts quarterly and zoom all the way out (zoom 1).
Do a Visual Value sort of Price.
This will bring stocks at or near their all-time high to the top.
It is possible to search for "all time highs" (or at least the highest high in the available data) using Blocks.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/29/2007 Posts: 19
|
How do you find an all time high in Blocks?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
BerkoBob,
There are quite a few ways, but one of the following RealCode Conditions should work (but the results will be limited to the data set being used by the Condition):
'At All Time High
'#Cumulative
Static High As Single
If isFirstBar Then High = Price.High
If Price.High = High Then Pass
High = System.Math.Max(High,Price.High)
'New All Time High
'#Cumulative
Static High As Single
If isFirstBar Then
High = Price.High
Pass
End If
If Price.High > High Then Pass
High = System.Math.Max(High,Price.High)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/29/2007 Posts: 19
|
Hi Bruce,
Thanks. I get the following error:
"Static local variable "High" is already declared."
What do you suggest?
Bob
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
BerkoBob,
It reads like you pasted both Conditions in the same RealCode Condition. The topic has two Conditions (each starting with a commented out description) with a blank line in between them.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/29/2007 Posts: 19
|
Oh yes, I see. Oops. Sorry about that.
What's the difference between the two conditions?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
BerkoBob,
At All Time High will return True if the current High is the all time high even if the High has been reached before.
New All Time High will only return True if the current High is higher than any previous High.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/29/2007 Posts: 19
|
Thank you. That's Great!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
BerkoBob,
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |