Author: Handlep
This screener will find candlesticks with a real body of one third or less the size of the overall candle, following a decline. Therefore it will detect Hangmen, Hammers, inverted Hammers, Spinning Tops, Dojis, etc.
I have used ProRealTime’s Bullish Engulfing code to detect the decline.
Note: Rather than write several screeners to detect the individual candle types, this screener is relatively generic, so will throw up candles which do not necessarily imply a reversal – for example, the main body may not be close enough to the end of the candle to be a true hammer or hanman, and not close enough to the centre to be a spinning top. Obviously any such detections should be discarded.
Good luck in your trading.
REM Compute the power of the bearish trend
// Find the highest quote on the last 8 bars
HighPoint = HIGHEST[8](HIGH)
// Compute the variation of price from this point to now
Decline = HighPoint - CLOSE
// Compute the usual volatility of the stock (median of True Range)
Norm = SUMMATION[3](TR) - HIGHEST[3](TR) - LOWEST[3](TR)
if norm <>0 then
criteria=Decline / Norm
else
criteria=undefined
endif
REM Stock picking : only candles whose real body is equal to, or less than, one third of the overall range.
Filter = ABS(open - close) <= (ABS(high-low))/3
REM We keep the most serious declines
SCREENER [ Filter ] (criteria AS"Trend Power")