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 |

Moving Average X and price retest Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
zachlindgren
Posted : Friday, October 19, 2012 12:22:51 AM
Registered User
Joined: 10/4/2010
Posts: 11

Is there a formula that I can create that will find a SMA cross and alert me to a price retest of the SMA. e.g 10SMA crossing up through the 20SMA and alerting me to a retest of the 10SMA running off of daily data.

 

Thanks, 

Zach

Bruce_L
Posted : Friday, October 19, 2012 8:57:26 AM


Worden Trainer

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

You might subjectively know it when you see it, but I'm really not sure what you mean in an unambiguous objective sense. I'll make some guesses however.

It is theoretically possible for the 10-Period Simple Moving Average to have always been above the 20-Period Simple Moving Average, but it is incredibly unlikely. This means we should have to test for the crossup, but only need to check for the 10-Period Simple Moving Average being above the 20-Period Simple Moving Average on the prior bar:

AVGC10.1 > AVGC20.1

Now if we are checking for a price retest of of the 10-Period Simple Moving Average, we probably want to test for price being above the 10-Period Simple Moving Average during this bar as well:

C1 > AVGC10.1 AND AVGC10.1 > AVGC20.1

A retest would seem to involve price being at or below the 10-Period Simple Moving Average during the current bar:

C <= AVGC10 AND C1 > AVGC10.1 AND AVGC10.1 > AVGC20.1

Or possible slightly above it while being further above it during the prior bar (the following sets that threshold at 0.5%:

C <= 1.005 * AVGC10 AND C1 > 1.005 * AVGC10.1 AND AVGC10.1 > AVGC20.1

If you want something else, we would need further clarification from you as to your intent.

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



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
zachlindgren
Posted : Friday, October 19, 2012 9:22:44 AM
Registered User
Joined: 10/4/2010
Posts: 11

Thanks Bruce I will play around with these to see if that is what I am looking for. I guess I was a little vague on what I was looking to do, the goal of the alert I am looking for is detecting an area in say a watch list where the 10 period Simple Moving Average crosses up through the 20-Period Simple Moving Average (So that would be "TRUE") but not alerting me until price comes down to test the 10-Period Moving Average or slightly above. Don't know if this explanation is any better, if not I will work with what you gave me and go from there..

Thanks again, 

Zach

Bruce_L
Posted : Friday, October 19, 2012 9:28:22 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.