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 |

Not a True Gap Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderlady
Posted : Thursday, April 3, 2014 12:57:07 PM
Registered User
Joined: 10/7/2004
Posts: 1,178

Using the stock symbol, GDP, on today's daily chart as an example, notice the close of yesterday at $17.00 is $0.15 lower than the open of today at $17.15.  Also, observe that the upper shadow of yesterday's candlestick crossses the lower shadow of today's candlestck. This type of candlestick interaction is not a true gap.  I have, however, heard this called a "Dirty Gap".

Bruce, could yo please write two PCFs.  One for a Dirty Gap Up -- and the second for a Dirty Gap Down. 

Thank so much!

Bruce_L
Posted : Thursday, April 3, 2014 1:11:24 PM


Worden Trainer

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

If I'm understanding correctly, the following should work for a dirty gap up:

O > C1 AND C > C1 AND O > O1 AND C > O1

And the following should work for a dirty gap down:

O < C1 AND C < C1 AND O < O1 AND C < O1

Both Condition Formulas will also return true when the shadows do not overlap. If you want to make sure there is an overlap, then you could use the following for a dirty gap up:

O > C1 AND C > C1 AND O > O1 AND C > O1 AND H1 > L

And the following for a dirty gap down:

O < C1 AND C < C1 AND O < O1 AND C < O1 AND L1 < H

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
trout2
Posted : Thursday, April 3, 2014 1:26:33 PM
Registered User
Joined: 12/9/2008
Posts: 30

Hi, Bruce,       I would please like the formula for:   Aftyer 4 or more down days a     dragonfly doji appears @ the stock closes above $1.00.     Also, the same except a gravestone doji appears    @ another with a long legged hammer.      If those are not do able  would  just writing in   a  Doji  appears without being specific?.   Thank You Very Much       Arnie

Bruce_L
Posted : Thursday, April 3, 2014 2:07:53 PM


Worden Trainer

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

So a Dragonfly Doji where a True Doji with the open and close being exactly equal happens in the top third of the candle could be written as:

H - C < (H - L) / 3 AND O = C AND C > 1 AND C1 < C2 AND C2 < C3 AND C3 < C4 AND C4 < C5

A Gravestone Doji where a True Doji with the open and close being exactly equal happens in the bottow third of the candle could be written as:

C - L < (H - L) / 3 AND O = C AND C > 1 AND C1 < C2 AND C2 < C3 AND C3 < C4 AND C4 < C5

A Hammer where both the open and close are in the top third of the candle could be written as:

H - O < (H - L) / 3 AND H - C < (H - L) / 3 AND C > 1 AND C1 < C2 AND C2 < C3 AND C3 < C4 AND C4 < C5

And an Inverted Hammer where both the open and close are in the bottom third of the candle could be written as:

O - L < (H - L) / 3 AND C - L < (H - L) / 3 AND C > 1 AND C1 < C2 AND C2 < C3 AND C3 < C4 AND C4 < C5

None of these formulas have any restrictions on the size of the overall size of the current candle. If your definitions are different, then the formulas would need to be different as well.

For example, the formulas check for four down days in a row using just closing prices. If you define a down day as the close being below the open, this would need to change in the formula. If you want the hammer formulas to explicitly exclude dojis, you would need to specify that in the formula. If you want to use something other than the top and bottom third of the candle for the body locations, that would need to be changed.

Boolean PCFs for Candlestick Patterns



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