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 |

Up / Down Vol PCF converting to Stockfinder Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
abnim3
Posted : Tuesday, November 17, 2009 12:43:24 PM
Gold Customer Gold Customer

Joined: 2/9/2005
Posts: 20

Bruce,
I created an up/down vol pcf in Telechart. Seem to be having trouble re creating it in real code.  Can you help me out? This was the pcf formula.
((C > C1) * V + (C1 > C2) * V1 + (C2 > C3) * V2 + (C3 > C4) * V3 + (C4 > C5) * V4 + (C5 > C6) * V5 + (C6 > C7) * V6 + (C7 > C8) * V7 + (C8 > C9) * V8 + (C9 > C10) * V9 + (C10 > C11) * V10 + (C11 > C12) * V11 + (C12 > C13) * V12 + (C13 > C14) * V13 + (C14 > C15) * V14 + (C15 > C16) * V15 + (C16 > C17) * V16 + (C17 > C18) * V17 + (C18 > C19) * V18 + (C19 > C20) * V19 + (C20 > C21) * V20 + (C21 > C22) * V21 + (C22 > C23) * V22 + (C23 > C24) * V23 + (C24 > C25) * V24 + (C25 > C26) * V25 + (C26 > C27) * V26 + (C27 > C28) * V27 + (C28 > C29) * V28 + (C29 > C30) * V29 + (C30 > C31) * V30 + (C31 > C32) * V31 + (C32 > C33) * V32 + (C33 > C34) * V33 + (C34 > C35) * V34 + (C35 > C36) * V35 + (C36 > C37) * V36 + (C37 > C38) * V37 + (C38 > C39) * V38 + (C39 > C40) * V39 + (C40 > C41) * V40 + (C41 > C42) * V41 + (C42 > C43) * V42 + (C43 > C44) * V43 + (C44 > C45) * V44 + (C45 > C46) * V45 + (C46 > C47) * V46 + (C47 > C48) * V47 + (C48 > C49) * V48 + (C49 > C50) * V49) / ((C < C1) * V + (C1 < C2) * V1 + (C2 < C3) * V2 + (C3 < C4) * V3 + (C4 < C5) * V4 + (C5 < C6) * V5 + (C6 < C7) * V6 + (C7 < C8) * V7 + (C8 < C9) * V8 + (C9 < C10) * V9 + (C10 < C11) * V10 + (C11 < C12) * V11 + (C12 < C13) * V12 + (C13 < C14) * V13 + (C14 < C15) * V14 + (C15 < C16) * V15 + (C16 < C17) * V16 + (C17 < C18) * V17 + (C18 < C19) * V18 + (C19 < C20) * V19 + (C20 < C21) * V20 + (C21 < C22) * V21 + (C22 < C23) * V22 + (C23 < C24) * V23 + (C24 < C25) * V24 + (C25 < C26) * V25 + (C26 < C27) * V26 + (C27 < C28) * V27 + (C28 < C29) * V28 + (C29 < C30) * V29 + (C30 < C31) * V30 + (C31 < C32) * V31 + (C32 < C33) * V32 + (C33 < C34) * V33 + (C34 < C35) * V34 + (C35 < C36) * V35 + (C36 < C37) * V36 + (C37 < C38) * V37 + (C38 < C39) * V38 + (C39 < C40) * V39 + (C40 < C41) * V40 + (C41 < C42) * V41 + (C42 < C43) * V42 + (C43 < C44) * V43 + (C44 < C45) * V44 + (C45 < C46) * V45 + (C46 < C47) * V46 + (C47 < C48) * V47 + (C48 < C49) * V48 + (C49 < C50) * V49)

Bruce_L
Posted : Tuesday, November 17, 2009 12:56:42 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following RealCode Indicator:

'# Period = UserInput.Integer = 50
Static Up As Single
Static Down As Single
If isFirstBar Then
    Up = 0
    Down = 0
Else
    If Price.Last > Price.Last(1) Then
        Up += Volume.Value
    Else If Price.Last < Price.Last(1) Then
        Down += Volume.Value
    End If
End If
If CurrentIndex > Period AndAlso Down > 0 Then
    If Price.Last(Period) > Price.Last(Period + 1) Then
        Up -= Volume.Value(Period)
    Else If Price.Last(Period) < Price.Last(Period + 1) Then
        Down -= Volume.Value(Period)
    End If
    Plot = Up / Down
Else If CurrentIndex = Period AndAlso Down > 0 Then
    Plot = Up / Down
Else
    Plot = Single.NaN
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
abnim3
Posted : Tuesday, November 17, 2009 7:56:32 PM
Gold Customer Gold Customer

Joined: 2/9/2005
Posts: 20

That got it..   Thanks Bruce

Bruce_L
Posted : Wednesday, November 18, 2009 9:05:46 AM


Worden Trainer

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

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