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 |

Scan for crossing moving averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ESE Trading
Posted : Saturday, February 6, 2016 8:35:44 PM
Registered User
Joined: 5/31/2014
Posts: 3

Does anyone know a formula we can use for a scan that lets us know when a price crosses a moving average up or down?

Bruce_L
Posted : Monday, February 8, 2016 10:45:50 AM


Worden Trainer

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

I'll use a 20 period simple moving average as an example. Crossing up could be written as follows.

C > AVGC20 AND C1 <= AVGC20.1

Crossing down could be written as follows.

C < AVGC20 AND C1 >= AVGC20.1

Crossing in either direction could be written as either:

(C > AVGC20 AND C1 <= AVGC20.1) OR (C < AVGC20 AND C1 >= AVGC20.1)

Or as:

SGN(C - AVGC20) <> SGN(C1 - AVGC20.1)



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