| glgene 618 posts
 msg #96850
 - Ignore glgene
 | 10/11/2010 11:22:13 PM 
 I looked at page 21 in the SF User Manual, and I can't find what I'm looking for with the 'near' indicator.
 
 Could someone show me the 1-line script that would result in showing only the stocks that closed near the day's high?  I'm talking about today's action.  Does 'near' always mean within 2% (as shown on page 21)?  That might be too rigid.  Maybe something within the top 1/3 of the day's range.  ???
 
 Thanks.
 
 
 | 
| four 5,087 posts
 msg #96851
 - Ignore four
 modified
 | 10/11/2010 11:53:30 PM 
 /*
 1. Find stocks where the close was in the top half of the trading range for the day:
 
 http://forums.stockfetcher.com/sfforums/?q=view&fid=1006&tid=85&qrid=&isiframe=
 
 */
 
 
 
 
 
 | 
| glgene 618 posts
 msg #96854
 - Ignore glgene
 | 10/12/2010 12:35:29 AM 
 four, I took your script and got these results (end-of-day 10-11-2010 run):
 
 0.50,1 --------------- 4,061 stocks
 
 0.33,1 -------------- 5,435 stocks
 
 0.67,1 -------------- 2,863 stocks
 
 0.90,1 -------------- 1,448 stocks
 
 0.98,1 ------------- 1,062 stocks
 
 First, what does the "1" mean in the script (sorry),
 
 Second, if 0.98,1 means these 1,062 stocks finished within the top 2% of their day's range, 1,062 matches seems hard to believe.  Today was not a barnburner day!
 
 Help me.  Thanks
 
 
 | 
| four 5,087 posts
 msg #96855
 - Ignore four
 modified
 | 10/12/2010 12:54:27 AM 
 I would agree with your observation... '1' is just today.
 
 --
 
 Yes, most of the indexes where near flat.
 
 --
 
 
 | 
| glgene 618 posts
 msg #96856
 - Ignore glgene
 | 10/12/2010 1:04:50 AM 
 four,
 First, thanks for the SF link.  It says, in part, "The Day Position is a basic measure that computes a value which is a percentage of the day range. In otherwords, if the position parameter is 0.5, the Day Position will be Low + ((High - Low) * 0.5). Any value from 0 to 1 may be used to locate a position within the daily range.
 
 But when I ran the following script, shown below,  look at the Day Positions of these stocks (end-of-day run on 10-11-2010):
 
 
 
 
 SPY  0.99
 
 BAC  2.35
 
 MGM  6.09
 
 INTC  1.46
 
 I thought the range was anywhere from 0 to 1.    ???   Maybe the Add Column line, as written, is wrong.  Any idea?
 
 
 | 
| four 5,087 posts
 msg #96857
 - Ignore four
 modified
 | 10/12/2010 1:27:30 AM 
 INTC = 19.53 + ((19.75 - 19.53) * .5) = 19.64
 
 
 
 
 
 | 
| glgene 618 posts
 msg #96858
 - Ignore glgene
 | 10/12/2010 1:42:19 AM 
 I'm not looking for the closing price of INTC.  I want to know how far up the day's price range the stock finished (example, did it finish in the upper 30% of the range?).
 
 
 
 
 | 
| four 5,087 posts
 msg #96862
 - Ignore four
 modified
 | 10/12/2010 1:39:30 PM 
 when cnt = 1 then close was in the top half of the trading range for the day
 
 
 
 
 
 
 
 
 | 
| glgene 618 posts
 msg #96867
 - Ignore glgene
 | 10/12/2010 4:58:21 PM 
 four,
 We're getting there!   But the Add Column figure is still showing the closing price.   Can it show where it finished the day (that is, at what % level of the day's trading range)?
 
 
 | 
| glgene 618 posts
 msg #96878
 - Ignore glgene
 | 10/12/2010 11:37:19 PM 
 OK, try this.  Round-a-bout way (might be a little clunky) to show a day's end position within the price range for the day.  From 0 to 1 (higher is better)
 
 In the script, I'm including the past 5 days of position end.
 
 One problem, though (I think).  Check this run end-of-day 10-12-2010.  Both GLD and EEM had negative returns for the day, but the day-end POS looks favorable at 0.71 and 0.83, respectively.  Again, 1.00 is highest possible. Could this be a bug in my scripting for a stock that loses on a given day?  I'm pretty sure the numbers are correct for positive days.
 
 I added RSI and CMF columns to help examine a stock.
 
 Look forward to any constructive comments, incl. comment on the above (re: stocks with losses that day).
 
 
 
 
 
 |