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