StockFetcher Forums · Filter Exchange · Need some help calculating<< 1 2 >>Post Follow-up
KSK8
561 posts
msg #149541
Ignore KSK8
11/6/2019 3:53:55 PM

Attempting to find stocks that have a day range (high-low) that is in between 70% - 90% of the 13-week range.

How would I calculate this?




xarlor
587 posts
msg #149545
Ignore xarlor
11/6/2019 6:50:20 PM

When you say 13-week range do you mean [13 week high - 13 week low] or the average true range for the past 13 weeks: ATR(65)? These are two very different numbers. Here I'm using ATR(65):

Fetcher[
/* KSK8: Attempting to find stocks that have a day range (high-low) that is in between 70 - 90 percent of the 13-week range.
Assuming this means 13-week average true range. */

set{lo,ATR(65) * .70}
set{hi,ATR(65) * .90}
set{DayRange,high - low}

DayRange > lo
DayRange < hi

set{PercentDayRange,dayrange / ATR(65)}

add column ATR(65)
add column lo
add column hi
add column DayRange
add column PercentDayRange
]





KSK8
561 posts
msg #149546
Ignore KSK8
11/6/2019 7:20:29 PM

Fetcher[
symlist(prpo)
offset is 29
]


On the 26th of September, you can see how PRPO's candle body engulfs most of its recent price range over the past few months. I'm not quite sure what percent of the range it engulfs, but that's what I'm in pursuit of measuring. I hope that clarifies.


xarlor
587 posts
msg #149547
Ignore xarlor
11/6/2019 8:30:22 PM

Ah, that does help. Here you go.

Fetcher[
/* KSK8: Attempting to find stocks that have a day range (high-low) that is in between 70 - 90 percent of the 13-week range. */

/* The big candle */

set{13wl,low 13 week low}
set{13wh,high 13 week high}
set{13wr,13wh - 13wl}

set{DayRange,high - low}

set{PercentDayRange,dayrange / 13wr}

PercentDayRange > .70
PercentDayRange < .90

/* The setup, edit/omit this part to find your setup */

average volume(30) > 123456
close > open
close > high 30-day high 1 day ago

do not draw percentdayrange
/* Debugging */

add column 13wl
add column 13wh
add column 13wr
add column DayRange
add column PercentDayRange
]



KSK8
561 posts
msg #149548
Ignore KSK8
11/6/2019 10:52:07 PM

Thank you very much xarlor!

KSK8
561 posts
msg #149553
Ignore KSK8
modified
11/8/2019 12:40:53 AM

How would I calculate it to tell me what percent of the range the current candle engulfs excluding the range the current candle already makes?

For example;

CNST on November 6 shows it took up 75% of the range yet it's current candle was responsible for the majority of that range. Ultimately I'm trying to avoid including the current day's range when factoring in how much of the previous range the current candle engulfs.

How would I do this?

nibor100
1,045 posts
msg #149555
Ignore nibor100
11/8/2019 10:13:50 AM

@ksk8,

I made some changes to xarlor's filter to adjust for your last question as you can see further below:

However, I'm not sure these filters are giving you quite the results you are looking for in all cases.
For example, look at the below filter run 1 day ago for result stock FAGI. The large candle is completely above all of the 13 week High Low history so it doesn't really encompass 70% to 90%.

It's total range is just 76% of the 13 week high-low range mathematically.

Ed S.

Fetcher[
/* KSK8: Attempting to find stocks that have a day range (high-low) that is in between 70 - 90 percent of the 13-week range. */

/* The big candle */

set{13wl,low 13 week low 1 day ago}
set{13wh,high 13 week high 1 day ago}
set{13wr,13wh - 13wl }
/*add column 13wr one day ago*/

set{DayRange,high - low}

set{PercentDayRange,dayrange / 13wr }

PercentDayRange > .70
PercentDayRange < .90

/* The setup, edit/omit this part to find your setup */

average volume(30) > 123456
close > open
close > high 30 day high 1 day ago
chart-time is 14 weeks
do not draw percentdayrange
do not draw high 30 day high /*1 day ago*/
/* Debugging */
draw high 13 week high on plot close
draw low 13 week low on plot close
add column 13wl
add column 13wh
add column 13wr
add column DayRange
add column PercentDayRange
]



KSK8
561 posts
msg #149556
Ignore KSK8
11/8/2019 10:54:58 AM

I'm trying to have it to where the current candle's range is within 70% of the 13week range (from 1 day ago), instead of its current candle range is equivalent to 70% of the 13week range.

For example, if you look at FAGI on November 6, it's candle is not within 70% of the 13week range (1 day ago). But if you look at BEAT on the same day, it definitely looks like it's within 70% of the 13week range 1 day ago.

Does this make sense in terms of what I'm trying to calculate?



nibor100
1,045 posts
msg #149557
Ignore nibor100
11/8/2019 11:03:57 AM

Yes that’s what I suspected u really wanted.

Thanks,
Ed S.

nibor100
1,045 posts
msg #149558
Ignore nibor100
11/8/2019 12:14:39 PM

@ksk8,

body of candle or entire candle including wick is to be inside 70 to 90% of 13 wk hi-lo range?

When I look at BEAT on Nov 6th part of its wick is above the prior 13 wk hi so I think it doesn't qualify as a candle you want to see.

Thanks,
Ed S.

StockFetcher Forums · Filter Exchange · Need some help calculating<< 1 2 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.