StockFetcher Forums · Announcements · Date Based References<< >>Post Follow-up
stockfetcher
963 posts
msg #112556
4/1/2013 11:12:14 AM

The new DATE([PERIOD],[INDICATOR]) function allows you to access past values of measures in new ways. In function, this feature works similar to the "days ago" phrase, as it modifies the desired measure; however, you can provide specific instructions on the actual offset of the days ago phrase.

The example below returns matches that are more than 10% above the opening price for the year.

Fetcher[close is more than 10% above DATE(YEARSTART,open)]



To find stocks that are below the RSI(10) from the start of the month:

Fetcher[RSI(10) is below DATE(MONTHSTART,RSI(10))]



Valid options for the "PERIOD" argument:


  • YEARSTART: Initial value of the indicator for the year

  • YEAREND: Last value of the indicator for the prior year

  • MONTHSTART: Initial value of the indicator for the month

  • MONTHEND: Final value of the indicator for the prior month

  • MONDAY - FRIDAY: Value from the specific day of the week

  • YYYYMMDD: Specfic date



Here are a couple more examples:

Fetcher[/* Plot the return based on the start of the year */
set{var1, DATE(YEARSTART,open)}
set{diff, close - var1}
and draw var1 on plot price
and draw diff
and plottype{diff,zerobar}
and close is above 3.00
and average volume(30) is above 250000
]



Fetcher[/* Plot the return based on the start of the month */
set{var1, DATE(MONTHSTART,open)}
set{diff, close - var1}
and draw var1 on plot price
and draw diff
and plottype{diff,zerobar}
and close is above 3.00
and average volume(30) is above 250000
]



Fetcher[/* Reference a specific date */
set{var1,DATE(20130211,close)}
draw var1 on plot price
and close is above 4.00
and average volume(30) is above 250000
]



Fetcher[/* Stocks more than 10% below last year close */
set{var1, DATE(YEAREND,close)}
draw var1 on plot price
and close is more than 10% below var1
and close is above 4.00
and average volume(30) is above 250000
]



Fetcher[/* Price last FRIDAY gained more than 10% */
set{change,close - open}
set{ratio, change / open}
set{pct, ratio * 100.0 }
set{var1, DATE(FRIDAY,pct)}
show stocks where var1 is above 10
and close is above 3.00
and average volume(30) is above 250000
]




Please let us know if you run into any issues with this new function, have any question about how it works, or would like to see any modifications.

StockFetcher Support


mahkoh
890 posts
msg #112563
Ignore mahkoh
modified
4/1/2013 4:13:54 PM

+1000 kudos to the SF crew!

Edit: that is if I can get this to work
Fetcher[
nasdaq 100

set{mh,date(monthend,high 21 day high)}
set{ml,date(monthend,low 21 day low)}
set{cl,date(monthend,close)}


set{mp1,cl + mh}
set{mp,mp1 + ml}
set{mpp,mp/3}

set{mr1x,mpp*2}
set{mr1,mr1x - ml}
set{ms1,mr1x - mh}

set{mrange,mh - ml}
set{mr2,mpp + mrange}
set{ms2,mpp - mrange}

set{m2r,mrange*2}
set{mr3,mpp + m2r}
set{ms3,mpp - m2r}

draw price line at mr2
draw price line at ms1
draw price line at ms2
draw price line at mr1
]



This should give me lines at monthly pivot lines. It does not however, although check syntax OK's everything.
Is there a way to code this?

stockfetcher
963 posts
msg #112566
4/1/2013 4:51:24 PM

If possible, can you provide an example where the numbers do not appear to match up with the syntax in your filter? For example, if you can supply a symbol and expected value, that would help us track where there may be any issues.

Thanks!

StockFetcher Support



mahkoh
890 posts
msg #112567
Ignore mahkoh
4/1/2013 4:57:52 PM

For some reason it didn't work when I made the changes in my original filter that I had to adjust for lookback days daily:

set{mh,high 21 day high 20 days ago}
set{ml,low 21 day low 20 days ago}
set{cl,close 20 days ago}

to

set{mh,date(monthend,high 21 day high)}
set{ml,date(monthend,low 21 day low)}
set{cl,date(monthend,close)}

but clicking my posted filter above works perfect. +1000 it is, thanks!

olbn
4 posts
msg #113880
Ignore olbn
6/3/2013 6:19:50 PM

Is it possible to add for Optionable stocks to analyze from the Option Expiration Month (Generally 3rd Friday of the Month)?

StockFetcher Forums · Announcements · Date Based References<< >>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 2016 - 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