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 |

Backtesting Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Michaelc1507
Posted : Monday, April 24, 2017 11:19:18 AM
Registered User
Joined: 12/3/2006
Posts: 278

Morning folks - could you please make me a pcf that I can add to some of my other scans that says I'd like to know if this happened anytime in the last 5 days - such as for a Bearish Engulfing pattern - or do I have to make it specific to each of my different scans?     V7 only
  

 

Thanks - Mike

Bruce_L
Posted : Monday, April 24, 2017 12:32:11 PM


Worden Trainer

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

TC2000 v17 has a CountTrue() function which can be used in PCFs for this, but in TC2000 v7, you would have to write the Personal Criteria Formula in such a way that it checks for all 5 bars.

So let's say your base bearish engulfing pattern was as follows.

O > C1 AND C1 > O1 AND O1 > C

You would have to repeat it 5 times with the bars ago parameters changed and ORs in between instance.

(O > C1 AND C1 > O1 AND O1 > C) OR (O1 > C2 AND C2 > O2 AND O2 > C1) OR (O2 > C3 AND C3 > O3 AND O3 > C2) OR (O3 > C4 AND C4 > O4 AND O4 > C3) OR (O4 > C5 AND C5 > O5 AND O5 > C4)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Michaelc1507
Posted : Monday, April 24, 2017 6:26:18 PM
Registered User
Joined: 12/3/2006
Posts: 278

Thanks Bruce - glad to see you're still setting us straight!  I somehow knew that wasn't going to be as simple as I thought it might be.

 

Mike

Michaelc1507
Posted : Tuesday, April 25, 2017 8:52:57 AM
Registered User
Joined: 12/3/2006
Posts: 278

Good morning again - I didn't recognize your bearish engulfing pattern here (not the anytime one) so I went back and checked on mine.  As of last Friday's update, checking All Stocks (8178) your pattern had 221 hits.  This one C <= 01 AND 01 <= O AND C <= C1 AND C1 <= O AND C < O had 700 hits.  Craig's Boolean formula from 10-6-05 only gets 48 hits???  So my mathematically challenged brain is confused.

Please help - Mike

Bruce_L
Posted : Tuesday, April 25, 2017 9:42:31 AM


Worden Trainer

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

The pattern I gave was just a really basic formula that just checks for the relative positions of the open and closes on the two most recent bars. I used this formula in part because it was short, so repeating it five times didn't make an really long formula.

Craig's formula adds some additional requirements to this. It requires the body of the current bar to be at least 70% of the candle.and it requires the current candle to be at least 20% larger than the average size over the most recent 10 bars. Both of these requirements make it more restrictive so it returns fewer results.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Michaelc1507
Posted : Tuesday, April 25, 2017 9:55:33 AM
Registered User
Joined: 12/3/2006
Posts: 278

Great - thanks - what about that longer one with 700 hits?

Bruce_L
Posted : Tuesday, April 25, 2017 10:09:16 AM


Worden Trainer

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

The one with 700 hits allows for equality at the tops and bottoms of the bodies to the point where the first bar could actually be a doji and resting exactly at the top or bottom of the second bar or both bars could be exactly the same size.

My shorter version requires the tops and bottoms of the candles to not match. The first bar has to have a non-doji body and not have its top or bottom be the same as the top or bottom of the second bar.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Michaelc1507
Posted : Tuesday, April 25, 2017 10:24:25 AM
Registered User
Joined: 12/3/2006
Posts: 278

Thanks again - Mike

Bruce_L
Posted : Tuesday, April 25, 2017 10:40:26 AM


Worden Trainer

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

You're welcome.



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