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 |

Average including sub-periods Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
esc
Posted : Thursday, February 9, 2017 9:00:15 AM
Gold Customer Gold Customer

Joined: 3/11/2013
Posts: 24

I am trying to write a pcf that enures a stock has met avg volume requirements overall for a period, as well as during each of several sub-periods.

For example, day I want avg daily vol >= 300k shares over 90 days as well as each 15day sub-period. ( So there were no periods where volume dried up over the 90 days.)

Here is how I approached it.  I would like Bruce (or whoever) to validate my approach or suggest an alternative if something easier or more elegant jumps out at you.  Thanks in advance.

 AVG(AVGV90.90, 15) >= 300000 AND

AVG(AVGV90.75, 15) >= 300000 AND
AVG(AVGV90.60, 15) >= 300000 AND
AVG(AVGV90.45, 15) >= 300000 AND
AVG(AVGV90.30, 15) >= 300000 AND
AVG(AVGV90.15,15)  >= 300000 AND
AVG(AVGV90, 15)      >= 300000
Bruce_L
Posted : Thursday, February 9, 2017 1:32:07 PM


Worden Trainer

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

If you just want to have no bars where the 90 day simple moving average of volume is less than 300,000 shares. This should work in all versions of TC2000.

MIN(AVGV90, 90) >= 300000

If the 15-period simple moving average applied to the 90 period simple moving average of volume is important to you, then you could use the following formula in TC2000 v17.

MIN(AVG(AVGV90, 15), 90) >= 300000

If you really want to check just once each 15 bars instead of checking at each bar during the period, then your existing approach is probably as efficient as it can be written.

 



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