Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Code request Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
cliffhanger31
Posted : Tuesday, March 1, 2011 6:35:47 PM
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
Bruce_L
Posted : Wednesday, March 2, 2011 10:01:43 AM


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
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.