Candlestick patterns & Bollinger Band

Category: Screeners By: Henry Created: August 30, 2016, 4:09 PM
August 30, 2016, 4:09 PM
Screeners
0 Comments

Screener that identifies 4 different candlestick patterns with an upper or lower bollinger band breakout.

These are the four candlestick patterns that the screener is able to identify: Bearish Engulfing, Bullish Engulfing, Dark Cloud Cover and Piercing Line.
For the bearish engulfing and the Dark Cloud Cover the end price of the first candle has to be higher than the upper band level. The start price of the second candle got to be higher than the upper bollinger band as well.
For bullish engulfing and piercing line it is the opposite, first candle close price is below the lower band and the start price of second candle is below the lower band.

 

(this screener were coded for a request addressed to ProRealTime) :

//bollinger
P=20 //period
S=2 // Standard deviation

BollingerMA = Average[p](close)
STDDEV=STD[P](close)

bollUP = BollingerMA + s * STDDEV
bollDOWN = BollingerMA - s * STDDEV

// Detection bearish engulfing
bearishengulfing = CLOSE[1] > OPEN[1] AND OPEN > CLOSE[1] AND CLOSE < OPEN[1]

// Detection bullish engulfing
BullishEngulfing= CLOSE[1] < OPEN[1] AND OPEN < CLOSE[1] AND CLOSE > OPEN[1]

// Detection dark cloud cover (bearish reversal)
darkcloudcover = CLOSE[1] < OPEN[1] AND OPEN < CLOSE[1] AND CLOSE > OPEN[1]

// Detection piercing
piercing = CLOSE[1]<OPEN[1] AND OPEN< CLOSE[1] AND CLOSE>(CLOSE[1]+(OPEN[1]-CLOSE[1])/2) AND CLOSE < OPEN[1]

priceoverupperband=close[1] > bollUP and open > BollUP
priceunderlowerband=close[1] < bollDOWN and open < bollDOWN

condition=((bearishengulfing or darkcloudcover) and priceoverupperband) or ((BullishEngulfing or piercing) and priceunderlowerband)

screener[condition]

 

Download
Filename: Candlestick-patterns-and-BBand.itf
Downloads: 438
Henry Average
Hi! I'm moderating the English speaking forum on my free time. I'll try to answer your questions as good as I can and I also post the answers to code requests that were addressed directly to ProRealTime.
Author’s Profile

Comments

Logo Logo
Loading...