StockFetcher Forums · General Discussion · SF question re; "near"<< 1 2 >>Post Follow-up
glgene
534 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
4,012 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=

*/

Fetcher[Close is above Day Position(0.50,1)]



glgene
534 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
4,012 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
534 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):

Fetcher[
symlist(spy,bac,mgm,intc)
add column Day Position
]



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
4,012 posts
msg #96857
Ignore four
modified
10/12/2010 1:27:30 AM

INTC = 19.53 + ((19.75 - 19.53) * .5) = 19.64

Fetcher[


SYMLIST(INTC)
add column Day Position(0.50,1)

]



glgene
534 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
4,012 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


Fetcher[
SYMLIST(INTC)
set{cnt, count(Close > day position(0.50,1),1)}
draw cnt
add column Day Position(0.50,1)


]





glgene
534 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
534 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).

Fetcher[
symlist(intc,vti,gld,eem)
add column separator
add column open
add column high
add column low
add column separator
set{d,1.00}
set{d1,high-low}
set{d2,high-close}
set{d3,d2/d1}
set{d4,d-d3}
add column d4{close pos 0 to 1}
add column d4 1 day ago{pos 1 d ago}
add column d4 2 days ago{pos 2 d}
add column d4 3 days ago{pos 3 d}
add column d4 4 days ago{pos 4 d}
add column d4 5 days ago{pos 5 d}
add column separator
add column rsi(14)
add column rsi(14) 1 day ago{rsi 1 d}
add column separator
add column cmf(15)
add column cmf(15) 1 day ago{cmf 1 d}
draw d4
draw average volume(50)
]



StockFetcher Forums · General Discussion · SF question re; "near"<< 1 2 >>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