Hi, I’m attempting to add a piece of code into my screener that looks for stocks that are;
Above/below 1% on the day, last 4 or 5 candles(5 min) are all of the same direction/type, and during those 4 or 5 candles the stock traveled at least 0.5%.
It’s proving to be alot harder than I thought since none of my attempts are working out. So if anyone could help me out/point me in the right direction that would be great.
I’ve been using one stock to base my code off so I would know if it’s working or not, which is why I’m using a very specific Time condition.
Thanks in advance and Happy New Year! 🙂
Here’s a picture of the stock I’m basing my code off(15:55pm to 16:20pm) https://gyazo.com/aec1bc07101be43852076eccb689f82c and Below is my code so far:
tcondition = time>160000 and time<170000
timeframe (daily)
BullonDay = variation>1
BearonDay = variation<-1
Timeframe (5 minutes)
BullBody = (close > open)
Bull4 = summation[4](bullbody)+(variation(close))>=0.5
Bull5 = summation[5](bullbody)+(variation(close))>=0.5
Bull = Bull4 or Bull5
BullRow = Bull and BullonDay
BearBody = (close < open)
Bear4 = summation[4](bearbody)+(variation(close))>=0.5
Bear5 = summation[5](bearbody)+(variation(close))>=0.5
Bear = Bear4 or Bear5
BearRow = Bear and BearonDay
Screener [BearRow or BullRow]