| 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.
 
 
 
 
 
 
 
 
 
 | 
| 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. = )
 
 
 
 
 |