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

Opens near their moving averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
bogeys
Posted : Monday, January 28, 2013 11:09:57 AM
Registered User
Joined: 10/16/2005
Posts: 27

Hi Worden,

I would like to create a PCF to ID those stocks opening (+) or (-) of their 1 hour 20 Simple moving average and another for the exponential MA.  As always, I really appreciate your help.

bogeys
Posted : Monday, January 28, 2013 12:41:13 PM
Registered User
Joined: 10/16/2005
Posts: 27

Whoops, I forgot to mention that I was wanting a (+) or (-) of 1/2of 1% from the moving average.

Bruce_L
Posted : Monday, January 28, 2013 1:07:46 PM


Worden Trainer

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

You would need to set the Time Frame of the following formulas to 1-Hour. Note that none of the formulas use the open of the day. There is no way to automatically reference the open of the day within an intraday Time Frame. So if you are interested in the open of the day, they would only work during the first bar of the day. You would need to adjust the bars ago parameters in the formulas as the day went on if you were still interested in the results based on the first bar of the trading day.

You can create a Condition Formula for the open of the bar to be within 0.5% of the simple moving average of the close as:

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

A similar Condition Formula can be create using an exponential moving average by just adding an X to the formula:

ABS(O / XAVGC20 - 1) <= .05

Note that these formula are based on the the value of the moving average of the close at the time of the close of the bar, not at the time of the open of the bar. We would need to calculate the value of the moving average at the time of the open of the bar if that is what of interest.

For the simple moving average, this would be:

ABS(O / ((O + 19 * AVGC19.1) / 20) - 1) <= .05

While we would get the following for an exponential moving average:

ABS(O / (.9 * XAVGC20.1 + 2 * O / 21) - 1) <= .05



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