52 week low, within 5-10% scan


Category:
0
0

Hello sir – i am trying to make a 52 week low scan, i tried to replicate the following below and reverse/revise it for 52 week low but nothing is coming up.

Any assistance is appreciated, thanks again for all your help!

I’m looking for a 52 week high/low scan with the below conditions

 

BELOW is what i created. I’m sure im just missing 1-2 little things.

 

def fiftyTwoWeeklow = Lowest(low[1], 252);
def newFiftyTwoWeekLow = fiftyTwoWeekLow < fiftyTwoWeekLow[1];
def withinTenBars = Low > fiftyTwoWeekLow and Lowest(newFiftyTwoWeekLow, 10) < 0;
def fivePercentFromLow = fiftyTwoWeekLow * 1.05;
def tenPercentFromLow = fiftyTwoWeekLow * 1.10;
def closeWithinRange = close > fivePercentFromLow and close < tenPercentFromLow;
plot scan = withinTenBars and closeWithinRange;

Marked as spam
Posted by (Questions: 3, Answers: 2)
Asked on March 23, 2019 10:59 am
230 views
0
Private answer

Comparing your code to the original I find one obvious error:

def withinTenBars = Low > fiftyTwoWeekLow and Lowest(newFiftyTwoWeekLow, 10) < 0;

should be:

def withinTenBars = Low > fiftyTwoWeekLow and Lowest(newFiftyTwoWeekLow, 10) > 0;

It is the greater than zero portion at the very end. I know that most folks don’t understand exactly what that does. And it is natural to assume you need to flip that greater than to a less than when changing from 52 high to 52 low. Make that change and see if fixes things. There may be more changes needed.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on April 6, 2019 9:16 am