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 near 50 sma? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
commtrd
Posted : Sunday, June 21, 2015 12:30:48 AM
Registered User
Joined: 5/8/2006
Posts: 6

I have looked and looked and cannot seem to find out how to write a pcf for when price is say within one or two percent of a 50 sma. This should not be tpoo hard to do? But I am severely challenged in writing pcf's based on indicators because I do not use indicators to trade with at all. BUT for scanning purposes I would like to see a list of stocks where the price is within a percentage of that 50sma if at all possible? Please help? Can a pcf be written that would reference the same condition on both the weekly and daily charts to show when that condition is present on both time frames at the same time for scanning purposes? Thanks in advance!

bcochrane
Posted : Sunday, June 21, 2015 9:18:10 AM
Registered User
Joined: 9/17/2010
Posts: 484

Close to 50 D MA: 100*Abs(C-AvgC50)/C<2

 

Adjust the last value (2 here) for the degree of closeness you want

Bruce_L
Posted : Monday, June 22, 2015 10:28:18 AM


Worden Trainer

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

The formula provided by bcochrane will return true when the 50 period simple moving average of price is within 2% of price.

If you need to use the 50 period simple moving average as the basis of the percentage, you could use something like the following instead (which checks for price to be within 1% of the SMA50).

ABS(C / AVGC50 - 1) <= .01

In this case it would be the .01 which would get adjusted to adjust the percentage.



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