Registered User Joined: 8/24/2007 Posts: 43
|
Do you have or can you create:
three down (or up) days in a row with diminishing rate of change. Thanks.
Andreas W
|
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:Diminishing ROC
'|******************************************************************
'# Period = UserInput.Integer = 3
Static Count As Integer
If isFirstBar Then
Count = 0
Else If CurrentIndex >= 2 AndAlso _
System.Math.Sign(Price.NetChange) = _
System.Math.Sign(Price.NetChange(1, 1)) AndAlso _
System.Math.Abs(Price.NetChange) < _
System.Math.Abs(Price.NetChange(1, 1)) Then
Count += 1
Else
Count = 0
End If
If CurrentIndex > Period Then
If Count >= Period Then
Pass
End If
Else
SetIndexInvalid
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|