StockFetcher Forums · General Discussion · Days since previous high and previous low occurred<< >>Post Follow-up
njjstocks
8 posts
msg #161392
Ignore njjstocks
modified
10/9/2024 11:37:04 PM

Hi,

Would really appreciate some pointers on how to find the number of days since a previous event occurred. The event I’ll interested in are
- previous 52 week high
-previous 52 week low

Thanks!

wantonellis
161 posts
msg #161393
Ignore wantonellis
10/10/2024 8:57:23 AM

Fetcher[
market is nyse
set{days_since_nh, days(Price reached a new 52 week high,250)}
add column days_since_nh
set{days_since_nl, days(Price reached a new 52 week low,250)}
add column days_since_nl
]



https://www.stockfetcher.com/forums/Indicators/Days-Since-DAYS/34496

njjstocks
8 posts
msg #161394
Ignore njjstocks
10/13/2024 4:06:02 AM

Thanks wantonellis

snappyfrog
721 posts
msg #161395
Ignore snappyfrog
10/13/2024 9:15:39 PM

Some of these look right, but some don't when the 52 week high and low are drawn on the charts.

Fetcher[
market is nyse
set{days_since_nh, days(Price reached a new 52 week high,250)}
add column days_since_nh
set{days_since_nl, days(Price reached a new 52 week low,250)}
add column days_since_nl
draw high 52 week high
draw low 52 week low
]




xarlor
580 posts
msg #161397
Ignore xarlor
10/14/2024 10:59:49 AM

DAYS has a 250-day limit. It will show up to 249, but 250 and above will display as -1.

In this example, if the 52-week high/low happened more than 249 days ago, you get a -1.


snappyfrog
721 posts
msg #161400
Ignore snappyfrog
10/14/2024 6:07:41 PM

Thanks xalor

StockFetcher Forums · General Discussion · Days since previous high and previous low occurred<< >>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.