Registered User Joined: 10/7/2004 Posts: 56
|
Hi Bruce,
I would like a condition that is true if a stock is at $XX.95
For example, $9.95 $10.95 $14.95
Actually, nothing key about "95 cents", just want to be able to search for true at any inputed amount in decimals, for example an even dollar amount at $9.00 $10.00 etc... although I will probably use .10 and .90 as the primary numbers to start out with
Thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following RealCode Condition:
Writing Conditions in RealCode
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:After Decimal
'|******************************************************************
'# AfterDecimal = UserInput.Integer = 95
Dim Test As Integer = 100 * (Price.Last - System.Math.Truncate(Price.Last))
If Test = AfterDecimal Then
Pass
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|