Registered User Joined: 3/6/2017 Posts: 7
|
How to building this filter condition in stockfinder5 : "After the market open ,the price is less than today's first 15min bar's hihg and the price is more than taoday's first 15min bar's low " ?
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following is not specific to a 15 minute time frame. It just checks to see if the current price is less than the high and greater than the low of the first bar of the trading day (if the time frame is daily or less).
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Inside First Bar
'|******************************************************************
Static FBH As Single
Static FBL As Single
If isFirstBar Then
FBH = Single.NaN
FBL = Single.NaN
Else
If Price.DateValue.TimeOfDay < Price.DateValue(1).TimeOfDay Then
FBH = Price.High
FBL = Price.Low
End If
End If
If Single.IsNaN(FBH) Then
SetIndexInvalid
Else
If FBL < Price.Last AndAlso _
Price.Last < FBH Then
Pass
End If
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 3/6/2017 Posts: 7
|
thank you bruce :)
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|