Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/30/2008 Posts: 97
|
How would I create a realcode scan condition that found stocks in which the last day's range (high minus low) is the narrowest (smallest range) in the last 7 days. This is sometimes referred to as NR7.
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Narrow Range
'|******************************************************************
'# Period = UserInput.Integer = 7
Dim Counter As Integer = 1
While Counter < Period AndAlso _
Price.TradeRange < Price.TradeRange(Counter)
Counter += 1
End While
If Counter = Period Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/8/2008 Posts: 2
|
Bruce - I cut and pasted this into the real code editor and itg will not compile - it says "name pass not declared" - what am I doing wrong??
|
|
Registered User Joined: 8/8/2008 Posts: 2
|
Bruce - never mind - I just figureed out the difference bewteen a 'condition' and an 'indicator' Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
thewolf,
I'm happy to read you were able to figure it out on your own.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |