Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Stuck in the middle & touching Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
swatfa
Posted : Saturday, February 25, 2017 2:13:26 PM
Registered User
Joined: 3/13/2016
Posts: 24

Hi guys

Don't know if this is easy but can i please request two pcfs that do the following:

PCF 1: Finds stocks that are between 5% to 0% away from touching the bottom of a 20 Simple moving average. Also the reverse for one approaching the top of the moving average.

PCF 2: Stocks where price is inbetween the 20 moving average and the 50 moving average. Screenshot below demonstrates the area.

Thanks!

swatfa
Posted : Sunday, February 26, 2017 12:40:36 PM
Registered User
Joined: 3/13/2016
Posts: 24

I think for the second PCF condition, i might have found a solution just by clicking on price and selecting create scan condition. Than i defined a condition for price to be above the 20 MA and repeated the same steps for price to be below the 50 MA. 

But for the first PCF requirement, still having trouble,

 

Bruce_L
Posted : Monday, February 27, 2017 8:38:09 AM


Worden Trainer

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

At or below but within 5% of 20 period simple moving average.

.95 * AVGC20 <= C AND C <= AVGC20

At or above but within 5% of the 20 period simple moving average.

AVGC20 <= C AND C <= 1.05 * AVGC20

Between 20 and 50 period simple moving averages.

(AVGC20 <= C AND C <= AVGC50) OR {AVGC50 <= C AND C <= AVGC20)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
swatfa
Posted : Monday, February 27, 2017 10:13:35 AM
Registered User
Joined: 3/13/2016
Posts: 24

QUOTE (Bruce_L)

At or below but within 5% of 20 period simple moving average.

.95 * AVGC20 <= C AND C <= AVGC20

At or above but within 5% of the 20 period simple moving average.

AVGC20 <= C AND C <= 1.05 * AVGC20

Between 20 and 50 period simple moving averages.

(AVGC20 <= C AND C <= AVGC50) OR (AVGC50 <= C AND C <= AVGC20)

Thanks Bruce. Will certainly make an effort to learn how to create my own pcfs. Appreciate all the support

swatfa
Posted : Monday, February 27, 2017 11:24:52 AM
Registered User
Joined: 3/13/2016
Posts: 24

QUOTE (Bruce_L)

At or below but within 5% of 20 period simple moving average.

.95 * AVGC20 <= C AND C <= AVGC20

At or above but within 5% of the 20 period simple moving average.

AVGC20 <= C AND C <= 1.05 * AVGC20

Between 20 and 50 period simple moving averages.

(AVGC20 <= C AND C <= AVGC50) OR (AVGC50 <= C AND C <= AVGC20)

For some reason this is returning an error when i try to compile it:

(AVGC20 <= C AND C <= AVGC50) OR (AVGC50 <= C AND C <= AVGC20)

Bruce_L
Posted : Monday, February 27, 2017 11:30:07 AM


Worden Trainer

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

I made a minor adjustment to the formula (the opening parenthesis to the second part of the formula). Please try the new version.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
swatfa
Posted : Monday, February 27, 2017 11:52:34 AM
Registered User
Joined: 3/13/2016
Posts: 24

Got it working, thanks

Bruce_L
Posted : Monday, February 27, 2017 12:02:52 PM


Worden Trainer

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

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ogsol
Posted : Monday, February 27, 2017 2:28:52 PM
Registered User
Joined: 11/5/2013
Posts: 9

hi bruce 

can u help with pcf showing price opening at or very near sma 20. The closer the better

StockGuy
Posted : Monday, February 27, 2017 2:38:37 PM

Administration

Joined: 9/30/2004
Posts: 9,187

O / AVGC20 > .98 AND O / AVGC20 < 1.02

This will find stocks where the Open is within 2% above or below the SMA 20

Bruce_L
Posted : Monday, February 27, 2017 2:39:39 PM


Worden Trainer

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

Note that the SMA20 at the open may be different than the SMA20 now.

The open being within $0.01 of the current 20 period SMA would be the following.

ABS(O - AVGC20) <= .01

But the open being within $0.01 of the 20 period SMA at the open would be the following.

ABS(O - (SUM(C1, 19) + O) / 20) <= .01

If we went within 0.25% of the current SMA20.

ABS(O / AVGC20 - 1) <= .0025

But if we went within 0.25% of the SMA20 at the open.

ABS(O / ((SUM(C1, 19) + O) / 20) - 1) <= .0025



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ogsol
Posted : Tuesday, February 28, 2017 2:08:38 PM
Registered User
Joined: 11/5/2013
Posts: 9

thanx bruce

.just what i was looking for

Bruce_L
Posted : Tuesday, February 28, 2017 2:13:33 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.