Selasa, 16 Agustus 2016

[smf_addin] Digest Number 3773

10 Messages

Digest #3773

Messages

Mon Aug 15, 2016 8:55 am (PDT) . Posted by:

msimmsx

Thanks Randy. I am calling this from MS Access....so I think I just need to allocate a Variant Array with the proper dimensions, correct ?

Mon Aug 15, 2016 10:49 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

For RCHGetHTMLTable()? Sounds right. You'll also need to use the pDim1 and
pDim2 parameters of the function to specify the proper dimension if you're
using it in VBA.

On Mon, Aug 15, 2016 at 8:55 AM, marksimms@verizon.net [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Thanks Randy. I am calling this from MS Access....so I think I just need
> to allocate a Variant Array with the proper dimensions, correct ?
>

Mon Aug 15, 2016 9:12 am (PDT) . Posted by:

"D. Scott MacKenzie" kb0fhp

Could these Yahoo issues be related to the current problems with the Ad-in not working with Excel or grabbing the data?

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com]
Sent: Sunday, August 14, 2016 8:44 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Re: Occasional Incomplete Yahoo Data

I tried the RCHGetYahooHistory() function on each, but I only gathered a few rows of data, and didn't really look at it. I was just trying to confirm whether or not data was being retrieved. I misunderstood your first message when you said data wasn't coming through...

So, definitely a Yahoo problem.

On Sun, Aug 14, 2016 at 5:23 PM, sonofhercules@yahoo.com <mailto:sonofhercules@yahoo.com> [smf_addin] <smf_addin@yahoogroups.com <mailto:smf_addin@yahoogroups.com> > wrote:

Interesting; I just used successfully the Yahoo "Download Data" option on AVGO, but when I opened the CSV file, only data up to Thursday, August 11th is in the file, even though the web page visually shows data up to and including August 12th.

The situation is the same with CHTR, NXPI, TRIP, TSLA, and VRSK.

May I ask: Are you saying your RCH function worked fine, or that the Yahoo Download Data CSV function worked fine?

Acknowledged that, as with all things free, hopefully this is just a temporary Yahoo glitch! :-)

Mon Aug 15, 2016 10:50 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Nope. Because the error exists on Yahoo, not in EXCEL or the add-in. The
add-in can only gather data that Yahoo provides.

On Mon, Aug 15, 2016 at 9:12 AM, 'D. Scott MacKenzie' kb0fhp@
​...​
wrote:

>
> Could these Yahoo issues be related to the current problems with the Ad-in
> not working with Excel or grabbing the data?
>

Mon Aug 15, 2016 7:17 pm (PDT) . Posted by:

sonofhercules

The Friday data has finally arrived! :-)

Mon Aug 15, 2016 3:09 pm (PDT) . Posted by:

eadamy

First, Randy, thank you for such an incredibly useful set of tools!


I just updated my SMF from 2012 to the most recent version. I am now encountering an error with the following call:


' Get the realtime trading date returned as a string date "12/31/14"
arrvarYRTFund1 = RCHGetYahooQuotes(pTickers:="SPY", _
pItems:="d1", _
pServerID:="", _
pRefresh:=0, _
pHeader:=0, _
pDim1:=1, _

pDim2:=1)


The old version returned just the date: "8/15/16". The new version returns a string which includes both the symbol and the date: ""SPY","8/15/16"" which I would expect if pItems was set to "Sd1". Is this the expected behavior? If so, I will change my code to deal with it.


I note that a) Yahoo Groups is now incredibly slow and b) an SMF group has been setup on Google; however it does not appear to be very active. Is SMF group home transitioning?


Earl Adamy

Mon Aug 15, 2016 3:51 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Sorry about that. That's from a change I made back in 2014, because people
wanted "placeholders" for tickers missing in a range. I added a dummy
ticker symbol up front to account for those empty ticker cells.

You ran into the problem because pDim2 is set to 1, when you need to have 2
columns of data returning. Instead of it dropping the first of two columns,
it returns the first column, because you only told it to keep 1 column.

Instead of returning an array, why not just return a single data item, with
either:

x1 = RCHGetYahooQuotes(pTickers:="SPY", _
pItems:="d1", _
pServerID:="", _
pRefresh:=0, _
pHeader:=0, _
pDim1:=1, _
pDim2:=2)(1, 1)

X2 = RCHGetYahooQuotes("SPY", "d1")(1, 1)

All you really need to pass is the pTickers and pItems string, as all the
others will default appropriately.

I actually added the Google Groups discussion board over two years ago.
Some people were having trouble becoming members of the Yahoo group. So,
not a transition. Just an alternative.

On Mon, Aug 15, 2016 at 3:09 PM, earladamy@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

> First, Randy, thank you for such an incredibly useful set of tools!
>
> I just updated my SMF from 2012 to the most recent version. I am now
> encountering an error with the following call:
>
> ' Get the realtime trading date returned as a string date "12/31/14"
>
> arrvarYRTFund1 = RCHGetYahooQuotes(pTickers:="SPY", _
>
> pItems:="d1", _
>
> pServerID:="", _
>
> pRefresh:=0, _
>
> pHeader:=0, _
>
> pDim1:=1, _
>
> pDim2:=1)
>
> The old version returned just the date: "8/15/16". The new version returns
> a string which includes both the symbol and the date: ""SPY","8/15/16""
> which I would expect if pItems was set to "Sd1". Is this the expected
> behavior? If so, I will change my code to deal with it.
>
> I note that a) Yahoo Groups is now incredibly slow and b) an SMF group has
> been setup on Google; however it does not appear to be very active. Is SMF
> group home transitioning?
>
>

Mon Aug 15, 2016 5:03 pm (PDT) . Posted by:

eadamy

Thanks for the fix on RCHGetYahooQuotes. It works with final line "pDim2:=2)" but not "pDim2:=2)(1, 1)". I looked back at the function def but only parm following pDim2 is for a delimiter so I don't know what the (1,1) is. Anyway that is working so not important.

I'm finding that the new version is causing a lot of problems for a very complex piece of software so I'm about ready to go back to the old. Before I do, can you tell me if you made any changes to RCHGetYahooHistory? I use the sub which follows heavily to retrieve two columns of data for each specified FundTicker: Date and Adjusted Close. The number of rows required to accommodate the start and end dates has already been determined by the software. If the fix is simple, I can make it but otherwise I'm going to have to rollback to the earlier version.


Sub sLoadYahooHistory(arrVarYHist, ByRef FundTicker As String, ByRef Rows As Integer)
' ---------------------------------------------------------- '
' Gets daily historical data from Yahoo
' ---------------------------------------------------------- '
arrVarYHist = RCHGetYahooHistory(pTicker:=FundTicker, _
pStartYear:=Year(arrPresetInfo(cxPresetDatasetBegin, 1)), _
pStartMonth:=Month(arrPresetInfo(cxPresetDatasetBegin, 1)), _
pStartDay:=Day(arrPresetInfo(cxPresetDatasetBegin, 1)), _
pEndYear:=Year(Date), _
pEndMonth:=Month(Date), _
pEndDay:=Day(Date), _
pPeriod:="d", _
pItems:="DA", _
pNames:=0, _
pAdjust:=1, _
pResort:=1, _
pDim1:=Rows, _
pDim2:=2)
End Sub


Thank you.


Earl Adamy



Mon Aug 15, 2016 5:12 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

No changes to RCHGetYahooHistory().

If the (1,1) didn't work, you probably have the variable DIMed as an array?
The (1,1) just says to use the data in the first row and first column of
the returned array. But it would be a single value, not an array.

On Mon, Aug 15, 2016 at 5:03 PM, earladamy@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Thanks for the fix on RCHGetYahooQuotes. It works with final line "pDim2:=2)"
> but not "pDim2:=2)(1, 1)". I looked back at the function def but only
> parm following pDim2 is for a delimiter so I don't know what the (1,1) is.
> Anyway that is working so not important.
>
> I'm finding that the new version is causing a lot of problems for a very
> complex piece of software so I'm about ready to go back to the old. Before
> I do, can you tell me if you made any changes to RCHGetYahooHistory? I use
> the sub which follows heavily to retrieve two columns of data for each
> specified FundTicker: Date and Adjusted Close. The number of rows required
> to accommodate the start and end dates has already been determined by the
> software. If the fix is simple, I can make it but otherwise I'm going to
> have to rollback to the earlier version.
>
> Sub sLoadYahooHistory(arrVarYHist, ByRef FundTicker As String, ByRef Rows
> As Integer)
> ' ----------------------------------------------------------
> '
> ' Gets daily historical data from Yahoo
> ' ----------------------------------------------------------
> '
> arrVarYHist = RCHGetYahooHistory(pTicker:=FundTicker, _
> pStartYear:=Year(arrPresetInfo(cxPresetDatasetBegin,
> 1)), _
> pStartMonth:=Month(arrPresetInfo(cxPresetDatasetBegin,
> 1)), _
> pStartDay:=Day(arrPresetInfo(cxPresetDatasetBegin,
> 1)), _
> pEndYear:=Year(Date), _
> pEndMonth:=Month(Date), _
> pEndDay:=Day(Date), _
> pPeriod:="d", _
> pItems:="DA", _
> pNames:=0, _
> pAdjust:=1, _
> pResort:=1, _
> pDim1:=Rows, _
> pDim2:=2)
> End Sub
>
>
>

Mon Aug 15, 2016 3:41 pm (PDT) . Posted by:

eadamy

I just updated my RCH_Stock_Market_Functions from an older version from 2012.


First, thank you for these functions which have been incredibly useful!


I note a change in behavior in this code:


' Get the realtime trading date returned as a string date "12/31/14"
arrvarYRTFund1 = RCHGetYahooQuotes(pTickers:="SPY", _
pItems:="d1", _
pServerID:="", _
pRefresh:=0, _
pHeader:=0, _
pDim1:=1, _

pDim2:=1)


The old version returned just the date: "8/15/2016&quot;. The new version returns ""SPY","8/15/2016"". Under the documentation it would appear that it is acting as if pItems:="Sd1". Is this change in behavior intended? If so, I can deal with it, just want to confirm.


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

Tidak ada komentar:

Posting Komentar