Stocks that close above their 5 period open


I’m looking for a scan that can find stocks closing above their 5 period open assuming that I’d be only starting these scans on the weekend when there are 5 full trading days on the market (not including holiday weeks where maybe 1 or 2 days the market is closed).

Below is an example of what I mean, (note: each candle is Monday, Tuesday, Wednesday, Thursday, Friday. You can see how Friday was the day it closed above the highest open price of the week which in this case it was Monday’s open candle):

Marked as spam
Posted by (Questions: 3, Answers: 5)
Asked on December 16, 2018 1:49 pm
Private answer

In order to make this flexible I have designed the code so that it will work any day of the week. I also created it to handle Holidays without modification.

def newWeek = GetWeek() <> GetWeek()[1];
rec weeklyOpen = if newWeek then open else weeklyOpen[1];
plot scan = close > weeklyOpen;

Marked as spam
Posted by (Questions: 36, Answers: 1978)
Answered on December 18, 2018 7:31 am

Thank you sir, very well made.

( at January 7, 2019 3:03 pm)