StockFetcher Forums · General Discussion · What is wrong with this filter?<< >>Post Follow-up
gokhantk
4 posts
msg #151491
Ignore gokhantk
3/27/2020 10:06:51 AM

Hi,

I'm new here. I read the manual but I couldn't figure out why this is not working.

"high reached (high 3 months high 2 weeks ago) within last 2 weeks"

I am trying to get list of the stocks reached their pre-crash high ( I use "high 3 months high 2 weeks ago" to find this) within the last 2 weeks.

Also

1- I guess I needed to use parentheses or use user defined variable to make it clear that within last week won't be applied to the filter within the parentheses but to the overall filter. Is this correct?

2- Why am I need to use "high 3 months high" instead of simply "3 months high". They return different results.

Thanks in advance

olathegolf
119 posts
msg #151498
Ignore olathegolf
3/27/2020 1:18:05 PM

Maybe something like this:
Fetcher[
set{10dhi,count(high above 3 month high 25 days ago,10)}
10dhi above 0
add column 3 month high 25 days ago
add column 10dhi
]



xarlor
587 posts
msg #151500
Ignore xarlor
3/27/2020 1:45:12 PM

2- Why am I need to use "high 3 months high" instead of simply "3 months high". They return different results.


Most people don't know this, but the first part indicates which part of the candle and the last part indicates if you want the highest in the period or the lowest. So you could filter for "Of all the LOWS in the last 3 months, which of them was the highest?". Or, "Of all the CLOSE in the last 3 months, which was lowest of them?"

See my example below.

Fetcher[
symlist(spy)

set{H3H,high 3-month high}
set{H3C,close 3-month high}
set{H3L,low 3-month high}

set{L3H,high 3-month low}
set{L3C,close 3-month low}
set{L3L,low 3-month low}

add column H3H {Highest 3-month high}
add column H3C {Highest 3-month close}
add column H3L {Highest 3-month low}

add column L3H {Lowest 3-month high}
add column L3C {Lowest 3-month close}
add column L3L {Lowest 3-month low}
]



gokhantk
4 posts
msg #151508
Ignore gokhantk
modified
3/27/2020 3:36:45 PM

Thank you for the answers.

Since I needed to use another high, I assumed that "3 Months High" is returning a candle not a number and what you (xarlor) say confirms this. Although I would expect that to return the highest already. User manual should include such details.

By the way, numbers returned in your SPY example is weird. I couldn't figure out what it considers as a "low" because lowest low (218.26) is clear but highest low(229.68) does not make sense to me.

xarlor
587 posts
msg #151509
Ignore xarlor
modified
3/27/2020 4:43:42 PM

Highest Low in this example means you take every Low of every day for the last 3 months. Then you sort those numbers from smallest to largest. The largest of these numbers is your Highest Low.

You mention 229.68. That is not the highest low, but the lowest high. In other words, take all the HIGHs of every day for the last 3 months. Sort those from smallest to largest. The smallest of these is the lowest high.

gokhantk
4 posts
msg #151512
Ignore gokhantk
3/27/2020 6:25:32 PM

I still think 229.68 is highest low because in your filter:

set{L3H,high 3-month low}
add column L3H {Lowest 3-month high}

So your labeling seems to be wrong. Please correct me if you still think that's not the case.

nibor100
1,044 posts
msg #151515
Ignore nibor100
3/27/2020 8:35:54 PM

@gokhantk,

I think he has labeled it correctly as I explain below:

This is how StockFetcher parses Xarlor's line of code "set{L3H,high 3-month low} "

name a variable L3H and,
choose the price 'High' (not the price Low, Open, or Close) and,
for the price 'High' for that symbol, determine the '3 month low' by throwing out all High prices higher than the lowest High price occurring in the past 3 months and,
place that value in variable L3H

You can double check if I'm right by adding this line to his filter:
draw l3h on plot price

or even this line
draw l3h

hope this helps,
Ed S.


gokhantk
4 posts
msg #151527
Ignore gokhantk
modified
3/28/2020 5:52:42 AM

@nibor100:

Thank you for the clarification.

StockFetcher Forums · General Discussion · What is wrong with this filter?<< >>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.