Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 4/9/2013 Posts: 44
|
Can you make one PCF to scan for a bullish engulf, hammer candle, or DOJ? One that will scan for all 3 but will obviously only need either of them for results?
Thans
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm not a candlestick guy, but the Boolean PCFs for Candlestick Patterns topic has a list of Condition Formulas to identify candlestick patterns.
I also don't know which three of these patterns in particular might be of interest.
We can take the formula for Bullish Engulfing:
(O1>C1) AND (C-O)>=.7*(H-L) AND (C>O1) AND (O=1.2*(AVGH10-AVGL10))
Bullish Hammer/Dragonfly Doji:
(ABS(C-O)<=.2*(H-L)) AND ABS(O-C)>=.1*(H-L) AND (O-L)>=.5*(H-L) AND (C-L)>=.5*(H-L) AND (H-O)<=.05*(H-L) OR (H-C)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (L=MINL5) AND (H>L)
Inverted Hammer:
ABS(O-C)<=.2*(H-L) AND ABS(O-C)>=.1*(H-L) AND (H-O)>=.5*(H-L) AND (H-C)>=.5*(H-L) AND (O-L)<=.05*(H-L) OR (C-L)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (O<=(H1-.5*(H1-L1))) AND (C<=(H1-.5*(H1-L1))) AND (L=MINL5) AND (H>L)
Doji (Dragonfly):
ABS(O-C)<=.02*(H-L) AND (H-C)<=.3*(H-L) AND (H-L)>=(AVGH10-AVGL10) AND (H>L) AND (L=MINL10)
Doji (Gravestone):
ABS(O-C)<=.01*(H-L) AND (H-C)>=.95*(H-L) AND (H>L) AND (L<=L1+.3*(H1-L1)) AND (H-L)>=(AVGH10-AVGL10)
And Doji Star (aka Unconfirmed Bullish Morning Doji Star):
(O1-C1)>=.7*(H1-L1) AND (H1-L1)>=(AVGH10.1-AVGL10.1) AND (C<C1) AND (O<C1) AND ABS(C-O)<=.05*(H-L) AND (L=MINL10) AND (H1>L1) AND (H>L)
And put them inside the parentheses in the following structure to check for at least one of the six formulas being true for the current bar.
() OR () OR () OR () OR () OR ()
Resulting in:
((O1>C1) AND (C-O)>=.7*(H-L) AND (C>O1) AND (O=1.2*(AVGH10-AVGL10))) OR ((ABS(C-O)<=.2*(H-L)) AND ABS(O-C)>=.1*(H-L) AND (O-L)>=.5*(H-L) AND (C-L)>=.5*(H-L) AND (H-O)<=.05*(H-L) OR (H-C)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (L=MINL5) AND (H>L)) OR (ABS(O-C)<=.2*(H-L) AND ABS(O-C)>=.1*(H-L) AND (H-O)>=.5*(H-L) AND (H-C)>=.5*(H-L) AND (O-L)<=.05*(H-L) OR (C-L)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (O<=(H1-.5*(H1-L1))) AND (C<=(H1-.5*(H1-L1))) AND (L=MINL5) AND (H>L)) OR (ABS(O-C)<=.02*(H-L) AND (H-C)<=.3*(H-L) AND (H-L)>=(AVGH10-AVGL10) AND (H>L) AND (L=MINL10)) OR (ABS(O-C)<=.01*(H-L) AND (H-C)>=.95*(H-L) AND (H>L) AND (L<=L1+.3*(H1-L1)) AND (H-L)>=(AVGH10-AVGL10)) OR ((O1-C1)>=.7*(H1-L1) AND (H1-L1)>=(AVGH10.1-AVGL10.1) AND (C<C1) AND (O<C1) AND ABS(C-O)<=.05*(H-L) AND (L=MINL10) AND (H1>L1) AND (H>L))
You can do the same thing with the following structure if you only want to use three formulas instead of six.
() OR () OR ()
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/9/2013 Posts: 44
|
Bruce you are the man
|
|
Registered User Joined: 3/26/2014 Posts: 4
|
Hi Bruce
I'm German and my English is not so good, i hope you understand me.
I have subscribed TC2000 (Version 12.4) premium for a few days and have problems to create this or to be precise always PCF Formulas.
I always get the message "Formulas error".
Why it makes error ?
|
|
Registered User Joined: 3/26/2014 Posts: 4
|
I have taken as example this PCF Formula:
Bullish Engulfing
(O1>C1) AND (C-O)>=.7*(H-L) AND (C>O1) AND (O=1.2*(AVGH10-AVGL10))
I have changed now the PCF Formula in
(O1>C1) AND (C-O)>=,7*(H-L) AND (C>O1) AND (O=1,2*(AVGH10-AVGL10))
Now i don't receive any error but my scans can not be found, even searching in all US Stocks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The issue, as you have already discovered, is related to using the , as the decimal marker instead of using the . as the decimal marker as is common in the United States.
The only way to get full functionality for all formulas which have a decimals is to use the . as the decimal marker in your formulas and have the regional settings on your computer set to use the . as the decimal marker as well.
That said, it is possible to work around this issue without setting the . as the decimal marker in your regional settings.
The program will use the decimal marker set in your regional settings when testing formulas and when plotting formulas on the chart. So you could use a , as the decimal marker in these cases.
That said, the program always seems to require the . as the decimal marker in all other cases. So if you create a WatchList Column or EasyScan condition based on a formula (charted or not), you will need to use a . as the decimal marker to get the formula to work in the WatchList or EasyScan.
Note that this means that if you create a formula and test it, you will get an error message when creating or testing the formula using a . as the decimal marker, but you can still use the formula with a . in it and have it work as a WatchList Column or EasyScan Condition (and must use the . as the decimal marker to get it to work as a WatchList Column or EasyScan Condition).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/6/2014 Posts: 5
|
In May of this year Bruce posted this combination of Candlestick patterns. Does anyone have an idea for making this work on the previous bar, instead of the current one? Thanks in advance!
((O1>C1) AND (C-O)>=.7*(H-L) AND (C>O1) AND (O=1.2*(AVGH10-AVGL10))) OR ((ABS(C-O)<=.2*(H-L)) AND ABS(O-C)>=.1*(H-L) AND (O-L)>=.5*(H-L) AND (C-L)>=.5*(H-L) AND (H-O)<=.05*(H-L) OR (H-C)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (L=MINL5) AND (H>L)) OR (ABS(O-C)<=.2*(H-L) AND ABS(O-C)>=.1*(H-L) AND (H-O)>=.5*(H-L) AND (H-C)>=.5*(H-L) AND (O-L)<=.05*(H-L) OR (C-L)<=.05*(H-L) AND (H-L)>=.8*(AVGH10-AVGL10) AND (O<=(H1-.5*(H1-L1))) AND (C<=(H1-.5*(H1-L1))) AND (L=MINL5) AND (H>L)) OR (ABS(O-C)<=.02*(H-L) AND (H-C)<=.3*(H-L) AND (H-L)>=(AVGH10-AVGL10) AND (H>L) AND (L=MINL10)) OR (ABS(O-C)<=.01*(H-L) AND (H-C)>=.95*(H-L) AND (H>L) AND (L<=L1+.3*(H1-L1)) AND (H-L)>=(AVGH10-AVGL10)) OR ((O1-C1)>=.7*(H1-L1) AND (H1-L1)>=(AVGH10.1-AVGL10.1) AND (C<C1) AND (O<C1) AND ABS(C-O)<=.05*(H-L) AND (L=MINL10) AND (H1>L1) AND (H>L))
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You would need to add 1 to all of the bars ago parameters in the formula.
((O2>C2) AND (C1-O1)>=.7*(H1-L1) AND (C1>O2) AND (O1=1.2*(AVGH10.1-AVGL10.1))) OR ((ABS(C1-O1)<=.2*(H1-L1)) AND ABS(O1-C1)>=.1*(H1-L1) AND (O1-L1)>=.5*(H1-L1) AND (C1-L1)>=.5*(H1-L1) AND (H1-O1)<=.05*(H1-L1) OR (H1-C1)<=.05*(H1-L1) AND (H1-L1)>=.8*(AVGH10.1-AVGL10.1) AND (L1=MINL5.1) AND (H1>L1)) OR (ABS(O1-C1)<=.2*(H1-L1) AND ABS(O1-C1)>=.1*(H1-L1) AND (H1-O1)>=.5*(H1-L1) AND (H1-C1)>=.5*(H1-L1) AND (O1-L1)<=.05*(H1-L1) OR (C1-L1)<=.05*(H1-L1) AND (H1-L1)>=.8*(AVGH10.1-AVGL10.1) AND (O1<=(H2-.5*(H2-L2))) AND (C1<=(H2-.5*(H2-L2))) AND (L1=MINL5.1) AND (H1>L1)) OR (ABS(O1-C1)<=.02*(H1-L1) AND (H1-C1)<=.3*(H1-L1) AND (H1-L1)>=(AVGH10.1-AVGL10.1) AND (H1>L1) AND (L1=MINL10.1)) OR (ABS(O1-C1)<=.01*(H1-L1) AND (H1-C1)>=.95*(H1-L1) AND (H1>L1) AND (L1<=L2+.3*(H2-L2)) AND (H1-L1)>=(AVGH10.1-AVGL10.1)) OR ((O2-C2)>=.7*(H2-L2) AND (H2-L2)>=(AVGH10.2-AVGL10.2) AND (C1<C2) AND (O1<C2) AND ABS(C1-O1)<=.05*(H1-L1) AND (L1=MINL10.1) AND (H2>L2) AND (H1>L1))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |