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

PCF formula for Number of periods Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
magnar51
Posted : Friday, March 13, 2015 9:27:42 AM
Registered User
Joined: 6/7/2014
Posts: 2

Hi,

Is it possible to find:( Number of periods since 100 day  Highest High) as an number I can use in a PCF formula?

 

Thanks

Magnar

Bruce_L
Posted : Friday, March 13, 2015 1:52:48 PM


Worden Trainer

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

We can use the technique described in the Days Since Last Peak (or other day-counting needs) topic for this.

ABS(H < MAXH100) * (ABS(H1 = MAXH100) + ABS(H1 < MAXH100) * (ABS(H2 = MAXH100) * 2 + ABS(H2 < MAXH100) * (ABS(H3 = MAXH100) * 3 + ABS(H3 < MAXH100) * (ABS(H4 = MAXH100) * 4 + ABS(H4 < MAXH100) * (ABS(H5 = MAXH100) * 5 + ABS(H5 < MAXH100) * (ABS(H6 = MAXH100) * 6 + ABS(H6 < MAXH100) * (ABS(H7 = MAXH100) * 7 + ABS(H7 < MAXH100) * (ABS(H8 = MAXH100) * 8 + ABS(H8 < MAXH100) * (ABS(H9 = MAXH100) * 9 + ABS(H9 < MAXH100) * (ABS(H10 = MAXH100) * 10 + ABS(H10 < MAXH100) * (ABS(H11 = MAXH100) * 11 + ABS(H11 < MAXH100) * (ABS(H12 = MAXH100) * 12 + ABS(H12 < MAXH100) * (ABS(H13 = MAXH100) * 13 + ABS(H13 < MAXH100) * (ABS(H14 = MAXH100) * 14 + ABS(H14 < MAXH100) * (ABS(H15 = MAXH100) * 15 + ABS(H15 < MAXH100) * (ABS(H16 = MAXH100) * 16 + ABS(H16 < MAXH100) * (ABS(H17 = MAXH100) * 17 + ABS(H17 < MAXH100) * (ABS(H18 = MAXH100) * 18 + ABS(H18 < MAXH100) * (ABS(H19 = MAXH100) * 19 + ABS(H19 < MAXH100) * (ABS(H20 = MAXH100) * 20 + ABS(H20 < MAXH100) * (ABS(H21 = MAXH100) * 21 + ABS(H21 < MAXH100) * (ABS(H22 = MAXH100) * 22 + ABS(H22 < MAXH100) * (ABS(H23 = MAXH100) * 23 + ABS(H23 < MAXH100) * (ABS(H24 = MAXH100) * 24 + ABS(H24 < MAXH100) * (ABS(H25 = MAXH100) * 25 + ABS(H25 < MAXH100) * (ABS(H26 = MAXH100) * 26 + ABS(H26 < MAXH100) * (ABS(H27 = MAXH100) * 27 + ABS(H27 < MAXH100) * (ABS(H28 = MAXH100) * 28 + ABS(H28 < MAXH100) * (ABS(H29 = MAXH100) * 29 + ABS(H29 < MAXH100) * (ABS(H30 = MAXH100) * 30 + ABS(H30 < MAXH100) * (ABS(H31 = MAXH100) * 31 + ABS(H31 < MAXH100) * (ABS(H32 = MAXH100) * 32 + ABS(H32 < MAXH100) * (ABS(H33 = MAXH100) * 33 + ABS(H33 < MAXH100) * (ABS(H34 = MAXH100) * 34 + ABS(H34 < MAXH100) * (ABS(H35 = MAXH100) * 35 + ABS(H35 < MAXH100) * (ABS(H36 = MAXH100) * 36 + ABS(H36 < MAXH100) * (ABS(H37 = MAXH100) * 37 + ABS(H37 < MAXH100) * (ABS(H38 = MAXH100) * 38 + ABS(H38 < MAXH100) * (ABS(H39 = MAXH100) * 39 + ABS(H39 < MAXH100) * (ABS(H40 = MAXH100) * 40 + ABS(H40 < MAXH100) * (ABS(H41 = MAXH100) * 41 + ABS(H41 < MAXH100) * (ABS(H42 = MAXH100) * 42 + ABS(H42 < MAXH100) * (ABS(H43 = MAXH100) * 43 + ABS(H43 < MAXH100) * (ABS(H44 = MAXH100) * 44 + ABS(H44 < MAXH100) * (ABS(H45 = MAXH100) * 45 + ABS(H45 < MAXH100) * (ABS(H46 = MAXH100) * 46 + ABS(H46 < MAXH100) * (ABS(H47 = MAXH100) * 47 + ABS(H47 < MAXH100) * (ABS(H48 = MAXH100) * 48 + ABS(H48 < MAXH100) * (ABS(H49 = MAXH100) * 49 + ABS(H49 < MAXH100) * (ABS(H50 = MAXH100) * 50 + ABS(H50 < MAXH100) * (ABS(H51 = MAXH100) * 51 + ABS(H51 < MAXH100) * (ABS(H52 = MAXH100) * 52 + ABS(H52 < MAXH100) * (ABS(H53 = MAXH100) * 53 + ABS(H53 < MAXH100) * (ABS(H54 = MAXH100) * 54 + ABS(H54 < MAXH100) * (ABS(H55 = MAXH100) * 55 + ABS(H55 < MAXH100) * (ABS(H56 = MAXH100) * 56 + ABS(H56 < MAXH100) * (ABS(H57 = MAXH100) * 57 + ABS(H57 < MAXH100) * (ABS(H58 = MAXH100) * 58 + ABS(H58 < MAXH100) * (ABS(H59 = MAXH100) * 59 + ABS(H59 < MAXH100) * (ABS(H60 = MAXH100) * 60 + ABS(H60 < MAXH100) * (ABS(H61 = MAXH100) * 61 + ABS(H61 < MAXH100) * (ABS(H62 = MAXH100) * 62 + ABS(H62 < MAXH100) * (ABS(H63 = MAXH100) * 63 + ABS(H63 < MAXH100) * (ABS(H64 = MAXH100) * 64 + ABS(H64 < MAXH100) * (ABS(H65 = MAXH100) * 65 + ABS(H65 < MAXH100) * (ABS(H66 = MAXH100) * 66 + ABS(H66 < MAXH100) * (ABS(H67 = MAXH100) * 67 + ABS(H67 < MAXH100) * (ABS(H68 = MAXH100) * 68 + ABS(H68 < MAXH100) * (ABS(H69 = MAXH100) * 69 + ABS(H69 < MAXH100) * (ABS(H70 = MAXH100) * 70 + ABS(H70 < MAXH100) * (ABS(H71 = MAXH100) * 71 + ABS(H71 < MAXH100) * (ABS(H72 = MAXH100) * 72 + ABS(H72 < MAXH100) * (ABS(H73 = MAXH100) * 73 + ABS(H73 < MAXH100) * (ABS(H74 = MAXH100) * 74 + ABS(H74 < MAXH100) * (ABS(H75 = MAXH100) * 75 + ABS(H75 < MAXH100) * (ABS(H76 = MAXH100) * 76 + ABS(H76 < MAXH100) * (ABS(H77 = MAXH100) * 77 + ABS(H77 < MAXH100) * (ABS(H78 = MAXH100) * 78 + ABS(H78 < MAXH100) * (ABS(H79 = MAXH100) * 79 + ABS(H79 < MAXH100) * (ABS(H80 = MAXH100) * 80 + ABS(H80 < MAXH100) * (ABS(H81 = MAXH100) * 81 + ABS(H81 < MAXH100) * (ABS(H82 = MAXH100) * 82 + ABS(H82 < MAXH100) * (ABS(H83 = MAXH100) * 83 + ABS(H83 < MAXH100) * (ABS(H84 = MAXH100) * 84 + ABS(H84 < MAXH100) * (ABS(H85 = MAXH100) * 85 + ABS(H85 < MAXH100) * (ABS(H86 = MAXH100) * 86 + ABS(H86 < MAXH100) * (ABS(H87 = MAXH100) * 87 + ABS(H87 < MAXH100) * (ABS(H88 = MAXH100) * 88 + ABS(H88 < MAXH100) * (ABS(H89 = MAXH100) * 89 + ABS(H89 < MAXH100) * (ABS(H90 = MAXH100) * 90 + ABS(H90 < MAXH100) * (ABS(H91 = MAXH100) * 91 + ABS(H91 < MAXH100) * (ABS(H92 = MAXH100) * 92 + ABS(H92 < MAXH100) * (ABS(H93 = MAXH100) * 93 + ABS(H93 < MAXH100) * (ABS(H94 = MAXH100) * 94 + ABS(H94 < MAXH100) * (ABS(H95 = MAXH100) * 95 + ABS(H95 < MAXH100) * (ABS(H96 = MAXH100) * 96 + ABS(H96 < MAXH100) * (ABS(H97 = MAXH100) * 97 + ABS(H97 < MAXH100) * (ABS(H98 = MAXH100) * 98 + ABS(H98 < MAXH100) * (ABS(H99 = MAXH100) * 99)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
magnar51
Posted : Friday, March 13, 2015 3:15:27 PM
Registered User
Joined: 6/7/2014
Posts: 2

Yes, it works fine. 

Tank you Bruce.

jackmerz
Posted : Saturday, March 21, 2015 9:52:14 PM
Registered User
Joined: 12/2/2004
Posts: 17

Damn Bruce, isn't there any shorter formula for this ?

Bruce_L
Posted : Monday, March 23, 2015 12:40:58 PM


Worden Trainer

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

There may be a shorter way to write it, but if so, I have not been able to figure it out.

There is no "since" syntax in the Personal Criteria Formula Language.



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