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 within percent of ma? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ejhernandez
Posted : Monday, April 28, 2014 10:21:08 AM
Registered User
Joined: 1/31/2005
Posts: 10

Hi,

I'd like to be able to scan for the instance of a price within 10 percent of its xavg180. I would also like the xavg to be trending higher over say 30 days.

 

Thanks

Bruce_L
Posted : Monday, April 28, 2014 10:41:56 AM


Worden Trainer

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

A Condition Formula for price being within 10% of its 180-period exponential moving average can be written as:

ABS(C / XAVGC180 - 1) <= .1

Adding a requirement that the current XAVGC180 be greater than 30 bars ago can be written as:

ABS(C / XAVGC180 - 1) <= .1 AND XAVGC180 > XAVGC180.30

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



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ejhernandez
Posted : Monday, April 28, 2014 11:49:48 AM
Registered User
Joined: 1/31/2005
Posts: 10

Thanks for the quick response

Bruce_L
Posted : Monday, April 28, 2014 11:50:23 AM


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.