therooster
Junior member
- Messages
- 20
- Likes
- 8
REM Body Colors *********************************************************
whiteBody = (Close >= Open)
blackBody = (Open > Close)
REM Body Size (%) *********************************************************
smallBodyMaximum = 0.0025
realBodySize = ABS(Open - Close)
REM Candle Definitions *********************************************************
Doji = ABS(Close - Open ) <= (Close *smallBodyMaximum) OR ABS(Open - Close )<=((High - Low)*0.1)
shootingStar = smallLowerShadow AND NOT doji AND ((blackBody AND ABS(Open -High)>2*realBodySize) OR whiteBody AND ABS( High - Close )>2*realBodySize)
Hammer = smallUpperShadow AND NOT doji AND ((blackBody AND ABS(Close - Low )>2*realBodySize) OR (whiteBody AND ABS( Low - Open )>2*realBodySize))
REM Shadows *********************************************************
smallUpperShadow = (whiteBody AND High <= Close *(1+smallBodyMaximum)) OR (blackBody AND High <= Open *(1+smallBodyMaximum))
smallLowerShadow = (whiteBody AND Low >= Open *(1-smallBodyMaximum)) OR (blackBody AND Low >= Close *(1-smallBodyMaximum))
REM Engulfing **********************************************************
Engulfing = ((blackBody AND (blackbody[1]) AND Close <(Close [1]) AND Open >(Open [1]))) OR ((blackBody AND (whiteBody[1]) AND Open >(Close [1]) AND Close <(Open [1]))) OR ((whitebody AND (whitebody[1]) AND Close >(Close [1]) AND Open <(Open [1]))) OR ((whiteBody AND (blackBody[1])) AND Close >(Open [1]) AND Open <(Close [1]))
SCREENER [(shootingStar and not Hammer and not Engulfing) or (Hammer and not Engulfing and not shootingstar) or (shootingStar and not Hammer and not Engulfing)]
I will modify the screener part to show shooting star, hammer and engulfing for the last two bars instead of just the last one.
That's fantastic stuff, thanks Viktor. Do you have one for inside bars also?