billrider321 70 posts msg #78680 - Ignore billrider321 | 
9/5/2009 10:33:54 AM
  I am trying to do it in SF code and latter will try to put it in excel
 
 1.  set highosc = high -  ma(4)
      set lowosc  = low -ma(4)
 
    buysetup = ma(70)> ma(70) 1 day ago
 and close > MA(70)
 and lowosc < 0
 and lowosc > lowosc 1 day ago
 
 exit - 4 day or highosc crosses under o
 
 sellsetup = close         and ma(70) < Ma(70) 1 day ago
         and close < ma(70)
         and highosc > 0
         and highosc 
 
 symlist(qqqq,iwm,spy)
 
 
 thanks
 
   
 
  | 
Kevin_in_GA 4,599 posts msg #78701 - Ignore Kevin_in_GA | 
9/5/2009 4:46:43 PM
  You need to run this as two filters:
 
  	    
 
 Once you buy these stocks, then you would run the next filter to determine when to sell.
 
  	    
 
 
 Kevin
 
  | 
billrider321 70 posts msg #78710 - Ignore billrider321 | 
9/5/2009 9:41:26 PM
  thanks kevin.
 
 here is the modified one
 
 /*buysetup*/
 set{var11, low }
 set{var22, ma(4) }
 set{lowosc, var11 - var22}
 set{var1, low 1 day ago}
 set{var2, ma(4) 1 day ago}
 set{lowosc1dayago, var1 - var2}
 MA(70) is above MA(70) 1 day ago 
 and close is above MA(70) 
 and lowosc is below 0 
 and lowosc >  lowosc1dayago 
 and apply to symlist(qqqq,iwm,spy) 
 add column lowosc
 add column lowosc1dayago
 draw ma(4)
 
  | 
billrider321 70 posts msg #78718 - Ignore billrider321 | 
9/6/2009 9:46:55 AM
  this is close to final version, still need to work on getting set{var22, CMA(low,4) } this for 1 day ago condition
 for now i have used set{var2, CMA(low,5)}
 
 *buysetup*/
 set{var11, low }
 set{var22, CMA(low,4) }
 set{lowosc, var11 - var22}
 set{var1, low 1 day ago}
 set{var2, CMA(low,5)}
 set{lowosc1dayago, var1 - var2}
 MA(70) is above MA(70) 1 day ago 
 and close is above MA(70) 
 and lowosc is below 0 
 and lowosc >  lowosc1dayago 
 and apply to symlist(iwm) 
 and close >1
 and volume > 300000
 add column lowosc
 add column lowosc1dayago
 draw ma(4)
 
 
  | 
Eman93 4,750 posts msg #78728 - Ignore Eman93 | 
9/6/2009 2:47:47 PM
  billrider321
 - Ignore billrider321 9/5/2009 9:41:26 PM
 
 thanks kevin. 
 
 here is the modified one 
 
  	    
 
  | 
Eman93 4,750 posts msg #78729 - Ignore Eman93 | 
9/6/2009 2:48:32 PM
  billrider321
 - Ignore billrider321 9/6/2009 9:46:55 AM
 
 this is close to final version, still need to work on getting set{var22, CMA(low,4) } this for 1 day ago condition 
 for now i have used set{var2, CMA(low,5)} 
 
  	    
 
  |