StockFetcher Forums · Filter Exchange · Help with coding up a 'local minimum' of a value in SF<< >>Post Follow-up
sbuck143
88 posts
msg #91137
Ignore sbuck143
modified
4/13/2010 1:41:02 PM

I am trying to code up a filter in SF that will produce a buy signal when a stocks ADX value is up 20% off of the lowest ADX value within the last 30 days. There are other components too like making sure ADX is not above a certain value, etc, but I've got no problems with that part of the code.


This involves calculating the minimum value of the ADX over the last 30 days. Is there a filter phrase / indicator measure I am missing here, or is this even possible?

I can longhand algorithm it but will need to cut the number of days compared down significantly. Seems like there should be a quicker way to do this with something that says (in stockfetcher-ese)

lowest value of ADX(14) within last 30 days


Thanks for your help guys...

Scott

EDIT: Okay duh......my brain kicked in and realized the "Reached a new" phrase solves half of this problem. Now I need a way to quantify what that value is.


Fetcher[
show stocks where

and price is above 10

and ADX(14) reached a new 30 day low within the last 10 days

/* add missing line here to look for 20% increase off of 30 day low*/

add col ADX(30)
]






sbuck143
88 posts
msg #91139
Ignore sbuck143
modified
4/13/2010 2:13:05 PM

FYI i tried setting 30 day low of ADX(14) as a variable but it didn't take.


set{minADX, 30 day low of ADX(14)} didn't seem to affect anything. Adding it as a column to the filter it shows to be whatever ADX is, and not its 30 day min.

sbuck143
88 posts
msg #91141
Ignore sbuck143
4/13/2010 2:25:36 PM

well this was a fun conversation with myself :)


Figured it out.....the magic phrase is thus:



"and ADX(14) is more than 25 percent above the 30 day low"


and while you can draw the 30 day low on the graph, it appears to be impossible to extract that actual number. Unless a kind chetron, TRO, or four would shed some light?





sbuck143
88 posts
msg #91144
Ignore sbuck143
4/13/2010 4:58:05 PM

Success!


the proper verbage for the set variable is as follows:

set{minadx, ADX(14) 30 day low}


setting as

set{minadx, 30 day low of ADX(14)} was NOT acceptable to stockfetcher.




chetron
2,817 posts
msg #91146
Ignore chetron
4/13/2010 5:52:04 PM

GOOD JOB. = )



StockFetcher Forums · Filter Exchange · Help with coding up a 'local minimum' of a value in SF<< >>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.