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

Write a PCF, Dollar Vol + ATR15 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kevinvoisin
Posted : Friday, November 23, 2012 12:14:56 PM
Registered User
Joined: 10/26/2009
Posts: 24

I have PCF's for dollar volume and for ATR15, I want to write a condition, to be true when my Dollar volume is > $30M and my ATR15 > 3.00 combining the 2

StockGuy
Posted : Friday, November 23, 2012 12:19:43 PM

Administration

Joined: 9/30/2004
Posts: 9,187

You can paste both formulas into one PCF.  Add "> 30000000" after the Dollar Volume formula and "> 3" after the ATR formula.  Put an AND between the two:

 

Your Dollor Volume Formula > 30000000 AND Your ATR Formula > 3

Bruce_L
Posted : Friday, November 23, 2012 12:20:52 PM


Worden Trainer

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

Your best bet is probably just to add both Personal Criteria Formulas to the same EasyScan as EasyScan Conditions.

EasyScan Basics
EasyScan Expanded

That said, it should be possible to combine both PCFs into a single PCF by putting an AND between them and comparing the results of the Indicator Formulas to their values. For example, your Condition Formula might look something like the following:

C * V > 30000000 AND (AVGH15 - AVGL15) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14)) / 30 > 3

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



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kevinvoisin
Posted : Friday, November 23, 2012 4:34:22 PM
Registered User
Joined: 10/26/2009
Posts: 24

Thanks a lot Bruce, I'll try this

jas0501
Posted : Wednesday, December 5, 2012 1:58:54 PM
Registered User
Joined: 12/31/2005
Posts: 2,499

Instead of using a fixed dollar value of ATR15 > 3 you might consider using a price percentage. This would be less restrictive and provide a more predictable performance selection based on percentage move  instead of dollar move. It would also include lower priced stocks, which might not be desired, so a price qualifier might be needed.

So for a ATR15/C 4.5% price change the original formula

(AVGH15 - AVGL15) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14)) / 30 > 3

would become

(100*((AVGH15 - AVGL15) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14)) / 30)/C) > 4.5

4.5% is an arbitrary value. Pick your poison.

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.