StockFetcher Forums · General Discussion · Occurrences -- Count() Question<< >>Post Follow-up
lis
37 posts
msg #161102
Ignore lis
5/25/2024 5:23:01 PM

Posted this earlier in Announcements thread discussing the Count() feature. However, no answers received, so trying here. Any thoughts?
-----
I'm trying to do this, but it's giving me zero values for 'hit_btm' or 'hit_top' when there were actually times the high was above the up5 and/or the low was below the down5. What am I doing wrong?

Submit
Fetcher[
set{ channeltop, close 100 day high 1 day ago }
set{ channelbtm, close 100 day low 1 day ago }

set{ channel_total_size, channeltop - channelbtm }
set{ half_val, channel_total_size * 0.5 }
set{ channelmid, channeltop - half_val }

set{ pct5_val, channelmid * 0.05 }
set{ up5, channelmid + pct5_val }
set{ down5, channelmid - pct5_val }

set{ hit_btm, count(low below down5, 100) }
set{ hit_top, count(high above up5, 100) }

show stocks where chart-time is 100 days
and chart-type is OHLC
and market is not OTCBB
and market is not ETF
and volume 1 year low 1 day ago > 1,000,000

and add column down5
and draw price line at down5
and do not draw down5

and add column up5
and draw price line at up5
and do not draw up5

and add column hit_btm
and add column hit_top
]




lis
37 posts
msg #161103
Ignore lis
5/25/2024 5:26:39 PM

For example, NKE for today (May 25, 2024) is showing '0' under the 'hit_top' column - even though there are a number of bars appearing above the top line...

nibor100
1,031 posts
msg #161104
Ignore nibor100
5/25/2024 7:14:39 PM

I didn't spend too much time on this issue but if you add the following to your filter it may indicate what is actually going on when you look at a chart of NKE....
Ed S.

draw up5 draw high minus up5

lis
37 posts
msg #161105
Ignore lis
modified
5/26/2024 11:34:45 PM

Thanks, nibor100. A 'duh' moment for sure. ;)

How would I get a static value for the highest and lowest close in the last 100 day period?

nibor100
1,031 posts
msg #161106
Ignore nibor100
5/27/2024 12:27:57 PM

I believe SF processes filters in order, from oldest date until current date. therefore fixing a static value such as 100 day highest high would require it to happen on the firs day of the 100 day, as SF can't look into the future and it does not seem to have looping capability.

Ed S.

lis
37 posts
msg #161107
Ignore lis
5/27/2024 3:00:10 PM

I believe you're right, Ed. It makes sense that StockFetcher would be processing 'bars', as other software packages do. I don't know why I didn't see that right away! Thanks for the clarification.

StockFetcher Forums · General Discussion · Occurrences -- Count() Question<< >>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.