Jumat, 11 Agustus 2017

[smf_addin] Digest Number 4118

3 Messages

Digest #4118

Messages

Fri Aug 11, 2017 1:21 pm (PDT) . Posted by:

lapub1

Hi Randy,


I am trying to define a new element and SMF returns "undefined" as a result.


I saved the below element in the SMF add in folder under smf-elements-20.txt


722;YhooHistoricalQuote;prev 30 day low;=smfpricesbetween(https://finance.yahoo.com/quote/"~~~~~"/history?p="~~~~~",TODAY()-30,TODAY(),"06")



I also tried 722;YhooHistoricalQuote;prev 30 day low;=smfpricesbetween("~~~~~",TODAY()-30,TODAY(),"06")


both formulas return undefined.


Regards,
Elliot.








Fri Aug 11, 2017 2:50 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Your second definition is what you want:

722;YhooHistoricalQuote;prev 30 day
low;=smfpricesbetween("~~~~~",TODAY()-30,TODAY(),"06")

However, the definitions are typically only loaded once, the first time an
element number is used. So if you add or change a definition, you need to
have the add-in reload the definitions. That can be done either by using
the smfForceRecalculation macro, or by exiting and restarting EXCEL.

Actually, the smfForceRecalculation macro was originally created so I could
easily test changes in element definitions...

Typically, I would recommend using element numbers above 19000 for your
custom element definitions. Otherwise, if I use #722 for something, that
definition would not be available to you if you are redefining it. I don't
plan to use anything above 19000 for "standard"; element definitions.

On Fri, Aug 11, 2017 at 1:21 PM, lapub1@
​...
wrote:

> I am trying to define a new element and SMF returns "undefined" as a
> result.
>
> I saved the below element in the SMF add in folder
> under smf-elements-20.txt
>
> 722;YhooHistoricalQuote;prev 30 day low;=smfpricesbetween(https://
> finance.yahoo.com/quote/"~~~~~"/history?p="~~~~~",TODAY()-30,TODAY(),"06")
>
> I also tried 722;YhooHistoricalQuote;prev 30 day
> low;=smfpricesbetween("~~~~~",TODAY()-30,TODAY(),"06")
>
> both formulas return undefined.
>
>
>

Fri Aug 11, 2017 7:04 pm (PDT) . Posted by:

sushiwaitress

Could Yahoo have broken something again since the 7-12 beta was released?

Here's the problem I'm having:

This formula is supposed to display the previous day's closing price, but is returning Error instead:
=IF(G2,RCHGetTableCell("http://finance.yahoo.com/q?s="&A2,1,">Prev Close"),"")

A2 is a cell that contains a ticker symbol (e.g. "TTS")
G2 is a cell that fetches the ticker's current value (e.g. "15.20")

As long as my A2 cell is blank, the formula cell is also blank. But as soon as I enter a ticker symbol in A2, the function returns Error.

Could this have something to do with the way the yahoo finance historical data screens/URLs have changed this year?

Do I need to use a different URL in RCHGetTableCell?

Is there any other info I can provide that would help?

Best,
Ruth
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar