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

volume PCF (OBV ?) Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Herky_love
Posted : Sunday, April 14, 2013 12:05:40 AM
Registered User
Joined: 2/2/2005
Posts: 82

I would like to plot volume increasing for each bar that (C > C1) or (C<C1).  The volume plotted is positve or negative based on the cumulative volume.

Should C>C1 and volume be negative (or vice versa), then switch between the two, OBV = V * (C > C1) + V * (C<C1).

I could've written the code by now to accomplish what I desire.

I do this all the time (in code).  Why is this idea SO difficult in TC2000 vX.YZ?

Do NOT answer the last qwexion.  Please respond how to write the PCF.

Herky_love
Posted : Sunday, April 14, 2013 12:20:24 AM
Registered User
Joined: 2/2/2005
Posts: 82

R U serious?  I'm unable to edit my post?

Bruce_L
Posted : Monday, April 15, 2013 8:21:19 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

All of our products have OBV built into them as an indicator. Although I can't think of a reason to do so beyond learning how it is done, you could also create an OBV indicator with a Custom PCF Cumulative Indicator with the following settings:

Up Condition: C > C1
Down Condition: C < C1
Value to Add/Subtract: V

There are other ways this could be constructed. You could use the following settings instead:

Up Condition: C > C - 1
Down Condition: C < C - 1
Value to Add/Subtract: SGN(C - C1) * V

Or:

Up Condition: C > C - 1
Down Condition: C < C - 1
Value to Add/Subtract: V * (C < C1) - V * (C > C1)

Or:

Up Condition: C > C - 1
Down Condition: C < C - 1
Value to Add/Subtract: V * ABS(C > C1) - V * ABS(C < C1)

The syntax for On Balance Volume in the Personal Criteria Formula Language is just:

OBV

PCF Formula Descriptions

Note that the actual value of OBV is completely meaningless. You may want to read through the following topic to get an understanding of why.

Dealing with OBV & MS in PCF's - how to interp their "values"



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Herky_love
Posted : Monday, April 15, 2013 3:05:33 PM
Registered User
Joined: 2/2/2005
Posts: 82

Thanx for the reply.  The solutions you've presented appear to be variations on the same theme.  I took a look at the links you provided also.  I thought this may work for me:

UP-day: C>C1

DOWN-day: C<C1

VALUE:

V-OBV1*((C>C1 and OBV1<0) OR (C<C1 AND OBV1>0))

But this doesn't work either.

The volume indicator I'm looking for would accumulate default OBV volume only for consecutive up or down days.  Any arbitrary advance or decline that that is opposite of the preceding day should only indicate that days volume (either positive or negative as the case may be).

Herky_love
Posted : Monday, April 15, 2013 3:12:43 PM
Registered User
Joined: 2/2/2005
Posts: 82

Woah.  I looked in your link PCF Formula descriptions:

Placing a Boolean expression inside parentheses will return -1 for True or 0 for False when it is part of a larger value based formula.

Placing a Boolean expression inside an ABS() function will return 1 for True or 0 for False when it is part of a larger value based formula.

That's some very useful information.

 

Bruce_L
Posted : Monday, April 15, 2013 3:31:39 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I had not guessed your intent from your original post as you just appeared to be describing OBV. My current guess at your intent would result in using the following Indicator Formula as the Formula in a Custom PCF Indicator:

SGN(C - C1) * (ABS(SGN(C - C1) <> SGN(C1 - C2)) * V + ABS(SGN(C - C1) = SGN(C1 - C2)) * (ABS(SGN(C1 - C2) <> SGN(C2 - C3)) * 2 * AVGV2 + ABS(SGN(C1 - C2) = SGN(C2 - C3)) * (ABS(SGN(C2 - C3) <> SGN(C3 - C4)) * 3 * AVGV3 + ABS(SGN(C2 - C3) = SGN(C3 - C4)) * (ABS(SGN(C3 - C4) <> SGN(C4 - C5)) * 4 * AVGV4 + ABS(SGN(C3 - C4) = SGN(C4 - C5)) * (ABS(SGN(C4 - C5) <> SGN(C5 - C6)) * 5 * AVGV5 + ABS(SGN(C4 - C5) = SGN(C5 - C6)) * (ABS(SGN(C5 - C6) <> SGN(C6 - C7)) * 6 * AVGV6 + ABS(SGN(C5 - C6) = SGN(C6 - C7)) * (ABS(SGN(C6 - C7) <> SGN(C7 - C8)) * 7 * AVGV7 + ABS(SGN(C6 - C7) = SGN(C7 - C8)) * (ABS(SGN(C7 - C8) <> SGN(C8 - C9)) * 8 * AVGV8 + ABS(SGN(C7 - C8) = SGN(C8 - C9)) * (ABS(SGN(C8 - C9) <> SGN(C9 - C10)) * 9 * AVGV9 + ABS(SGN(C8 - C9) = SGN(C9 - C10)) * (ABS(SGN(C9 - C10) <> SGN(C10 - C11)) * 10 * AVGV10 + ABS(SGN(C9 - C10) = SGN(C10 - C11)) * (ABS(SGN(C10 - C11) <> SGN(C11 - C12)) * 11 * AVGV11 + ABS(SGN(C10 - C11) = SGN(C11 - C12)) * (ABS(SGN(C11 - C12) <> SGN(C12 - C13)) * 12 * AVGV12 + ABS(SGN(C11 - C12) = SGN(C12 - C13)) * (ABS(SGN(C12 - C13) <> SGN(C13 - C14)) * 13 * AVGV13 + ABS(SGN(C12 - C13) = SGN(C13 - C14)) * (ABS(SGN(C13 - C14) <> SGN(C14 - C15)) * 14 * AVGV14 + ABS(SGN(C13 - C14) = SGN(C14 - C15)) * (ABS(SGN(C14 - C15) <> SGN(C15 - C16)) * 15 * AVGV15 + ABS(SGN(C14 - C15) = SGN(C15 - C16)) * (ABS(SGN(C15 - C16) <> SGN(C16 - C17)) * 16 * AVGV16 + ABS(SGN(C15 - C16) = SGN(C16 - C17)) * (ABS(SGN(C16 - C17) <> SGN(C17 - C18)) * 17 * AVGV17 + ABS(SGN(C16 - C17) = SGN(C17 - C18)) * (ABS(SGN(C17 - C18) <> SGN(C18 - C19)) * 18 * AVGV18 + ABS(SGN(C17 - C18) = SGN(C18 - C19)) * (ABS(SGN(C18 - C19) <> SGN(C19 - C20)) * 19 * AVGV19 + ABS(SGN(C18 - C19) = SGN(C19 - C20)) * (ABS(SGN(C19 - C20) <> SGN(C20 - C21)) * 20 * AVGV20))))))))))))))))))))

It uses the techniques described in the Days Since Last Peak (or other day-counting needs) and maxes out at 20 consecutive bars where the net change is in the same direction. If there are 21 or more consecutive bars, it will only return the sum of the most recent 20 bars.

You are correct that putting booleans inside parentheses or an ABS() function is incredibly useful and it is utilized above. That said, the Personal Criteria Formula Language still doesn't have looping structures or variables and the entire logic of whatever you are attempting to create needs to be contained within a single logical line.

This means the above formula needs to contemplate all twenty possibilties for the number of consecutive bars in a row with the same net change individually and can't go beyond that without modifying the formula. It is a lot more complicated to create than if it were done using a scripting or programming language instead of a formula language.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Herky_love
Posted : Monday, April 15, 2013 5:29:44 PM
Registered User
Joined: 2/2/2005
Posts: 82

You're absolutely correct about the complexity issue.  I'm staggered at your suggested solution.  I've been struggling with a seemingly simple indicator for 5 days now.

Just to be clear, this is what I'm after:

C5 > C6 then ACCUM(V5) = V5

C4>C5 then ACCUM(V4) = V5+V4

C3>C4 then ACCUM(V3) = V5+V4+V3

C2 < C3 then ACCUM(V2) = -V2

C1 < C2 then ACCUM(V1) = -(V2 + V1)

C > C1 then ACCUM(V) = V

Where ACCUM(Vx) = conditional accumulated volume for any arbitrary bar being evaluated.  Is there truly no way to implement:

Value to add/subract:

V+OBV1*((C>C1 and OBV1<0) OR (C<C1 AND OBV1>0))

I may have to concede defeat and acquiesce to utilizing OBV as is.  After all, the information I'm looking for is embedded in it the wave plotted.

Is RealCode for TC2000 v12.3 an option?  I've seen posts describing how to do what I'm after implementing RealCode.  I can make VB .NET jump through hoops.

Bruce_L
Posted : Tuesday, April 16, 2013 7:41:11 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I am not quite sure what I am missing as I have read through your posts numerous times and when I implement the formula in my Monday, April 15, 2013 3:31:39 PM ET post as both an Indicator Formula and as a Custom PCF Indicator, the results appear to match the descriptions in your Monday, April 15, 2013 3:05:33 PM ET and Monday, April 15, 2013 5:29:44 PM ET posts.

Can you please provide some example symbols where the results do not meet your expectations along with an explanation of the difference between what you want and the actual results so I can better understand what you want? This may allow me to modify the formula to meet your actual requirements instead of my current understanding of your requirements.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Herky_love
Posted : Thursday, April 18, 2013 11:46:58 AM
Registered User
Joined: 2/2/2005
Posts: 82

Quite frankly,

I've not tried your suggestoin as it is too tedious to type that PFC in.

Bruce_L
Posted : Thursday, April 18, 2013 11:50:05 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I never imagined that you would type it in. You would copy and paste it from the from the forums into TC2000. You should be able to highlight the formula, right-click on it and select copy to get the formula into the clipboard. You can then paste it into TC2000 using ctrl-v.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Herky_love
Posted : Thursday, April 18, 2013 12:18:19 PM
Registered User
Joined: 2/2/2005
Posts: 82

I did a forum-search about the matter and found this:

http://forums.worden.com/default.aspx?g=posts&t=55888

If I would've known this, the bald spot and flat spot on my head wouldn't be so pronounced.  On closer inspection I noticed that post was a year ago and pertainent to version 12.1.  So, I just tried your suggestion and lo and BEHOLD!  Copy & paste works In the New indicator PCF forumula!

It is however non-functional in the custom accumulator (which is what I'd been working with for the last week).  Its good to know that there's a work-around if the Copy / Paste dialogue aren't available.  It just didn't occur to me to utilize the hotkey-combo to access the clipboard.

Bottom line: I tried your formula as an indicator and IT WORKS!  Happy happy Joy JOY!  I need to get my brain around how it works, as that may be a useful technique for other custom accumulator indicator types.

Thanx Bruce.  You The Man!

 

 

 

Herky_love
Posted : Thursday, April 18, 2013 7:55:49 PM
Registered User
Joined: 2/2/2005
Posts: 82

Bruce you helped SO much.  I have to post the following image for illumination / edification purposes:

 

I'm totally not spamming and tried to PM Bruce (or any moderator) to no avail.  Apparently inter-forum messaging is not possible.

The motivation for my objective and in depth-analysis of the techinque can be found here:

(external link removed by moderator)

Question to Bruce:

Is it possible to 'Wyckoff' any arbitrary watchlist in TC2000 v12.3 somehow?

That means I want to average the O/H/L/C (each if necessary) + Vol of a select number of components of any arbitrary watchlist.  And then indicator the result, i.e., akin to any arbitrary Monringstar Ind. Grp. Avg.?

FWIW: Worden Bro's have implemented some seriously decent features on the discussion forums.  Being able to post images akin to above is a great boon.

I'm not hung-up on the trendlines charted in the graphic above - as I have insight on that - for now.  My theory is that I can implement wave-filtering by Aurther Merril to accomplish that.  Quite frankly: that is next.

If TC2000 v12.3 hasn't the capability to avg. O/H/LC + V for an aggregate of any arbitrary watchlist, its not that big of deal; I can export the data and massage it in the 'Excel' type application of my choice.  The prollem is that I can't get the results back into the Worden product.

Your feedback greatly appreciated Bruce.

 

 

 

 

 

Herky_love
Posted : Thursday, April 18, 2013 8:09:39 PM
Registered User
Joined: 2/2/2005
Posts: 82

I'm sorry if I've violated proprietary information disclosure policy / rules / law.

Please delete any information that may cauase Worden, Inc. legal troubles.

 

Bruce_L
Posted : Friday, April 19, 2013 9:16:46 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

While it would probably be possible to do this in StockFinder using the Custom Market Indicator feature:

Custom Market Indicators
Market Indicators from Conditions

I cannot think of a way to do this in either version of TC2000.



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