Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Need PCF Converted to S.F. Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jsatt11
Posted : Wednesday, September 8, 2010 8:49:19 AM
Registered User
Joined: 11/26/2007
Posts: 116
I need help converting this PCF to SF: C > C1 AND V > ABS(C1 < C2) * V1 AND V > ABS(C2 < C3) * V2 Thanks
Bruce_L
Posted : Wednesday, September 8, 2010 9:30:30 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Up above Max Down Volume
'|******************************************************************
'# Period = UserInput.Integer = 2
If CurrentIndex > Period Then
    If Price.Last > Price.Last(1) Then
        Dim Test As Boolean = True
        For i As Integer = 1 To Period
            If Price.Last(i) < Price.Last(i + 1) AndAlso _
                Volume.Value <= Volume.Value(i) Then
                Test = False
                Exit For
            End If
        Next
        If Test = True Then
            Pass
        End If
    End If
Else
    SetIndexInvalid
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jsatt11
Posted : Wednesday, September 8, 2010 10:29:26 AM
Registered User
Joined: 11/26/2007
Posts: 116
As usual Bruce....great service.Thanks!!
Bruce_L
Posted : Wednesday, September 8, 2010 10:33:08 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
anindya_chak
Posted : Wednesday, September 8, 2010 2:50:05 PM
Gold Customer Gold Customer

Joined: 5/3/2010
Posts: 86
Bruce....I see you use the CurrentIndex variable - is this a property or method.....

And whats the SetIndexInvalid method doing ?


TIA
Bruce_L
Posted : Wednesday, September 8, 2010 3:05:48 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
anindya_chak,
I'm not a programmer, but according to the RealCode API, CurrentIndex is a property.

SetIndexInvalid will force the Condition to not return anything for the currently calculating Bar as opposed to returning either True or False. The reason to do so is this allows for automatic adjustments to the amount of data used when the Condition is used in a WatchList to return only a single result.

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