Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Help with realcode for narrow range day... Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
lordnel
Posted : Friday, March 5, 2010 10:50:00 AM
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
Bruce_L
Posted : Friday, March 5, 2010 11:04:28 AM


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
thewolf
Posted : Thursday, March 11, 2010 4:23:51 PM
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??
thewolf
Posted : Thursday, March 11, 2010 4:32:48 PM
Registered User
Joined: 8/8/2008
Posts: 2
Bruce - never mind - I just figureed out the difference bewteen a 'condition' and an 'indicator' Thanks
Bruce_L
Posted : Thursday, March 11, 2010 4:36:25 PM


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
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.