Registered User Joined: 1/26/2013 Posts: 21
|
i need a formula for price that has moved thru the 200 sma today. and a formula for a golden cross in the daily that has happened today.
Thanks
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for price crossing up through the 200-period simple moving average between yesterday and today can be written as:
C > AVGC200 AND C1 <= AVGC200.1
A Condition Formula for price crossing down through the 200-period simple moving average between yesterday and today can be written as:
C < AVGC200 AND C1 >= AVGC200.1
A Condition Formula for price crossing through the 200-period simple moving average in either direction between yesterday and today can be written as:
SGN(C - AVGC200) <> SGN(C1 - AVGC200.1)
A Condition Formula for the 50-period simple moving average crossing up through the 200-period simple moving average between yesterday and today can be written as:
AVGC50 > AVGC200 AND AVGC50.1 <= AVGC200.1
A Condition Formula for the 50-period simple moving average crossing down through the 200-period simple moving average between yesterday and today can be written as:
AVGC50 < AVGC200 AND AVGC50.1 >= AVGC200.1
A Condition Formula for the 50-period simple moving average crossing through the 200-period simple moving average in either direction between yesterday and today can be written as:
SGN(AVGC50 - AVGC200) <> SGN(AVGC50.1 - AVGC200.1)
Note that all of the above are comparing the the values at the end of the previous bar to the current values as this is how such crossovers are normally defined. If you want something else, we would need additional clarification from your as to your actual intent.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|