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 |

PRICE OVER MOVING AVERAGE Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
joellaux27
Posted : Friday, July 24, 2015 3:07:12 PM
Registered User
Joined: 8/21/2014
Posts: 6

How would I find stocks where price has been above the 30MA for 6 months, one year or 2 years etc.

 

 

Thank you,

Bruce_L
Posted : Friday, July 24, 2015 3:27:30 PM


Worden Trainer

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

We can do this in a daily time frame for 6 months or one year, but not 2 years. There are 500 bars of a data available in each time at the start of each trading day. While this is about 2 years, by the time you actually calculate the moving average, you are about 34 trading days short.

We are going to use the technique described here.

Condition True at Least x Bars in a Row

Please look through the referenced article as it has step by step instructions. What follows will probably not make sense if you have not already done so.

The Period for the Custom PCF % True Indicator is going to be the number of bars in a row. So 126 for six months or 252 for a year for example.

The Boolean Formula is going to be a Condition Formula for price being above its 30 period simple moving average.

C > AVGC30

Make sure the Condition is for Greater Than 99.99. You can choose Scan in New Window if you immediately want to create a new EasyScan based on the condition.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joellaux27
Posted : Friday, July 24, 2015 3:52:48 PM
Registered User
Joined: 8/21/2014
Posts: 6

Thank you Bruce.....tried C 252 > AVGC30 ....Gave me a bunch of stocks where price was under 30MA , NOT ABOVE.

Bruce_L
Posted : Friday, July 24, 2015 3:56:52 PM


Worden Trainer

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

The formula needs to be exactly as given.

C > AVGC30

The 252 will be used as the Period in the Custom PCF % True Indicator.

Assuming you have this done correctly, make sure the moving average on the chart is simple and that the moving average is of itself and not of something else (like another moving average).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
klinger99
Posted : Thursday, August 13, 2015 11:15:15 AM
Registered User
Joined: 1/3/2010
Posts: 5

Bruce,

How would the formula change if I wished to create a column listing the number of days price has been below its 10 SMA?

 

Thanks

donv98
Posted : Thursday, August 13, 2015 11:54:48 AM
Registered User
Joined: 7/29/2010
Posts: 417

Bruce,

   Many thanks for creating such detailed instructions like this:

Condition True at Least x Bars in a Row

This is extremely helpful and valuable.

The TC 2000 Support Articles are terrific.

http://support.tc2000.com/

 

Don

donv98
Posted : Thursday, August 13, 2015 11:56:43 AM
Registered User
Joined: 7/29/2010
Posts: 417

Somehow I goofed in the above post and made all of the lines clickable.

Only these were supposed to be clickable:

Condition True at Least x Bars in a Row

http://support.tc2000.com/

 

donv98
Posted : Thursday, August 13, 2015 12:01:32 PM
Registered User
Joined: 7/29/2010
Posts: 417

Bruce,

   It would be helpful to make these support articles a sticky so they are readily available and not forgotten.

http://support.tc2000.com/

  I really appreciate your efforts in creating this.

 

Don

Bruce_L
Posted : Thursday, August 13, 2015 12:39:37 PM


Worden Trainer

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

donv98,
A stick topic has been added to this forum. A link has also added it to my signature.

klinger99
An Indicator Formula which actually returns a count of the number of bars is quite a bit more complicated to create than a condition which checks for something happening at least x bars in a row.

Days Since Last Peak (or other day-counting needs)

The following Indicator Formula maxes out at 60 bars in a row.

ABS(C < AVGC10) * (ABS(C1 >= AVGC10.1) + ABS(C1 < AVGC10.1) * (ABS(C2 >= AVGC10.2) * 2 + ABS(C2 < AVGC10.2) * (ABS(C3 >= AVGC10.3) * 3 + ABS(C3 < AVGC10.3) * (ABS(C4 >= AVGC10.4) * 4 + ABS(C4 < AVGC10.4) * (ABS(C5 >= AVGC10.5) * 5 + ABS(C5 < AVGC10.5) * (ABS(C6 >= AVGC10.6) * 6 + ABS(C6 < AVGC10.6) * (ABS(C7 >= AVGC10.7) * 7 + ABS(C7 < AVGC10.7) * (ABS(C8 >= AVGC10.8) * 8 + ABS(C8 < AVGC10.8) * (ABS(C9 >= AVGC10.9) * 9 + ABS(C9 < AVGC10.9) * (ABS(C10 >= AVGC10.10) * 10 + ABS(C10 < AVGC10.10) * (ABS(C11 >= AVGC10.11) * 11 + ABS(C11 < AVGC10.11) * (ABS(C12 >= AVGC10.12) * 12 + ABS(C12 < AVGC10.12) * (ABS(C13 >= AVGC10.13) * 13 + ABS(C13 < AVGC10.13) * (ABS(C14 >= AVGC10.14) * 14 + ABS(C14 < AVGC10.14) * (ABS(C15 >= AVGC10.15) * 15 + ABS(C15 < AVGC10.15) * (ABS(C16 >= AVGC10.16) * 16 + ABS(C16 < AVGC10.16) * (ABS(C17 >= AVGC10.17) * 17 + ABS(C17 < AVGC10.17) * (ABS(C18 >= AVGC10.18) * 18 + ABS(C18 < AVGC10.18) * (ABS(C19 >= AVGC10.19) * 19 + ABS(C19 < AVGC10.19) * (ABS(C20 >= AVGC10.20) * 20 + ABS(C20 < AVGC10.20) * (ABS(C21 >= AVGC10.21) * 21 + ABS(C21 < AVGC10.21) * (ABS(C22 >= AVGC10.22) * 22 + ABS(C22 < AVGC10.22) * (ABS(C23 >= AVGC10.23) * 23 + ABS(C23 < AVGC10.23) * (ABS(C24 >= AVGC10.24) * 24 + ABS(C24 < AVGC10.24) * (ABS(C25 >= AVGC10.25) * 25 + ABS(C25 < AVGC10.25) * (ABS(C26 >= AVGC10.26) * 26 + ABS(C26 < AVGC10.26) * (ABS(C27 >= AVGC10.27) * 27 + ABS(C27 < AVGC10.27) * (ABS(C28 >= AVGC10.28) * 28 + ABS(C28 < AVGC10.28) * (ABS(C29 >= AVGC10.29) * 29 + ABS(C29 < AVGC10.29) * (ABS(C30 >= AVGC10.30) * 30 + ABS(C30 < AVGC10.30) * (ABS(C31 >= AVGC10.31) * 31 + ABS(C31 < AVGC10.31) * (ABS(C32 >= AVGC10.32) * 32 + ABS(C32 < AVGC10.32) * (ABS(C33 >= AVGC10.33) * 33 + ABS(C33 < AVGC10.33) * (ABS(C34 >= AVGC10.34) * 34 + ABS(C34 < AVGC10.34) * (ABS(C35 >= AVGC10.35) * 35 + ABS(C35 < AVGC10.35) * (ABS(C36 >= AVGC10.36) * 36 + ABS(C36 < AVGC10.36) * (ABS(C37 >= AVGC10.37) * 37 + ABS(C37 < AVGC10.37) * (ABS(C38 >= AVGC10.38) * 38 + ABS(C38 < AVGC10.38) * (ABS(C39 >= AVGC10.39) * 39 + ABS(C39 < AVGC10.39) * (ABS(C40 >= AVGC10.40) * 40 + ABS(C40 < AVGC10.40) * (ABS(C41 >= AVGC10.41) * 41 + ABS(C41 < AVGC10.41) * (ABS(C42 >= AVGC10.42) * 42 + ABS(C42 < AVGC10.42) * (ABS(C43 >= AVGC10.43) * 43 + ABS(C43 < AVGC10.43) * (ABS(C44 >= AVGC10.44) * 44 + ABS(C44 < AVGC10.44) * (ABS(C45 >= AVGC10.45) * 45 + ABS(C45 < AVGC10.45) * (ABS(C46 >= AVGC10.46) * 46 + ABS(C46 < AVGC10.46) * (ABS(C47 >= AVGC10.47) * 47 + ABS(C47 < AVGC10.47) * (ABS(C48 >= AVGC10.48) * 48 + ABS(C48 < AVGC10.48) * (ABS(C49 >= AVGC10.49) * 49 + ABS(C49 < AVGC10.49) * (ABS(C50 >= AVGC10.50) * 50 + ABS(C50 < AVGC10.50) * (ABS(C51 >= AVGC10.51) * 51 + ABS(C51 < AVGC10.51) * (ABS(C52 >= AVGC10.52) * 52 + ABS(C52 < AVGC10.52) * (ABS(C53 >= AVGC10.53) * 53 + ABS(C53 < AVGC10.53) * (ABS(C54 >= AVGC10.54) * 54 + ABS(C54 < AVGC10.54) * (ABS(C55 >= AVGC10.55) * 55 + ABS(C55 < AVGC10.55) * (ABS(C56 >= AVGC10.56) * 56 + ABS(C56 < AVGC10.56) * (ABS(C57 >= AVGC10.57) * 57 + ABS(C57 < AVGC10.57) * (ABS(C58 >= AVGC10.58) * 58 + ABS(C58 < AVGC10.58) * (ABS(C59 >= AVGC10.59) * 59 + ABS(C59 < AVGC10.59) * 60)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
klinger99
Posted : Thursday, August 13, 2015 1:25:48 PM
Registered User
Joined: 1/3/2010
Posts: 5

That is awesome. Thanks so much!

donv98
Posted : Wednesday, August 19, 2015 12:02:41 PM
Registered User
Joined: 7/29/2010
Posts: 417

Bruce,

  Many thanks for creating the sticky and signature link.

They make finding the support articles immediate.

 

Don

Bruce_L
Posted : Wednesday, August 19, 2015 12:04:43 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.