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 |

scanning for prices within a percentage range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rbayliss40
Posted : Friday, October 11, 2013 7:33:34 AM
Registered User
Joined: 8/30/2011
Posts: 161

id like to make a scan that will look for stocks trading within a percentage range of their MA

i.e. Price is 3 % above 30 daily ma

 Price is 3 % above weekly MA

  Price is below XX MA daily or weekly

thanks

Bruce_L
Posted : Friday, October 11, 2013 8:12:58 AM


Worden Trainer

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

Price is within 3% of a 30-period simple moving average could be written as:

ABS(C / AVGC30 - 1) <= .03

If you want price to be above the moving average but within 3%:

AVGC30 < C AND C <= 1.03 * AVGC30

If you want price to be below the moving average but within 3%:

.97 * AVGC30 <= C AND C < AVGC30

If you want price to be at least 3% above the moving average:

1.03 * AVGC30 <= C

If you want price to be at least 3% below the moving average:

C <= .97 * AVGC30

If you want price to be at least 3% away from the moving average:

C <= .97 * AVGC30 OR 1.03 * AVGC30 <= C

You can AND daily and weekly versions of the formulas by adding the formula to an EasyScan twice and setting a different time frame for each EasyScan Condition, but there is not a way to OR different time frames in TC2000 version 12.3.

PCF Formula Descriptions
Building a Scan with Multiple Conditions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rbayliss40
Posted : Friday, October 11, 2013 4:44:24 PM
Registered User
Joined: 8/30/2011
Posts: 161

thanks again

Bruce_L
Posted : Wednesday, October 16, 2013 8:40:31 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.