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

Pocket Pivot by Dr.Chris Kacher Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
joseph168
Posted : Monday, April 23, 2012 5:09:42 PM
Registered User
Joined: 3/10/2009
Posts: 27

Hi Bruce,

How are you? Could you help me on a PCF Custom indictor to show today's up-volume is greater than  the largest down-volume day over the prior 10 days. 

 

Thanks,

Joseph

Jpetesmith
Posted : Tuesday, April 24, 2012 1:11:35 AM
Registered User
Joined: 5/9/2010
Posts: 144

You may find the answer here.

Volume down/up days

Bruce_L
Posted : Tuesday, April 24, 2012 7:01:48 AM


Worden Trainer

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

A Condition Formula for a Pocket Pivot could be written as:

C > C1 AND V > ABS(C1 < C2) * V1 AND V > ABS(C2 < C3) * V2 AND V > ABS(C3 < C4) * V3 AND V > ABS(C4 < C5) * V4 AND V > ABS(C5 < C6) * V5 AND V > ABS(C6 < C7) * V6 AND V > ABS(C7 < C8) * V7 AND V > ABS(C8 < C9) * V8 AND V > ABS(C9 < C10) * V9 AND V > ABS(C10 < C11) * V10

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joseph168
Posted : Tuesday, April 24, 2012 12:46:02 PM
Registered User
Joined: 3/10/2009
Posts: 27

 

Hi Bruce,
 
Thanks for your suggestion.
 
Please my formula below , what was the major difference between our formulas?
 
Thanks,
Joseph
 
 
c>c1 and ((c1>c2) or (c1<c2) and (v > v1)) and
((c2>c3) or (c2<c3) and (v > v2)) and
((c3>c4) or (c3<c4) and (v > v3)) and
((c4>c5) or (c4<c5) and (v > v4)) and
((c5>c6) or (c5<c6) and (v > v5)) and
((c5>c7) or (c6<c7) and (v > v6)) and
((c7>c8) or (c7<c8) and (v > v7)) and
((c8>c9) or (c8<c9) and (v > v8)) and
((c9>c10) or (c9<c10) and (v > v9)) and
((c10>c11) or (c10<c11) and (v > v10))
Bruce_L
Posted : Tuesday, April 24, 2012 1:40:56 PM


Worden Trainer

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

One big difference is the technique.

In my formula I'm using the idea that if a boolean (true or false) inside an ABS() function will return 1 if true and 0 if false. I then multiply that by the volume and compare this numeric result directly with the current volume.

So on each of the 10-prior days I'm comparing the current volume to the prior volume when the net change is down and the current volume to zero otherwise.

Broken down by individual day it would look like:

C > C1 AND 
V > ABS(C1 < C2) * V1 AND 
V > ABS(C2 < C3) * V2 AND 
V > ABS(C3 < C4) * V3 AND 
V > ABS(C4 < C5) * V4 AND 
V > ABS(C5 < C6) * V5 AND 
V > ABS(C6 < C7) * V6 AND 
V > ABS(C7 < C8) * V7 AND 
V > ABS(C8 < C9) * V8 AND 
V > ABS(C9 < C10) * V9 AND 
V > ABS(C10 < C11) * V10

Your version compares the current volume to the prior volume in all cases but tries to only return true when the net change is negative and the current volume is greater than the volume of the bar.

There are some parentheses issues which prevent the order of operation from happening in the correct order and you counter condition checks for a positive net change instead of checking for the net change to be greater than or equal to zero.

Adjusting the parentheses a bit to both force the order of operations and make the order obvious would result in:

C > C1 AND 
(C1 >= C2 OR (C1 < C2 AND V > V1)) AND 
(C2 >= C3 OR (C2 < C3 AND V > V2)) AND 
(C3 >= C4 OR (C3 < C4 AND V > V3)) AND 
(C4 >= C5 OR (C4 < C5 AND V > V4)) AND 
(C5 >= C6 OR (C5 < C6 AND V > V5)) AND 
(C5 >= C7 OR (C6 < C7 AND V > V6)) AND 
(C7 >= C8 OR (C7 < C8 AND V > V7)) AND 
(C8 >= C9 OR (C8 < C9 AND V > V8)) AND 
(C9 >= C10 OR (C9 < C10 AND V > V9)) AND 
(C10 >= C11 OR (C10 < C11 AND V > V10))

I must be missing a typo in there somewhere though. It still doesn't return true on every bar where I think it should.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joseph168
Posted : Tuesday, April 24, 2012 1:55:06 PM
Registered User
Joined: 3/10/2009
Posts: 27

Hi Bruce,

Yes it was my mistake , there were some parentheses issues on my formula.

I do not understand why  you need the "Price*Volume", it was not a requirement at the book "Trade Like an O'Neil Disciple"  on Page-133 By Gil Morales and Dr. Chris Kacher.

The sentence was " On the Pocket pivot you want to see up-voulme equal to or greater than the largest  down-volume day over the prior 10 days."

Thanks,

Joseph

 

 

 

 

Bruce_L
Posted : Tuesday, April 24, 2012 1:59:13 PM


Worden Trainer

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

I'm not multiplying price by volume.

ABS(C1 < C2)

Will return 1 when C1 < C2 is true and 0 when false.

So the following:

ABS(C1 < C2) * V1

Returns V1 when true and zero when false.

And:

V > ABS(C1 < C2) * V1

Is comparing the current volume to either the prior volume or zero depending on if C1 < C2 is true or false.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joseph168
Posted : Tuesday, April 24, 2012 2:10:29 PM
Registered User
Joined: 3/10/2009
Posts: 27

Hi Bruce,

Thanks you very much! You have done a good job!

Regards,

Joseph

 

 

Bruce_L
Posted : Tuesday, April 24, 2012 2:12:53 PM


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.