Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 5/27/2010 Posts: 153
|
Could you provide me with 2 seperate scans please..They will be used intraday throughout the day.
the first one is
a stock that has made a low and is now pulling back 25% from it's intraday low starting to grind higher.
(like picturing a rounded bottom)
the second is
a stock that has made a high and is now rolling over and is 25% from it's intraday high.
(like picturing a rounded top)
Thank You-Rick
|
|
Registered User Joined: 5/27/2010 Posts: 153
|
I don't see the reply post.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm going to assume you mean 25% of the Daily Range from the High or Low as a 25% move in Price could hardly be called grinding. You might be able to write the first one as:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Twenty Five Percent Above Low
'|******************************************************************
Static DayLow As Single
Static DayHigh As Single
Static Valid As Boolean
If isFirstBar Then
DayLow = Single.NaN
DayHigh = Single.NaN
Valid = False
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
DayLow = Price.Low
DayHigh = Price.High
Valid = True
End If
DayLow = System.Math.Min(DayLow, Price.Low)
DayHigh = System.Math.Max(DayHigh, Price.High)
If Valid = True Then
If DayHigh > DayLow Then
If (Price.Last - DayLow) / (DayHigh - DayLow) >= .25 Then
Pass
End If
End If
Else
SetIndexInvalid
End If
And you might be able to write the second one as:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Twenty Five Percent Below High
'|******************************************************************
Static DayLow As Single
Static DayHigh As Single
Static Valid As Boolean
If isFirstBar Then
DayLow = Single.NaN
DayHigh = Single.NaN
Valid = False
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
DayLow = Price.Low
DayHigh = Price.High
Valid = True
End If
DayLow = System.Math.Min(DayLow, Price.Low)
DayHigh = System.Math.Max(DayHigh, Price.High)
If Valid = True Then
If DayHigh > DayLow Then
If (Price.Last - DayLow) / (DayHigh - DayLow) <= .75 Then
Pass
End If
End If
Else
SetIndexInvalid
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/27/2010 Posts: 153
|
Bruce, Thank You
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |