//Bullish Set-up
hammer = Close>Open AND High=Close AND (Open-Low)>3*(Close-Open)
//BUEB
BUEB = close[1]<open[1] AND open=close[1] AND close>open[1] AND close>open
//BUOB
BUOB =((close[1] < open[1]) and (open[0] < low [1]) AND (close[0] > open[1]) and (close[0] > high[1]) and (close[0] > open[0]))
c1 = hammer
c2 = BUEB
c2a = BUOB
timeframe (daily)
//check for pullback day prior close below 21ema
indicator8 = close[1]
indicator9 = ExponentialAverage[21](close)
c6 = (indicator8 < indicator9)
//check quarterly MAs are in correct order for uptrend
Timeframe (Weekly)
indicator6 = ExponentialAverage[13](close)[1]
indicator7 = ExponentialAverage[13](close)
Indy8 = ExponentialAverage[39](close)
c4 = (indicator6 < indicator7)
c5 = (Indy8 < Indicator7)
//BEARISH SETUP
S1 = (open[1] < close[1] and open > close[1] and high - max(open, close) >= abs(open - close) * 3 and min(close, open) - low <= abs(open - close))
Spike = (close = highest[10](high[0]))
Shooter =S1 and Spike
//Condition: Bearish Outside Bar
BEOB =((close[1] > open[1]) and (close[0] < low [1]) AND (open[0] > high[1]) and (close[0] < open[0]))
//BEEB
BEEB = close[1]>open[1] AND open=close[1] AND close<open[1] AND close<open
// detection of Dark Cloud Cover (Bearish)
DCC = ((close[1]>open[1])and(((close[1]+open[1])/2)>close)and(open>close)and(open>close[1])and(close>open[1])and((open-close)/(.001+(high-low))>0.6))
timeframe (daily)
//check for pullback with day prior close below 21ema
indicator10 = close[1]
indicator11 = ExponentialAverage[21](close)
c7 = (indicator10 > indicator11)
//check quarterly MAs are in correct order for down trend
Timeframe (Weekly)
indicator6 = ExponentialAverage[13](close)[1]
indicator7 = ExponentialAverage[13](close)
Indy8 = ExponentialAverage[39](close)
c8 = (indicator6 > indicator7)
c9 = (Indy8 > Indicator7)
TIMEFRAME(DEFAULT)
SCREENER[(Shooter or BEOB or BEEB or DCC ) and c7 and c8 and c9] ((close/DClose(1)-1)*100 AS "%VAR" )
SCREENER[(c1 or c2 or c2a ) and c4 and c5 and c6] ((close/DClose(1)-1)*100 AS "%VAR" )