| StockFetcher provides several pre-built candlestick patterns. The pre-built patterns simply use the "pattern is" phrase followed by the name of the pattern. In addition to the pre-built patterns, it is possible to define your own custom patterns using the standard StockFetcher syntax. The key to building candlestick screens is an understanding of the comparison of day high/low/open/closing values between other days. 
For example, a screen for a bar setup or candle pattern might want to find a point where a close is above a prior day's close. To do this, the comparison of close to close 1 day ago is needed. For example: 
close above close 1 day ago
 
 
To search the previous day instead: 
close 1 day ago above close 2 days ago
 
 
The same can be used with high, low, or open as well. Say you're looking for stocks where the close is above the prior day's close but the high is below the prior day's high: 
and high below high 1 day ago 
 
Another common comparison with candlestick patterns is comparing the body (close/open) regardless of whether the close is above the open. To do this, a few set statements will help out:   
set{body_bottom,min(open,close)}  
set{body_top,max(open,close)}  
So, lets assume you wish to compare two different body_tops: 
set{body_top,max(open,close)} 
show stocks where body_top 1 day ago is above body_top 2 days ago 
 
To find stocks where the last day's body engulf's the prior day's body, you might use: 
set{body_top,max(open,close)} 
show stocks where body_top is above body_top 1 day ago 
and body_bottom is below body_bottom 1 day ago 
 
Here are some more examples: 
Doji:  
and high is above open and low is below open
 
Hammer Candle:  
and close is more than 0.5% above open 
and open minus low is more than 50% above close minus open 
and close is above 1 
 
Example using high/low/close: 
and high is above high 1 day ago 
and low is below low 1 day ago 
 
Example comparing tail, head and body sizes: 
set{head_size,high - close} 
set{body_size,close - open} 
show stocks where tail_size is more than 25% above body_size 
and tail_size is above head_size 
and close is above open 
 
Advanced: 
Here is a sample filter for a weekly "Inverted Hammer": 
and weekly open is more than 0.5% above weekly close 
and weekly high minus weekly open is more than 50% above weekly open minus weekly close 
and close is above 1 and chart-display is weekly 
 
5 Candlestick bars down:  
show stocks where daily_diff has been below 0 for the last 5 days 
and open has been decreasing for 5 days 
 
  
Bearish Three Black Crows:  
  
and price is between 5 and 50 
and average volume(10) is above 100000 
 
Note: this example uses a pre-built candle pattern.  
Shooting star:  
set{body_top,max(open,close)} 
set{lshadowsize, body_bottom - low} 
set{tshadowsize, high - body_top} 
set{tshadowsize2, tshadowsize * 2} 
set{body_size, body_top - body_bottom} 
show stocks where lshadowsize is less than 0.001 
and tshadowsize2 > body_size 
and close increasing for the last 3 days 
and body_bottom > close 1 day ago close above 5 
 |