StockFetcher Forums · General Discussion · the number of days to search for since the FIRST time an event occurred<< >>Post Follow-up
alexan
41 posts
msg #126288
Ignore alexan
11/22/2015 2:16:08 PM

For this filter:

------------------------------------------------------------------
set { g1 , 1.3 * ma(30) }
set { d1, days( close crossed above g1 , 100 ) }
add column d1
draw g1 on plot close
price more than 30% above ma(30)
market cap above 200
-----------------------------------------------------------------------


On Nov 20, 2015 for shares “ANFI” it shows d1=1 because the most recent day when price crossed 30% above ma(30) was just one day ago.

However as seen in the chart, the “first time” that price crossed above was 9/29/2015

How can I modify this filter so d1 shows the number of days since the first time this event happened.


four
5,087 posts
msg #126289
Ignore four
modified
11/22/2015 3:20:42 PM

" However as seen in the chart, the “first time” that price crossed above was 9/29/2015 "
----

Command: DAYS

"The "days" feature allows you to specify the event and a period of time; it returns the number of days since the event most recently occurred. "

In your example, the most recent is Nov2015 and then Sep2015. It is possible the event also occurred in Jun2010 and again in Dec1999. There is no way of knowing in StockFetcher the "first time"--only the most recent.

-- You may find this article of interest: Moving-Average Envelopes and Keltner Channels
http://www.investopedia.com/articles/trading/08/moving-average-envelope.asp

alexan
41 posts
msg #126290
Ignore alexan
11/22/2015 3:49:58 PM

true.

but in the line: set { d1, days( close crossed above g1 , 100 ) }

It clearly shows within last 100 days only.

not 2013, 2014 or before that


four
5,087 posts
msg #126291
Ignore four
11/22/2015 4:03:42 PM

OK

It is looking at 100 days.
It is looking for the Most Recent Occurrence in 100 days.

alexan
41 posts
msg #126292
Ignore alexan
11/22/2015 6:10:28 PM

the question is:

How to modify this filter so d1 shows the number of days """since the first time""" this event happened.

four
5,087 posts
msg #126293
Ignore four
modified
11/22/2015 8:17:54 PM

Try this as a model... first time in 6 days "event" occurred AND never occurred in days 1 - 5.



StockFetcher Forums · General Discussion · the number of days to search for since the FIRST time an event 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.