Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/6/2015 Posts: 13
|
Hi there,
So I am just wanting to get some help in programming a PCF for mark Bouchers TBBLBG concept.
So i am just hoping it is possible to screen for the rather complex concept. Boucher describes 3 patterns:
1) Thrusts
2) Breaklap
3) Gap up
Essentially he says that that if a stock has at some point in the last year had 5 incidents of these patterns occuring within a 21 day period then you have found a great stock.
The precise definition of the above patterns:
1) Thrusts; A day in which the range (H-L) is two or more times the average range of the preceding 20 days. AND the volume is higher than the volume of the prior day. AND the close is in the top 1/3 of the day's range.
2)Breaklap; A breaklap (up) is a move above resistence on a lap day.Resistance as defined above. A Lap Up Day is when price makes a low that is greater than the close of the previous day, but less than the previous day's high.
3) gap; low of a day is higher than the high of the previous day (perhaps L>H.1?)
I suppose the challenge would not be just to run this scan daily but also to do a bakcward dating scan to see if any stocks have exhibited this kind of behaviour within the last year.
To me this is totally beyond my ability to programme. Any help on this topic would be greatly appreciated. I also have a suspicion that there are other users out there that would get value out of this filter
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The individual components are most likely not problematic in and of themselves (although risistance is not "defined above").
Thrusts can be written as follows.
H - L >= 2 * (AVGH20.1 - AVGL20.1) AND V > V1 AND STOC1 >= 200 / 3
A Lap Up Day can be written as follows.
C1 < L AND L < H1
And a Gap can be written as follows.
L > H1
We can check for all three incidents happening within 21 bars of each other by using the individual Condition Formulas as Boolean Formulas in Custom PCF % True Indicators with the Period set to 21 and the Average Type set to simple.
We would click on the Custom PCF % True Indicators and select Create Scan Condition to check for the value being greater than 0 and then add all the conditions to the same EasyScan.
But checking for this happening at least 5 times in the most recent year ends up being a step too far. There really isn't a way to find out how many times a particular symbol would have been in the EasyScan over the course of a year.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/6/2015 Posts: 13
|
oh ok perfect Bruce. Thanks very much for this its very much appreciated. This is so advanced i wouldnt have stood a chance without your help. thanks
PH
|
|
Registered User Joined: 3/6/2015 Posts: 13
|
So I think i managed to get the screen working. The only thing I notice is that scan is not able to identify 5 occurances happening within the last 21 days.
for example, a 'thrust' and a 'gap' can and often do occur on the same day. Therefore stocks that have one gap up from resistence and one lapup in a 20 day period will appear on the scan. What i am struggling with is how to tweak the scan so that identifies stocks that have had a minimum of 5 occurances of these 3 types events within a 20 day period. Im sure this must be possible, no?
thanks
PH
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm probably just misunderstanding the description then.
My understanding was that you needed to identify all 3 three happening over the course of 21 days.
Then you needed to find this (all 3 things over 21 days) happening at least 5 times over the course of the year.
We could do the first, but not the second.
If you need all 3 things happening (not necessarily at the same time) at least 5 times over the course of 21 days, we actually can do that. You would just need to check for the values of the Custom PCF % True Indicators being greater than 23 instead of being greater than 0. This is because 5 is about 23.8% of 21.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/6/2015 Posts: 13
|
Sorry,my explanation was probably a little off.
Just to clarify. I have made 3 different Custom PCF % True Indicators one for each of the 3 components.
If i do what you are suggesting then i will screen for each component occuring 5 times within 21 days.At the momment I think the scan is returning a minimum of 15 occurances because each of the 3 components must be found to happen at least 5 times.
What i am looking for is a minimum of 5 occurances of any of the 3 compnents within 21 days. this could be any combination of the 3 components.
Do you see the difference i am getting at?
This is quite a subtle difference and i appologise if it is badly explained or If i am interpreting what you are saying wrongly, im still a bit of a noob.
PH
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
About the closest you will probably be able to do is to create a single Custom PCF % True Indicator which ORs the three requirements.
(H - L >= 2 * (AVGH20.1 - AVGL20.1) AND V > V1 AND STOC1 >= 200 / 3) OR (C1 < L AND L < H1) OR L > H1
You will set the period to 21 as before and will want this to be greater tahn 23. The problem is that if two or more of the requirements happen on the same bar, it will only get counted once.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Another idea. Try the following as a Custom PCF Indicator with the Period set to 21 and the Average Type set to Simple (instead of Custom PCF % True Indicator).
21 * (ABS(H - L >= 2 * (AVGH20.1 - AVGL20.1) AND V > V1 AND STOC1 >= 200 / 3) - (C1 < L AND L < H1) - (L > H1))
This should count the number of these things which have returned true during the 21 bar period and allow you to count all 3 on the same bar if it happens that way.. So you would want ot check for it being greater than 4.5 (because that is just under 5).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/6/2015 Posts: 13
|
ok thanks Bruce. Really appreciate the help...really still trying to get to grips with everything!
PH
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |