Senin, 19 Februari 2018

[smf_addin] Digest Number 4306

15 Messages

Digest #4306
1a
Excel 2016 by jaroldm70
1b
Re: Excel 2016 by jaroldm70
1c
Re: Excel 2016 by "Randy Harmelink" rharmelink
1d
Re: Excel 2016 by jaroldm70
2a
2b
2d
3a
excel sheet by ethanbond911
3b
Re: excel sheet by "Randy Harmelink" rharmelink
4a
Gurufocus Dividend History by "Jose Jacob" pepecan47
4b
Re: Gurufocus Dividend History by "Randy Harmelink" rharmelink
6a
SMF Add-In by iggyman555
6b
Re: SMF Add-In by "Randy Harmelink" rharmelink

Messages

Fri Feb 16, 2018 8:22 am (PST) . Posted by:

jaroldm70

Randy - I've been a dedicated follower for years and am indebted to you for your fine work product. I also have never made a request.....
but since I've adopted Excel 2016 an new annoyance has come to light. Everytime I update a table requiring a call to the internet there is the usual delay, but also Excel's screen goes bonkers! The screen goes white, blank or otherwise scrambles. Thankfully, it returns to normal when the routine is finished.

I've looked everywhere for a remedy, so now I come to the Master.

Is there a way you can easily add a call that turns the screen off before routines that take a while to run?

Thanks so much. I can only imagine how much work and effort, let alone love, you have put into this SMF project.

Jerry R


Fri Feb 16, 2018 8:26 am (PST) . Posted by:

jaroldm70

No problems at all. Works as in earlier versions of Excel

Fri Feb 16, 2018 9:25 am (PST) . Posted by:

"Randy Harmelink" rharmelink

I think that is EXCEL's way of indicating it is "Not responding". That is,
busy.

You can try enabling asynchronous add-in calls. That's an option on the
context menu (right mouse click in a worksheet cell).

On Fri, Feb 16, 2018 at 9:22 AM, jaroldm70@
​...
wrote:

>
> Randy - I've been a dedicated follower for years and am indebted to you
> for your fine work product. I also have never made a request....
> but since I've adopted Excel 2016 an new annoyance has come to light.
> Everytime I update a table requiring a call to the internet there is the
> usual delay, but also Excel's screen goes bonkers! The screen goes white,
> blank or otherwise scrambles. Thankfully, it returns to normal when the
> routine is finished.
>
> I've looked everywhere for a remedy, so now I come to the Master.
>
> Is there a way you can easily add a call that turns the screen off before
> routines that take a while to run?
>
> Thanks so much. I can only imagine how much work and effort, let alone
> love, you have put into this SMF project.
>
>

Fri Feb 16, 2018 2:04 pm (PST) . Posted by:

jaroldm70

You are correct about Excel being busy and your suggestion seems to have eliminated the visual fireworks and even appears to have narrowed the processing delay. Appreciate the quick response, too.

Thanks Randy.

Fri Feb 16, 2018 9:06 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Which application you use as a browser is irrelevant.

EXCEL and the add-in use the same engine to access the Internet that the IE
browser does, because Windows, IE, and EXCEL are all Microsoft products.
That means EXCEL, the add-in, and IE all share the same cookies and
Temporary Internet Files. So whatever Internet Options are set up on your
SYSTEM, from the Windows Control Panel, is what they all use. That means
that if IE is set up to use cached web pages within the Temporary Internet
Files folder, that setting will extend to EXCEL and the add-in.

The add-in also does its own caching. It has 1000 slots to store web pages.
If a web page is requested, the add-in will check those slots to see if the
web page has already been retrieved. If so, it uses it. If not, it requests
that page from the system. That request may be resolved with a web page
from the Temporary Internet Files folder, or from the Internet. Then it
would be saved into slot. BUT -- the add-in extracts the data from that
saved copy of the web page. So if you hit F9 to recalculate, the only thing
that would happen is that the data is extracted from the same SAVED copy of
the web page. So there should be no values changing in the workbook.

The smfForceRecalculation macro empties those 1000 slots of saved web
pages, forcing the add-in to request replacements.

On Fri, Feb 16, 2018 at 8:38 AM, earladamy@
​...
wrote:

>
> > Prior to the close, field #16 in both functions should have a time
> component. Do they both correspond to real time, or show a delay?
>
> I've been running it with Y this morning and the long date number for SPY
> is increasing along with changes in price so I'm not seeing the issue right
> now.
>
> > You do have your Internet Options set to always get a fresh copy of the
> web page, right? Otherwise, you may get cached copies of web pages.
>
> Chrome is my primary browser. I've had cache issues from time to time and
> I've never been able to find a setting which ignores or disables web page
> caching. Chrome caching has, at times, caused issues while performing
> maintenance on my Wordpress website although not recently. I've even tried
> various add-ins to automatically clear the Chroome cache but none have
> proven satisfactory.
>
> That said, all of this processing is taking place entirely within Excel 10
> VBA; however your comment appears to suggest that smfGetYahooPortfolioView
> is somehow sharing code or workspace with the browser workspace? I am
> frankly out of my comfort zone on this. I do have both FireFox and Edge
> installed. I took a look in Edge and did not see any settings to request a
> fresh copy of the web page nor do I see anything in W10 which would control
> this.
>
> I have been using this Model for several years and this
>
> > Are you running the smfForceRecalculation before having VBA run the
> functions? If not, the add-in may just be extracting data from a copy of a
> previously retrieved web page.
>
> My application is structed in layers to provide access to multiple quote
> streams:
>
> > Model >> call/ref >> QuoteServer.xlam >> call/ref >> RCH_SMF.xla(smfGYPV)
>
> The only time a request reaches SMF is at the beginning of a Model run
> when the Model requests fresh RT quotes for the symbols which will be used
> in the run. Both QuoteServer and SMF go out of scope when the RT quotes are
> returned. I know for a fact that there are no active variables or arrays
> left in QuoteServer and I see no reason why the same would not hold true
> for RCH_SMF.
>
> Model has no active/dynamic worksheets. Parameters are collected from
> passive worksheets, all calculations are performed in arrays, and the
> arrays are then formatted and output to static worksheets. So there is
> nothing for smfForceRecalculation to do and it could potentially introduce
> some unwanted wildcards into the situation.
>
>
>

Fri Feb 16, 2018 9:19 am (PST) . Posted by:

"Randy Harmelink" rharmelink

1518794956 = 2018-02-16 15:29:16
1518794185 = 2018-02-16 15:16:25

....so they are about 13 minutes apart. Note that those are UNIX values, so
they are based on GMT.

On Fri, Feb 16, 2018 at 9:01 AM, earladamy@
​...
wrote:

>
> Something really weird is going on. I've been running the Model every 5-10
> minutes and the problem has not only re-appeared but gone backwards. This
> is actual sequence of requests for SPY spaced 5-10 minutes apart. The long
> number is the date/time code returned by smfGetYahooPortfolioView
>
> 1518794185 273.02
> 1518794956 273.4575
> 1518794956 273.4575
> 1518794956 273.4575
> 1518794185 273.02
>
> In viewing other quotes returned in the same batch, I see numbers ending
> 4185 and below.
>
>
>

Fri Feb 16, 2018 11:16 am (PST) . Posted by:

eadamy

> Public aData(1 To kPages, 1 To 2) As String


I do not understand how aData can retain its contents when the whole RCH_SMF project loses scope. I would like to understand that because I have had the need for retained global variables in child processes but never gotten it to work..

That said, I implemented a call to smfForceRecalculation. While that appeared to resolve the problem of getting stale prices, the Application.CalculateFullRebuild statement causes havoc within my application and it appears to introduce what appears to be an unnecessary complication. If the intent is to clear aData, the loop which precedes it does that job. I am forced to comment out the If/else which includes the CalculateFull/CalculateFullRebuild.


If this is deemed to be essential for some applications, might I suggest providing two versions: one which simply clears the array and a second which clears the array and forces the recalc? This would avoid the need for some of us to make changes to the RCH_SMF code.


Earl

Fri Feb 16, 2018 12:36 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

I'm not sure what you mean by "loses scope". The VBA project will exist
once the add-in is opened, until the add-in is closed.

To me, it makes no sense to clear the array and not do a recalculation. The
whole point of clearing the array is so that the add-in functions WILL grab
new data. They can't do that until they are recalculated.

Rather than modify the add-in code, why not just have a modified version of
that module in your own VBA project?

On Fri, Feb 16, 2018 at 11:47 AM, earladamy@
​...
wrote:

>
> > Public aData(1 To kPages, 1 To 2) As String
>
> I do not understand how aData can retain its contents when the whole
> RCH_SMF project loses scope. I would like to understand that because I have
> had the need for retained global variables in child processes but never
> gotten it to work..
>
> That said, I implemented a call to smfForceRecalculation. While that
> appeared to resolve the problem of getting stale prices, the Application.CalculateFullRebuild
> statement causes havoc within my application and it appears to introduce
> what appears to be an unnecessary complication. If the intent is to clear
> aData, the loop which precedes it does that job. I am forced to comment out
> the If/else which includes the CalculateFull/CalculateFullRebuild.
>
> If this is deemed to be essential for some applications, might I suggest
> providing two versions: one which simply clears the array and a second
> which clears the array and forces the recalc? This would avoid the need for
> some of us to make changes to the RCH_SMF code.
>
>

Fri Feb 16, 2018 2:51 pm (PST) . Posted by:

ethanbond911

hello ladies and germs:
I have a request. I am a newbie to excel and I have this one sheet that I would like to copy and paste formulas from 1 to the end of the sheet and from A to CR some columns I cant see the formula. its pretty complex for someone like me. perhaps any expert can help me with it?
what will you get? an excel sheet that's awesome in predicting how Dow industrial, DIA and /ym moves everyday. yes this sheet predicts how stocks move. any volunteers?
Regards
Ethan

Mon Feb 19, 2018 10:23 am (PST) . Posted by:

"Randy Harmelink" rharmelink

The easiest way might be to simply copy the whole worksheet...

On Fri, Feb 16, 2018 at 3:51 PM, ethanbond911@
​...
wrote:

> I have a request. I am a newbie to
> excel and I have this one sheet that I would like to copy and paste
> formulas from 1 to the end of the sheet and from A to CR some columns I
> cant see the formula. its pretty complex for someone like me. perhaps any
> expert can help me with it?
>
> what will you get? an excel sheet that's awesome in predicting how Dow
> industrial, DIA and /ym moves everyday. yes this sheet predicts how stocks
> move. any volunteers?
>
>
>

Sat Feb 17, 2018 10:13 am (PST) . Posted by:

"Jose Jacob" pepecan47

To get the Dividend History I am using
 =RCHGetHTMLTable("https://www.gurufocus.com/dividend/"&$A$1,">Ex-Date")
For example, for MCD, I get The first Dividend Amount "1.01"
But if I use =smfGetTagContent("https://www.gurufocus.com/dividend/"&$A$1,"td",1,">Ex-Date";,"<tr")
to get the first Dividend Amount, I get "$1.01"
The web page shows "$1.01"
Why is this different? One case with the $ sign, and the other without?

Regards, Jose L. Jacob

Sat Feb 17, 2018 1:44 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

That's because the RCHGetHTMLTable() processing for every cell strips out
HTML code and attempts to convert the remaining string to numeric. If a
numeric conversion fails, it returns the string it tried to convert.

But smfGetTagContent() returns the entire content of the HTML tag as a
string value, including any HTML markup there might have been, unless you
tell it to do the special processing to strip out the HTML code and attempt
the numeric conversion (note the additional parameter):

=smfGetTagContent("https://www.gurufocus.com/dividend/
"&$A$1,"td",1,">Ex-Date","<tr",,,1)

There are two functions that do that special processing -- smfStripHTML()
and smfConvertData().

On Sat, Feb 17, 2018 at 11:13 AM, Jose Jacob pepecan47@
​...
wrote:

>
> To get the Dividend History I am using
>
> =RCHGetHTMLTable("https://www.gurufocus.com/dividend/"&$A$1,">Ex-Date")
>
> For example, for MCD, I get The first Dividend Amount "1.01"
>
> But if I use
> =
> ​​
> smfGetTagContent("https://www.gurufocus.com/dividend/"&$
> A$1,"td",1,">Ex-Date";,"<tr")
>
> to get the first Dividend Amount, I get "$1.01"
>
> The web page shows "$1.01"
>
> Why is this different? One case with the $ sign, and the other without?
>
>

Sun Feb 18, 2018 12:41 pm (PST) . Posted by:

lewglenn

Randy,
I thought I had submitted this topic earlier, but I guess not.

The attached file contains a simple vba code that uses smfGetYahooHistory to download the date and adjusted close for TLT from inception and place the results on the spreadsheet ReadTest in columns "A" and "B". Next, it does the same for SPY (for the same date period) and places the results in columns "C" and "D".

All's well until row 3886, at which point the date for TLT is 1/2/2018 and for SPY is 1/1/2018. Am extra row appears to have been inserted for SPY, with the adjusted close data repeated from the previous row (3885). Note that the Yahoo website does not display any historical data for SPY on 1/1/2018. The same thing happens again on row 3896, where SPY data are inserted for 1/15/2018; again, there are not SPY data for this date on the Yahoo website.

Can you think of how this might have occurred? I see it happening in other instances as well (with other ETFs).

Mon Feb 19, 2018 5:33 pm (PST) . Posted by:

iggyman555

Hello,

I came across this site from a model i found online.https://webcache.googleusercontent.com/search?q=cache:pGoGgV7u40kJ:https://indiainvestor.files.wordpress.com/2007/10/fwallstreet_model-modified-for-sp500-2003-version-10.doc+&cd=2&hl=en&ct=clnk&gl=us

it says i need to download the SMF Add-in so i found this site. but under Files i do not see the add in.
2 questions:
1)where is the add in
2)is there a user guide how to pull data from morningstar? (i have the free library subscription)

thanks!


Mon Feb 19, 2018 5:48 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The add-in, documentation, templates, and most files have been moved to:

http://ogres-crypt.com/SMF/

I don't think a free library subscription to Morningstar will help you pull
any data. That (is/was?) all on paper or through their computers using
their credentials. But it's been well over a decade since I've used the
library version.

You can check out the Morningstar links on the "Tips and FAQS" page of the
website, and there are a few templates. However, Morningstar as a data
source is on the way out. As of this month, they went live with their
system that's been in beta mode for over a year. It has all the data behind
an API that requires credentials. The data can still be accessed by using
the IE object as a web browser, but with their new setup, it takes about 28
seconds to render a web page for a single company -- even with flatout
browsers like Chrome, Firefox, and Edge. I suspect a major change will be
forthcoming, to fix the situation. I can't imagine many users will be happy
with such a long wait to get a web page displayed.

The CSV files (mentioned in the "Tips and FAQs") and many other earlier web
pages are still available and still being updated, but I don't know for how
long.

On Mon, Feb 19, 2018 at 6:28 PM, iggy555@
​...
wrote:

>
> I came across this site from a model i found online.https://webcache.
> googleusercontent.com/search?q=cache:pGoGgV7u40kJ:https://
> indiainvestor.files.wordpress.com/2007/10/fwallstreet_model-
> modified-for-sp500-2003-version-10.doc+&cd=2&hl=en&ct=clnk&gl=us
>
> it says i need to download the SMF Add-in so i found this site. but under
> Files i do not see the add in.
> 2 questions:
> 1)where is the add in
> 2)is there a user guide how to pull data from morningstar? (i have the
> free library subscription)
>
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar