StockFetcher Forums · General Discussion · candlestick 1 day pattern<< >>Post Follow-up
sinhaprashantk
9 posts
msg #32433
Ignore sinhaprashantk
6/25/2004 11:42:19 AM

Hi,

Is there a way to search for a user defined candlestick 1-day pattern. I only see 2-4 day pattern search ability in SF.

I am specifically looking for a way to match candlesticks that have a long upper shadow, long lower shadow and small real body (aka spinning tops).

thanks,
Prashant




cegis
235 posts
msg #32434
Ignore cegis
6/25/2004 1:32:30 PM

Prashant,

Just define the parts using Open/High/Low/Close:

Fetcher[
set{topopen,count(open is greater than close,1)}
set{topclose,1 - topopen}

set{top1,topopen * open}
set{top2,topclose * close}
set{bodytop,top1 + top2}

set{bot1,open + close}
set{bodybot,bot1 - bodytop}

set{body,bodytop - bodybot}

set{upshadow,high - bodytop}
set{loshadow,bodybot - low}

set{uplen,upshadow / body}
set{dnlen,loshadow / body}

set{bodysize,body / price}

uplen is greater than 2
and dnlen is greater than 2
and bodysize is less than 0.05

and price is greater than 1
and volume 25 day low is greater than 250000

add column high
add column low
add column open
add column bodytop
add column bodybot
add column body
add column uplen
add column dnlen
add column bodysize
]



The first group of set{} commands determines which value should be used for the top of the body, the open or close. This leaves topopen = 1 if the open should be used (zero otherwise) and topclose = 1 if the close should be used (zero otherwise).

The next group then determines the top value. Since topopen will be 1 when topclose is zero - and vice versa - the multiplications will result in only one of top1 or top2 being greater than zero, with the other equal to zero. So, I can add them together to get the value of the top.

The next group determines the value to use for the bottom of the body. Since this should be the open if the top was the close, or vice versa, I can add the open and close together, then subtract the top to get the bottom (open + close - open = close; open + close - close = open).

The "shadows" are then calculated based on high/top/bottom/low.

The "relative length" of the shadows are calculated next. These are relative to the body length, so a value of 2 would mean the shadow is twice as long as the body.

Lastly, the "size" of the body, relative to the current price, is determined.

The first three conditions, then, are my interpretation of "long shadows" and "narrow body". I've chosen that both shadows need to be at least twice as big as the body, and the body must be less than 5% of the current price.

I also added price and volume criteria that I often use. (I don't like illiquid or penny stocks.)

Lastly, the "add column" statements are for illustration purposes...

Obviously, choose your values to suit your needs...

HTH,

C


sinhaprashantk
9 posts
msg #32437
Ignore sinhaprashantk
6/26/2004 12:07:55 PM

Thanks Cegis.

Works out quite well.


chetron
2,817 posts
msg #70836
Ignore chetron
modified
1/21/2009 5:57:46 PM

WITH A JP THOUGHT.....


Fetcher[

/* CEGIS WORK WITH A SHORT JP THOUGHT */

set{topopen,count(open is greater than close,1)}
set{topclose,1 - topopen}

set{top1,topopen * open}
set{top2,topclose * close}
set{bodytop,top1 + top2}

set{bot1,open + close}
set{bodybot,bot1 - bodytop}

set{body,bodytop - bodybot}

set{upshadow,high - bodytop}
set{loshadow,bodybot - low}

set{uplen,upshadow / body}
set{dnlen,loshadow / body}

set{bodysize,body / price}

/* OFFSET 1/6/09 */

uplen is greater than 2
dnlen is greater than 2
bodysize is less than 0.05
HIGH ABOVE EMA(100)
CLOSE BELOW EMA(100)
OPEN BELOW EMA(100)
and price is greater than 1
and volume 25 day low is greater than 250000

add column high
add column low
add column open
add column bodytop
add column bodybot
add column body
add column uplen
add column dnlen
add column bodysize

]



johnpaulca
12,036 posts
msg #70858
Ignore johnpaulca
1/22/2009 2:04:12 PM

Thanks MR. T

StockFetcher Forums · General Discussion · candlestick 1 day pattern<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.