Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Replies to "PCFs and EasyScans for Candlestick Patterns" Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
S2
Posted : Saturday, October 1, 2005 10:49:59 PM
Registered User
Joined: 4/6/2005
Posts: 239
Craig,

Thanks for putting this together as a one stop shop for the various candle patterns. And for your generous offer to provide additional pattern selection tools.

Here is my list of patterns for you to consider.

Bullish Reversals – High reliability
Morning Star (done)
Morning Doji Star (done)
Three Inside Up (done)

Bullish Reversals – Medium reliability
Breakaway Bull (I am going to limit this to 3-day or less patterns)
Ladder Bottom Bull (I am going to limit this to 3-day or less patterns)
Three Stars in the South (done)
Unique Three River Bottom (done)

Bullish Continuations - High Reliability
High Price Gapping Bull
Matt Hold Bull
Rising Three Methods
Side by Side White Lines Bull
Stick Sandwich Bull

Bullish Continuations – Medium Reliability
Upside Gap Three Method Bull
Upside Tasuki Gap Bull

Bearish Reversals – High Reliability
Evening Star
Evening Star Doji
Three Inside Down
Two Crows Bear
Upside Gap Two Crows Bear

Bearish Reversals – Medium Reliability
Advanced Block Bear
Breakaway Bear
Deliberation Bear

Bearish Continuations - High Reliability
Falling Three Methods

Bearish Continuations - Medium Reliability
Downside Gap Three Method Bear
Downside Tasuki Gap
Side by Side White Lines Bear

I know you posted a morning star above, with a gap up; there are however two gaps/windows, one before and one after the star/doji in the classic morning and evening star/doji patterns.
S2
Posted : Saturday, October 1, 2005 11:02:12 PM
Registered User
Joined: 4/6/2005
Posts: 239
If you are not familiar with any of the patterns listed above, do a google search on the pattern name. Some of the result sites will show an abstract of the candle pattern, a brief desctiption and criteria. The best result are probably on LitWick and RenegadeSolutions
Craig_S
Posted : Saturday, October 1, 2005 11:15:08 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
QUOTE
I know you posted a morning star above, with a gap up; there are however two gaps/windows, one before and one after the star/doji in the classic morning and evening star/doji patterns.

Look at my solution again... it has both gaps.
Clue: think about this condition:
High 1day Ago as % of Low 2days Ago (MIN to 99.99)

- Craig
Here to Help!
S2
Posted : Saturday, October 1, 2005 11:28:52 PM
Registered User
Joined: 4/6/2005
Posts: 239
Yes, now that I look at it, and try to wrap my mind around this methodology, I can see that that would allow for a gap condition. Could you not also use the same technique for the gap up of the current day? Low today as % of High 1day ago (100.1 to Max)?

This kind of thinking taxes my brain to much. I have enough trouble trying to keep the OC HL on the various days straight without adding %, Min and Max values into the mix.
Craig_S
Posted : Saturday, October 1, 2005 11:38:54 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
LOL (Laughing Out Loud).

You could do that for the current day but there is no point... Gappers already exists as a condition!

When thinking about all of these X as a % of Y you only need to remember three things:

If X is less than 100% of Y it is below it
If X is more than 100% of Y it is above it
If X is 100% of Y they are touching/equal

- Craig
Here to Help!
S2
Posted : Sunday, October 2, 2005 1:12:58 AM
Registered User
Joined: 4/6/2005
Posts: 239
I'm happy to provide you some levity on a Saturday evening.

Yes, I understand that if x is < 100% it is below Y, etc. But it is also keeping straight the open of today vs the close, or was it open, of yesterday and was it supposed to be < 100% or more than 100%; and, do I want the open as % of yesterday's close or the close as % of yesterday's open? My head hurts just thinking about it.

It is much simpler for me to follow your advice, layout the pattern, label the opens, close, etc. and write the PCF for all the relationships in the pattern.

I'm all for PCF reusability, and wish the PCF language was a language, and that it allowed for variables, named instances, looping and recursive function calls.

As mentinoed in the thread that spawned this one, there are about 60 commonly recognized candlestick patterns. I have one PCF per pattern, for a total of 60. It will be interesting to see how many PCFs it requires to do it your way to implement some of the more complex 5 candle patterns; and how many total PCFs you end up with.

I know that TC has a gap function that is for the current day, since many of the more complex candle patterns deal with gaps 3-4 days back or multiple gaps, and for conscistency between pattern solutions, I would suggest not using the gap function but to use the x < 100% or X > 100%. But that would be only my personal preferance.

Craig, thanks for your support, assistance and fine videos. Keep up the good work!


Steve
bustermu
Posted : Sunday, October 2, 2005 10:35:15 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Craig,

You have a few problems mostly caused by all of that division (something that should be avoided when possible).

Today's Candle
Close as % of Open
C/O*100

Body as % of Candle
ABS(C-O)/(H-L)*100

==> Divide by zero. Value when H = L?

Body Center as % of Candle
(((ABS(C-O)/2)+((((C<O)*C)+((C>O)*O))*(-1)))-L)/(H-L)*100

==> Divide by zero. Value when H = L? When C = O, value is -L/H-L. Why not ((C+O)/2-L)/(H-L) when H > L?

Top of Body as % of Candle
(((((C>O)*C)+((C<O)*O))*(-1))-L)/(H-L)*100

==> H = L? C = O?

Bottom of Body as % of Candle
(((((C<O)*C)+((C>O)*O))*(-1))-L)/(H-L)*100

==> H = L? C = O?

Range as % of Average
(H-L)/(AVGH21-AVGL21)*100

==> AVGH21 = AVGL21? There is nothing to stop it from happening.

Candle 1 Day Ago
Close as % of Open 1day ago
C1/O1*100

Body as % of Candle 1day ago
ABS(C1-O1)/(H1-L1)*100

==> Same?

Body Center as % of Candle 1day ago
(((ABS(C1-O1)/2)+((((C1<O1)*C1)+((C1>O1)*O1))*(-1)))-L1)/(H1-L1)*100

==> Same?

Top of Body as % of Candle 1day ago
(((((C1>O1)*C1)+((C1<O1)*O1))*(-1))-L1)/(H1-L1)*100

==> Same?

Bottom of Body as % of Candle 1day ago
(((((C1<O1)*C1)+((C1>O1)*O1))*(-1))-L1)/(H1-L1)*100

==> Same?

Range 1day ago as % of Average
(H1-L1)/(AVGH21.1-AVGL21.1)*100

==> Same?

Today's Candle vs Candle 1 Day Ago
High Today as % of High 1day ago
H/H1*100

Low Today as % of Low 1day ago
L/L1*100

Top of Body Today as % of ToB 1day ago
((((C>O)*C)+((C<O)*O))*(-1))/((((C1>O1)*C1)+((C1<O1)*O1))*(-1))*100

==> C = O? C1 = O1?

Bottom of Body Today as % of BoB 1day ago
((((C<O)*C)+((C>O)*O))*(-1))/((((C1<O1)*C1)+((C1>O1)*O1))*(-1))*100

==> Same?

Top of Body Today as % of BoB 1day ago
((((C>O)*C)+((C<O)*O))*(-1))/((((C1<O1)*C1)+((C1>O1)*O1))*(-1))*100

==> Same?

Center of Body Today as % if "of" CoB 1day ago
((ABS(C-O)/2)+((((C<O)*C)+((C>O)*O))*(-1)))/((ABS(C1-O1)/2)+((((C1<O1)*C1)+((C1>O1)*O1))*(-1)))*100

==> C = O? C1 = O1? Why not (C+O)/(C1+O1)?

Body as % of Body 1day ago
ABS(C-O)/ABS(C1-O1)*100

==> This is the very reason to avoid division where possible. Suppose you want the condition ABS(C-O) > ABS(C1-O1)? If you solve the division by zero problem by adding a little epsilon to the denominator, then the slider granularity has you. In general, there is no way out but to abandon the ratio/slider approach. This ratio should never be formed.

Candle as % of Candle 1day ago
(H-L)/(H1-L1)*100

==> Similar problems here, just not as big. This ratio should never be formed.

High as % of ToB 1day ago
H/((((C1>O1)*C1)+((C1<O1)*O1))*(-1))*100

==> C1 = O1?

Low as % of BoB 1day ago
L/((((C1<O1)*C1)+((C1>O1)*O1))*(-1))*100

==> C1 = O1?

Etc.

Please look a Custom Indicator with PCF:

100*ABS(C-O)/(ABS(C1-O1)+0.000001)

on a few stocks and the problem is immediately obvious.

I don't recall any need for ratios in Candlestick Patterns. Maybe?

Thanks,
Jim Murphy

S2
Posted : Sunday, October 2, 2005 3:33:27 PM
Registered User
Joined: 4/6/2005
Posts: 239
bustermu,

You have pointed out another shortcoming to Craig's approach, that while may be infrequent is certainly valid.

As to the ratios in candlesticks, if I'm understanding your query correctly, there are several instances where they are needed. A long candle is often expressed as having a body that is > 60% of the bar range; a small body is often 30%- 40% of the range, or less. The position of the body in the range, expresseda as being in the top, middle or bottom of the range helps define a hammer, spinning top or inverted hammer repectively. So I think ratios are valid and needed with candlestick patterns.

Using ratios between candles, as Craig does to denote higher or lower opens and closes, while valid in most cases, but prone to the errors you point out, adds a level of complexity for me that is not worth the effort of having reusable PCFs, as much as I want reusable PCFs; plus the inability of this approach to aggregate several patterns into one PCF for say, highly reliable bullish reversals.
bustermu
Posted : Sunday, October 2, 2005 5:03:07 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (S2)

You have pointed out another shortcoming to Craig's approach, that while may be infrequent is certainly valid.

As to the ratios in candlesticks, if I'm understanding your query correctly, there are several instances where they are needed. A long candle is often expressed as having a body that is &gt; 60% of the bar range; a small body is often 30%- 40% of the range, or less. The position of the body in the range, expressed as being in the top, middle or bottom of the range helps define a hammer, spinning top or inverted hammer repectively. So I think ratios are valid and needed with candlestick patterns.


Consider:

Body today as % of Yesterday
ABS(C-O)/ABS(C1-O1)*100
VALUE 100.01 to MAX (the 100.01 had to be replaced by the first step above 100)

gives 2359 Symbols from the All Stocks List today, while

ABS(C-O)>ABS(C1-O1)

gives 2747 Symbol. The difference of 388 Symbols is lost.

"... body that is > 60% of the bar range":

ABS(C-O) > 0.6*(H-L)

"... a small body is often 30%- 40% of the range, or less":

ABS(C-O) <= x*(H-L) where x is of your choice satisfying 0.3 <= x <= 0.4

Etc.

As you can see, ratios are not needed for Candlestick Patterns. If one is not familiar with their use and knows when not to use them, they can lead to trouble. I doubt most users have that familiarity.

Thanks,
Jim Murphy
S2
Posted : Sunday, October 2, 2005 6:24:22 PM
Registered User
Joined: 4/6/2005
Posts: 239
bustermu,

I will defer to your mathmatical knowledge and will even admit to probably being in your most users group. I may be misunderstanding your point on ratios. The point I was attempting to make was based on the assumtion the body as a % of bar range was a ratio, if this is incorrect please help me to understand.


FYI: Here is the PC I'm using to find Dragonfly Doji Bear and is typical of the methods I'm using in all of my candlestick pattern recognition PCFs. You can see how I am determing body size as a % bar range and using a % of range to determine body location in the range. I find that this is easier for me to understand and to tweak/tune by adjusting the %, in this case 10% or less body in 90% or more towards the bottom of the range.

((ABS(O-C)/ (.001+H-L) <= 0.1) AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))
S2
Posted : Sunday, October 2, 2005 6:34:18 PM
Registered User
Joined: 4/6/2005
Posts: 239
Oops, that should be 90% towards the top of the bar range.

Simply changing the .9 to .1 in both places would produce a gravestone doji, which is in the bottom of the range.

Craig_S
Posted : Sunday, October 2, 2005 7:42:40 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
How many of the 388 stocks that were missed are the candle patterns that use Body today as % of Yesterday?

- Craig
Here to Help!
bustermu
Posted : Monday, October 3, 2005 6:12:32 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Craig_S)
How many of the 388 stocks that were missed are the candle patterns that use Body today as % of Yesterday?


Craig,

I am unable to answer your question at this time. I have not yet found a definition of Candlestick Pattern. If ABS(C-O) > ABS(C1-O1) qualifies, the answer is at least 388. If "Dark Cloud Cover" as defined by you is the only Candlestick Pattern that uses Body today as % of Yesterday, the answer is zero. You are more capable of answering the question than I. It would be nice for your post to be useful for home grown Candlestick Patterns also.

My post was soley to site oversights for your consideration and had nothing to do with Candlestick Patterns per se. For example, in

Body Center as % of Candle
(((ABS(C-O)/2)+((((C<O)*C)+((C>O)*O))*(-1)))-L)/(H-L)*100

1) There is a divide by zero when H = L.
2) The value is the same as -L/(H-L) when C = O and H > L.
3) The value is the same as ((C+O)/2-L)/(H-L) when C <> O and H > L.

My guess is that most users would be unaware of any of these three items and their neglect was just an oversight on your part.

As for ABS(C-O)/ABS(C1-O1), it falls right in there with ratios like (C-C1)/(C1-C2), RSI14.1/RSI14.1.1, (TSV18-TSV18.5)/ABS(TSV18.5), etc., a list of things not to do.

You know what a plot of:

100*ABS(C-O)/(ABS(C1-O1)+0.000001)

looks like, but viewing it and reading its values may be helpful to some in understanding the problem.

Thanks,
Jim Murphy



bustermu
Posted : Monday, October 3, 2005 7:09:56 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Steve,

Thanks for your response.

Usually "percent" means move the decimal two places to the left and "of" means multiply. Thus, X is greater than 20% of Y means X > 0.20*Y.

I don't think it is what you intended, but the PCF:

((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.1)AND
((O-L)/(.001+H-L)>=0.1)))

is equivalent to:

(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.1*(H-L))
AND((O-L)>=0.1*(H-L))

when the 0.001's are dropped. That is, the body is <= 10% of the range and C-L is >= 10% of the range and O-L is >= 10% of the range.

Thanks,
Jim Murphy
deanweinberg
Posted : Monday, October 3, 2005 10:51:50 AM
Registered User
Joined: 10/2/2005
Posts: 3
I have a candlestick chart open where some candlesticks are hollow green and others are filled green, same with the red. What is the difference with hollow and filled.

Also when I have tried to make my own bullish and separate bearish engulfing patterns it says that there is a Error in Formula Syntax.

What am I doing wrong please?

Thanks
Dean
Bruce_L
Posted : Monday, October 3, 2005 10:55:59 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
deanweinberg,
TeleChart 2005 combines color and body type to provide both Close versus Open and Close versus yesterday's Close information in the same candle.

C>O Hollow
C<O Solid
C>C1 Green
C<C1 Red

If you copy the Personal Criteria Formulas from TeleChart and Paste them here we'll take a look and see if we can tell why they are generating Syntax Errors.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
deanweinberg
Posted : Monday, October 3, 2005 11:05:34 AM
Registered User
Joined: 10/2/2005
Posts: 3
I dont understnd the

C>O Hollow
C<O Solid
C>C1 Green
C<C1 Red



Bullish Engulfing I am entering this:

Range 1day ago as % of Average (100.01 to MAX)
Close as % of Open 1day ago (MIN to 99.99)
Close as % of Open (100.01 to MAX)
Top of Body Today as % of ToB 1day ago (100.01 to MAX)
Bottom of Body Today as % of BoB 1day ago (MIN to 99.99)
*Sort in ascending order*





Bearish Patterns Engulfing I am entering this:

Range as % of Average (100.01 to MAX)
Close as % of Open 1day ago (100.01 to MAX)
Close as % of Open (MIN to 99.99)
Top of Body Today as % of ToB 1day ago (100.01 to MAX)
Bottom of Body Today as % of BoB 1day ago (MIN to 99.99)
*Sort in ascending order*

Craig_S
Posted : Monday, October 3, 2005 11:07:59 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Which of the PCFs are giving you a syntax error?

Have you watched the required videos mentioned at the top of the post yet?

C means close today
O means open today
C1 means close 1-day ago

Whether the open is above or below the close determines if the candle is solid or hollow. Whether the stocks closed up or down from the previous close determines the color.

- Craig
Here to Help!
S2
Posted : Monday, October 3, 2005 11:12:37 AM
Registered User
Joined: 4/6/2005
Posts: 239
bustermu,

Unfortunately, these three PCFs are not equivalent. The upper one returns a candle pattern that is considered a dragonfly doji, and that is all it returns.

My Original post of Dragonfly doji - returns 108 records
((ABS(O-C)/ (.001+H-L) <= 0.1) AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

Not sure where bustermu cam up with this - returns 658 recods
((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.1)AND
((O-L)/(.001+H-L)>=0.1)))

is NOT equivalent to: - retuns 1100 records

(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.1*(H-L))
AND((O-L)>=0.1*(H-L))

The lower PCF returns > 10x as many records (all stocks for both PCFs (9/30/05 data)) including many that are not considered a dragonfly doji. It does return only doji patterns (body less than 10% of the range) but it includes candles where the body is not within 10% of the top of the range, the defintion of a dragnofly doji.

A true doji has the same open and close. The purist dragonfly version also has the OHC all the same. Using a percentage, both for body size and placement of the body in the range allows for those candles that are close to the pattern even if not being in their purest form (This is allowed with candle patterns, to a point). I've have decided to start with a 10% body, others may want a 5% body; same with the body being 90% of the way to the top of the range, others may want it within 95% of the top of the range.

If you are not familiar with candlestick patterns I highly recommend Steve Nison's "Japanese Candlestick Charting Techniques" and Stephen Bigalow's "Profitable Candlestick Trading." As another option you can do a google search on the web for any of the common candlestick patterns named in the second post in this thread. Some of the sites in the result will show pictures of the patterns and provide the criteria that constitute the pattern, which can be from one to five bars/candles. These patterns, and what they portend, are said to be viable across all time frames.


After further investigation I did find that
((ABS(O-C)/ (.001+H-L) <= 0.1) AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

is equivalent to
((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

and is equivalent to
(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.9*(H-L))
AND((O-L)>=0.9*(H-L))

Which is probably what Jim meant, but when you play the role of a stickler you have to be prepared to be stickled.

Steve
deanweinberg
Posted : Monday, October 3, 2005 11:23:10 AM
Registered User
Joined: 10/2/2005
Posts: 3
Thanks for all the info so far.

Can you please give me the formula for bullish and bearish engulfing patterns.

Thanks
S2
Posted : Monday, October 3, 2005 11:29:57 AM
Registered User
Joined: 4/6/2005
Posts: 239
Craig,

I see that you are annotating both my list of suggested patterns (done) and that you are adding them to your top post as you do them; good ideas. I ask that you bold all the pattern names in your top post to make them stand out and be easier to spot.

I imagine that your reluctance to do the 4 and 5 day patterns has to do with the complexity that adding the PCFs for the third and fourth day back brings to your method of identifying patterns.

That you could use your method to identify all the patterns was never in doubt; it was the added complexity required in the name of reusability of the PCFs that was being questioned.

Keep up the good work.

Steve
Craig_S
Posted : Monday, October 3, 2005 11:55:16 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
deanweinberg,

Go to the very top of this thread (my post that starts this). Read the intro and watch the videos. You can then scroll down and you will find engulfers under bullish and bearish.

Enter the required PCFs and use the guidlines to limit them.

Here is another video to help you:

Use PCFs and EasyScan to find Bullish Engulfing Candlesticks

- Craig
Here to Help!
S2
Posted : Monday, October 3, 2005 2:20:22 PM
Registered User
Joined: 4/6/2005
Posts: 239
bustermu,

After even more investigation I find that
the top two PCFs do return the same stocks (108 of )
((ABS(O-C)/ (.001+H-L) <= 0.1) AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

is equivalent to
((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))



and is NOT equivalent to the PCF below as it includes stocks where H = L which are not wanted and don't fit the dragnofly doji pattern. This PCF returned 568 symbols vs the 108 for the two above.
(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.9*(H-L))
AND((O-L)>=0.9*(H-L))

adding L < H dropped the reutned symbols to 111. The 3 additional symbols are (VSTA, FMTI and MS). They are all dragonfly doji patterns. A cursory check does not reveal why these 3 symbols are not being picked up by the othe two PCFs.

bustermu
Posted : Monday, October 3, 2005 3:56:58 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Steve,

Thanks. I always appreciate being corrected.

I took your statement:

"Simply changing the .9 to .1 in both places would produce a gravestone doji, which is in the bottom of the range."

as instructions to change:

((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

to:

PCF1:
((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.1)AND
((O-L)/(.001+H-L)>=0.1)))

Like I said, I did not think that is what you intended. Let's stick with it anyway.

Please consider also:

PCF2:
((ABS(O-C)/(.000001+H-L)<=0.1)AND
((C-L)/(.000001+H-L)>=0.1)AND
((O-L)/(.000001+H-L)>=0.1)))

PCF3:
((ABS(O-C)/(H-L)<=0.1)AND
((C-L)/(H-L)>=0.1)AND
((O-L)/(H-L)>=0.1)))

PCF4:
(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.1*(H-L))
AND((O-L)>=0.1*(H-L))

PCF5:
(ABS(O-C)<=0.1*(H-L))
AND((C-L)>=0.1*(H-L))
AND((O-L)>=0.1*(H-L))
AND(H>L)

The count on the All Stocks WatchList for 09/30/05 is:

PCF1: 658
PCF2: 650
PCF3: 650
PCF4: 1100
PCF5: 650

PCF1 and PCF2 disagree because 0.001 in the denominator is too large. Change it to 0.000001 and your results will improve. PCF3 is PCF1 after dropping the 0.001's. PCF4 knows that 0.0 is greater than or equal to 10% of 0.0 but PCF3 does not. The PCF4's which are not also PCF2's and PCF3's all satisfy H = L. If we prevent H = L in in PCF4, we obtain PCF5. Now, PCF2, PCF3, and PCF5 not onlw have the same numbers, they select the same stocks.

I should have explained that PCF4 knows that 0.0 is greater than or equal to 10% of 0.0 but PCF3 does not, it just gives up. If you test PCF3 on a stock for which H = L, fortunately, it will tell you that you are doing something wrong and you are.

Thanks very much for pointing out my error. Dividing by zero is not good for TC2005 or any of us.

Thanks,
Jim Murphy
S2
Posted : Monday, October 3, 2005 4:37:25 PM
Registered User
Joined: 4/6/2005
Posts: 239
bustermu,

Thanks for your input. Because of the 3 stock disparity in the PCFs above I have gone back through my candle PCFs and changed from:

((ABS(O-C)/ (.001+H-L) <= 0.1) AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

To:
((ABS(O-C)<= 0.1 *(H-L) AND
((C-L) >= 0.9 *(H-L))AND
((O-L) >=0.9 *(H-L)) AND
(H > L))

I've done this in all case where a fudge factor was being added to allow for H-L = 0. The fudge factor was what was excluding the 3 stocks from being included. I'm not sure that .0000001 would have sufficed. It is now a mute point having reworked the formulas to get rid of division.

<quote bustermu>
I took your statement:

"Simply changing the .9 to .1 in both places would produce a gravestone doji, which is in the bottom of the range."

as instructions to change:

((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.9)AND
((O-L)/(.001+H-L)>=0.9)))

to:

PCF1:
((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)>=0.1)AND
((O-L)/(.001+H-L)>=0.1)))

<stop quote bustermu>


My statement was in error and steered you wrong. I should have stated to also change the GT to LT when changing the .9 to .1 to produce the gravestone

((ABS(O-C)/(.001+H-L)<=0.1)AND
((C-L)/(.001+H-L)<=0.1)AND
((O-L)/(.001+H-L)<=0.1)))

Sometime I use the high and sometime I use the low as my reference point. In my rush I did not check closely which I was using in the PCF under discussion.

Jim, Thanks for your assitance and posts to the forums. I've learned alot from your offerings over the past several months.

Craig, we both posted about the same time earlier this morning and you may have missed my request to bold the names of the patterns you've provided scan criteria for, then again maybe you just haven't had time to address it yet.
shell
Posted : Monday, October 3, 2005 5:48:40 PM
Registered User
Joined: 9/22/2005
Posts: 19
Craig,

I appreciate all your help with this. I want to be able to use the Hanging Man on three of my personal watchlists. I'm really new and don't know where to start. From the beginning, please!
Thanks, Shell
Craig_S
Posted : Monday, October 3, 2005 5:59:05 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
shell, follow these steps:

1. Watch the videos I linked at the top of the post

2. Find Hanging Man near the bottom, write down the PCFs needed and the limits

3. Find the PCFs in the list of PCFs (near the top)

4. Create both of them (as taught in the video)

5. Calculate your PCFs (as taught in the video)

6. Create an EasyScan that uses your Personal WatchList as the WatchList to scan. If your "personal WatchList" is being created by an EasyScan, just edit it.

7. Add the two PCFs and limit them based on the VALUES given under Hanging Man.

Ta Da!

- Craig
Here to Help!
shell
Posted : Tuesday, October 4, 2005 1:10:48 PM
Registered User
Joined: 9/22/2005
Posts: 19
Hi Craig, I sure do appreciate all the information that you have given me. BUT...I seem to be stuck aor Maybe I'm just not in the right place. I watched the videos that you recommended and took lots of notes. As for the rest of the instruction, I'm a little confused. Which part of my watchlist or easyscan menu will show me the Hanging Man and The Dark Cloud cover, their criteria, and limits. It seems that I have been everywhere in the menu and still can't find what I need. Getting frustrated. HELP!!! Thanks, Shell
Craig_S
Posted : Tuesday, October 4, 2005 1:28:34 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
The PCFs and the EasyScan conditions for the patterns are within the first post on this page UNDER the linked videos.

Read through the entire first post and you will see the PCFs then you will see the EasyScan settings for bullish and bearish patterns. You will find the items for steps #2 and #3 in my original post above.

- Craig
Here to Help!
clifpa
Posted : Wednesday, October 5, 2005 10:46:38 AM
Registered User
Joined: 9/25/2005
Posts: 49
This is perfect, just what I needed! Thanks.

I know this is a work in progress.

However, I can't get the PCF to validate:

Bottom of Body Today as % of BoB 1day ago
((((C<O)*C)+((C>=O)*O))*(-1))/((((C1<O1)*C1)+((C1<=O1)*O1))*(-1))*100

The Top works just fine. If I change the (C1<=O1) to (C1 < O1) it works?

Best, Cliff
bustermu
Posted : Wednesday, October 5, 2005 12:53:01 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Craig,

It would be nice if your PCF's could be used in Custom Percent True Indicators (CPTI) to mark the location of Candlestick Patterns.

From:

Some Candle PCFs by request

a PCF for Dark Cloud Cover is:

PCF1:
(C1/O1*100+0>100)
AND(C/O*100<100)
AND(ABS(C-O)/ABS(C1-O1)*100>100)
AND(O/C1*100>100)
AND(C/O1*100>100)

Also, please consider:

PCF2:
(C1>O1)
AND(C<O)
AND(ABS(C-O)>ABS(C1-O1))
AND(O>C1)
AND(C>O1)

Please setup a CPTI with PCF1 and a CPTI with PCF2. Select the Dow Jones 30 Industrial Component Stocks, Zoom 4, and 10/04/05 on the Right-Edge. The first finds no Patterns and the second marks Patterns for all 30 stocks.

Do you think it would be an improvement to modify your PCF's so that they could be used to mark and count Candlestick Patterns?

Thanks,
Jim Murphy
Craig_S
Posted : Wednesday, October 5, 2005 1:26:18 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
clifpa,

There was a typo. I fixed it

Bottom of Body Today as % of BoB 1day ago
((((C<O)*C)+((C>=O)*O))*(-1))/((((C1<O1)*C1)+((C1>=O1)*O1))*(-1))*100

- Craig
Here to Help!
shell
Posted : Wednesday, October 5, 2005 2:20:10 PM
Registered User
Joined: 9/22/2005
Posts: 19
Hi Craig,
It's me again! I understand how to get the dollar amounts on the stock and how it works for the candle. My question is (and maybe I'm phrasing it wrong)can I do a monthly scan using the candlesticks and have it show me the stocks and not the amount. Here's what I did: For the month of October, I put in the earnings dates, if the stock was optionable, and if it allowed shorts in the notes. For the month of October, November, and December, which in three month intervals covers the entire year. Now I'd like to see which stocks (using the candlesticks) will show the Dark Cloud Cover, Hanging Man. etc., so I can select those stocks the spedcifically look at. If this doesn't make any sense let me know and I'll try and explain it more clearly. Maybe realistically this is not an option to be able to scan by. Thank you so much for all your help so far and hopefully you'll be abke tio let me know if this is doable. Shell
bustermu
Posted : Wednesday, October 5, 2005 2:52:27 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Addendum:

Please notice that if you modify your PCF's, they can be used to find all stocks with a particular Candlestick Pattern occurring in the last n bars even on multiday charts.

Thanks,
Jim Murphy
Craig_S
Posted : Wednesday, October 5, 2005 3:37:35 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
shell,

I am not sure I understand but let me see...

I assume you have all of these stocks in their own Personal WatchList.

If so, create an EasyScan for the desired pattern you want (one for Hanging Man, one of Dark Cloud, etc).

Now you have a WatchList of the stocks you've been writing notes on and tracking and another WatchList that is being generated by your EasyScan for the pattern.

I would use the SubList feature to find the stocks common to both WatchLists.

Here is a video on SubList

Techniques for using the Sublist feature

If I missed the mark, start a new topic in ASK A TRAINER and lets see if I can figure out what you mean.

- Craig
Here to Help!
clifpa
Posted : Wednesday, October 5, 2005 9:45:20 PM
Registered User
Joined: 9/25/2005
Posts: 49
Craig,

I must say that I'm finally getting really frustrated.

I have built the PCF's for the Engulfing candlestick and followed your directions to the 'T'. The results are all over the place.

I have gone over and over the PCF calculations, I have tested each one for errors, Calculated/updated each one and added them to a new EasyScan. I have set each one of the PCF's to value and entered the min or max values. I have checked and rechecked them.

Now I'm tired, thinking how am I going to be able to spend a day on entering each one of these stupid EasyScans for the desired candlestick pattern.

Craig, it just can't be this hard. Adding the formula to a new PCF and adding that PCF to a new EasyScan and selecting it to run is not rocket science, or is it?

What's up doc?

Cliff

Craig_S
Posted : Wednesday, October 5, 2005 9:52:52 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Give me some of the stocks that are showing up that are not the pattern. From there I might be able to figure out the culprit.

You can also do this as one boolean formula:

Bullish Engulfing
(H1-L1)>(AVGH21.1-AVGL21.1) AND
C1<O1 AND
C>O1 AND
O<C1

Bearish Engulfing
(H1-L1)>(AVGH21.1-AVGL21.1) AND
C1>O1 AND
C<O1 AND
O>C1

You can then sort the results by a price percent change condition (5-day, 1-month, etc) to get the trend in the right direction.

- Craig
Here to Help!
zencandle
Posted : Wednesday, October 5, 2005 10:44:27 PM
Registered User
Joined: 4/15/2005
Posts: 5
Cliff,

Programing can be frustrating as your finding out. If your syntax is of ANY it will not work. What I do that helps simplify the process is write the code (PFC) in steps. Say I wanted Bullish Engulfing. Its a two day pattern so we work on the first day first. Day one I want to be a down day. Day one is yesterday so I write the pfc to find days that closed down yesterday.

C1 < O1

Then test it on symbol that had a down day yesterday then save it. Then update your pfc's.

Now I don't know the "offical" pattern but I like the 2nd day to be an up close. I want the todays range to engulf yesterdays range. I want todays cadle body to engulf yesterdays body. Here is the total pfc

(C1 < O1) AND (H > H1) AND ( L < L1) AND (O < C1) AND
( C > O1)

after you make the pfc, just make a new scan and drop the pfc in it. Save it under whatever name you want and bingo you go it. Then when that works you can add any other critrion you wish in your scan.

Todays scan pulled 17 issues out of all symbols. It would stand to reason that after the broad market has sold off hard the last two days that issues making bull candle patterns have good short term
(2 to 13 days) strength. Hope this helps

Jason

zencandle
Posted : Wednesday, October 5, 2005 11:06:01 PM
Registered User
Joined: 4/15/2005
Posts: 5
Craig,

I noticed your most recent post with boolean code has

Bullish Engulfing
C < O .......you want the second day to close down?

Bearish Englufing

C > O .......you want the second day to close up?

Did you get these backwards or do I need to get out the old candle books ?

Thanks for all you do!
Craig_S
Posted : Thursday, October 6, 2005 1:37:09 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
oversight on my part... nice catch. I fixed it.

"officially" you only need today to be up, yesterday down and today's body engulfs the yesterday's body.

- Craig
Here to Help!
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.