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 |

uptrend for last 30 days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tpdavis
Posted : Tuesday, April 25, 2006 12:36:46 PM
Registered User
Joined: 4/2/2006
Posts: 38
Can you send a pcf for price being in an uptrend for the past 30 days.

tpdavis
Bruce_L
Posted : Tuesday, April 25, 2006 12:42:11 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
It doesn't address the magnitude of the uptrend, but you may wish to try the following (it's based on Linear Regression Slope):

14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29 > 0

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tpdavis
Posted : Tuesday, April 25, 2006 12:54:12 PM
Registered User
Joined: 4/2/2006
Posts: 38
Bruce,

I appreciate the response, but I was really interested in a peice of code for a price movement upward for the last thirty days.

The code you just sent me confused me, sorry about that.

tpdavis
Bruce_L
Posted : Tuesday, April 25, 2006 1:05:55 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The formula I presented is a Boolean formula designed to find upward price movement for the last thirty days. Here's a non-Boolean version:

(14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 22.475 / C29 - 100

It is based on the Linear Regression Slope of the last thirty days, but there are other methods you could try. You could compare the Moving Average of the most recent 15 days to the previous 15 days:

100 * AVGC15 / AVGC15.15 - 100

Or count how many of the last thirty days the price went up:

ABS((C > C1) + (C1 > C2) + (C2 > C3) + (C3 > C4) + (C4 > C5) + (C5 > C6) + (C6 > C7) + (C7 > C8) + (C8 > C9) + (C9 > C10) + (C10 > C11) + (C11 > C12) + (C12 > C13) + (C13 > C14) + (C14 > C15) + (C15 > C16) + (C16 > C17) + (C17 > C18) + (C18 > C19) + (C19 > C20) + (C20 > C21) + (C21 > C22) + (C22 > C23) + (C23 > C24) + (C24 > C25) + (C25 > C26) + (C26 > C27) + (C27 > C28) + (C28 > C29) + (C29 > C30))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tpdavis
Posted : Tuesday, April 25, 2006 1:50:34 PM
Registered User
Joined: 4/2/2006
Posts: 38
Thanks Bruce. Appreciate that.

tpdavis
Bruce_L
Posted : Tuesday, April 25, 2006 1:52: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.