Selasa, 28 Agustus 2012

[smf_addin] Digest Number 2328

12 New Messages

Digest #2328
2a
SMFforceRecalculation by "curls07" curls07
2b
Re: SMFforceRecalculation by "Randy Harmelink" rharmelink
2c
Re: SMFforceRecalculation by "curls07" curls07
2d
Re: SMFforceRecalculation by "Randy Harmelink" rharmelink
2e
Re: SMFforceRecalculation by "wongkayau" wongkayau
2f
Re: SMFforceRecalculation by "Randy Harmelink" rharmelink
2g
Re: SMFforceRecalculation by "wongkayau" wongkayau
3a
Re: How to retriev info by "Stefn Rai" rainerglobal@ymail.com
3b
Re: How to retriev info by "Randy Harmelink" rharmelink
4a
Re: smfforecrecalculation by "wongkayau" wongkayau

Messages

Mon Aug 27, 2012 9:14 am (PDT) . Posted by:

"cutthegrasssnow" cutthegrasssnow

Thanks for the quick response.

I'm sure you've thought of this already, but the code could specifically identify the 4 months that are quarter ends (or the 8 that are not). Probably not that simple.

Dan

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> Sigh. Not sure what to do there. Most of the code was written before the
> weeklies were available, so the code thinks you're trying to ask for a
> quarterly quote on a month that's not a quarter-end, so it errors out. At
> the time, I assumed any day of the month 30 or 31 would be quarterly
> options...
>
> On Sat, Aug 25, 2012 at 8:58 AM, cutthegrasssnow <dan@...>wrote:
>
> > I've been using smfGetOptionQuotes for many months to retrieve option
> > bid/ask quotes from MSN with no problem. For some reason, it will not
> > return quotes for the 8/31 series. It still retrieves monthly options
> > quotes fine, so it seems to be something about the 8/31 series. Thoughts?
> >
>

Mon Aug 27, 2012 10:30 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Well, the reason it flags the error is because you asked for the month-end
date from a non-quarter end month.

What is does right now is assume a day of the month 30 or 31 is a quarterly
expiration request, and a day of the month 1 is a monthly expiration
request. In those two cases, it changes the expiration date for the end of
the month or for the expiration date of that month.

However, since the weeklies can now be almost any date, I'm thinking I
should just pull those assumptions out of the functions. It just means
someone will get the generic "Error" returned if data doesn't exist for the
passed date. Since there are other functions to get the monthly and
quarterly expiration dates, it really shouldn't be a big issue for someone
to find out and pass the necessary date.

Hmmm. What happens if the week DOES expire on a quarter-end? Would they not
create a weekly series for that week? I suppose they can't, because the
ticker symbol only has a date in it, not an indication of weekly or
quarterly.

On Mon, Aug 27, 2012 at 9:14 AM, cutthegrasssnow <dan@stitchwithus.com>wrote:

>
> I'm sure you've thought of this already, but the code could specifically
> identify the 4 months that are quarter ends (or the 8 that are not).
> Probably not that simple.
>

Mon Aug 27, 2012 9:44 am (PDT) . Posted by:

"curls07" curls07

Hey Guys,

A quick question; Do you need to run SMFforceRecalculation if you query over 1,000 pages?. I know the array limit is 1,000 pages but will the functions just write over earlier entries in the array?

I am not querying the same pages so I have no need to have the saved pages for speed. I also hold almost no references of them in my workbook so for the vast majority of the time writing over an entry is not a problem.

I reap the memory in the array with SMFforceRecalculation now as a precaution every so often, but is it necessary to do that?

Mon Aug 27, 2012 11:28 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

I usually run the smfForceRecalculation macro any time I finish up and
close what I'm working on. But I usually only work on one workbook at a
time.

It doesn't write over "earlier" entries, because the "early" is irrelevant.
And there's no mechanism to tell if an entry is no longer being used.

On Mon, Aug 27, 2012 at 9:44 AM, curls07 <agc11d@gmail.com> wrote:

> Hey Guys,
>
> A quick question; Do you need to run SMFforceRecalculation if you query
> over 1,000 pages?. I know the array limit is 1,000 pages but will the
> functions just write over earlier entries in the array?
>
> I am not querying the same pages so I have no need to have the saved pages
> for speed. I also hold almost no references of them in my workbook so for
> the vast majority of the time writing over an entry is not a problem.
>
> I reap the memory in the array with SMFforceRecalculation now as a
> precaution every so often, but is it necessary to do that?
>

Mon Aug 27, 2012 3:32 pm (PDT) . Posted by:

"curls07" curls07

What happens, at a technical level, when the 1000 page limit is reached?

As always, Thank you for your help and your time Randy.

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> I usually run the smfForceRecalculation macro any time I finish up and
> close what I'm working on. But I usually only work on one workbook at a
> time.
>
> It doesn't write over "earlier" entries, because the "early" is irrelevant.
> And there's no mechanism to tell if an entry is no longer being used.
>
> On Mon, Aug 27, 2012 at 9:44 AM, curls07 <agc11d@...> wrote:
>
> > Hey Guys,
> >
> > A quick question; Do you need to run SMFforceRecalculation if you query
> > over 1,000 pages?. I know the array limit is 1,000 pages but will the
> > functions just write over earlier entries in the array?
> >
> > I am not querying the same pages so I have no need to have the saved pages
> > for speed. I also hold almost no references of them in my workbook so for
> > the vast majority of the time writing over an entry is not a problem.
> >
> > I reap the memory in the array with SMFforceRecalculation now as a
> > precaution every so often, but is it necessary to do that?
> >
>

Mon Aug 27, 2012 4:35 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The functions that can return "Error -- Too many web page retrievals".
Others may just return "Error".

On Mon, Aug 27, 2012 at 3:32 PM, curls07 <agc11d@gmail.com> wrote:

> What happens, at a technical level, when the 1000 page limit is reached?
>

Tue Aug 28, 2012 12:11 am (PDT) . Posted by:

"wongkayau" wongkayau

the problem of using "smfforcerecalculation" is that you have to close data dowload worksheet. then you run "smfforcerecalculation" for a blank sheet.

it works but is not too cool to open/close files many times. thx

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> I usually run the smfForceRecalculation macro any time I finish up and
> close what I'm working on. But I usually only work on one workbook at a
> time.
>
> It doesn't write over "earlier" entries, because the "early" is irrelevant.
> And there's no mechanism to tell if an entry is no longer being used.
>
> On Mon, Aug 27, 2012 at 9:44 AM, curls07 <agc11d@...> wrote:
>
> > Hey Guys,
> >
> > A quick question; Do you need to run SMFforceRecalculation if you query
> > over 1,000 pages?. I know the array limit is 1,000 pages but will the
> > functions just write over earlier entries in the array?
> >
> > I am not querying the same pages so I have no need to have the saved pages
> > for speed. I also hold almost no references of them in my workbook so for
> > the vast majority of the time writing over an entry is not a problem.
> >
> > I reap the memory in the array with SMFforceRecalculation now as a
> > precaution every so often, but is it necessary to do that?
> >
>

Tue Aug 28, 2012 12:33 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Not sure what you mean. You don't need to open and close a workbook to run
the macro.

When I'm working in a workbook and want fresh data, I just run the macro.
However, it probably wouldn't be a good idea to have a number of add-in
workbooks open, because the macro would affect all of them.

But if I have been working on an add-in workbook and am done with it, after
I close it, I usually run the macro as well. That way, I have a fresh empty
array for the next activity I start working on.

On Tue, Aug 28, 2012 at 12:11 AM, wongkayau <wongkayau@yahoo.com> wrote:

> the problem of using "smfforcerecalculation" is that you have to close
> data dowload worksheet. then you run "smfforcerecalculation" for a blank
> sheet.
>
> it works but is not too cool to open/close files many times. thx
>

Tue Aug 28, 2012 2:33 am (PDT) . Posted by:

"wongkayau" wongkayau

thanks.
i mean if i use "smfforcerecalculation" after downloading data by smfGetTagContent, "smfforcerecalculation" will trigger the download again.
to avoid the repeating download, i must close the smfGetTagContent workbook, and then run "smfforcerecalculation".
thanks.

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> Not sure what you mean. You don't need to open and close a workbook to run
> the macro.
>
> When I'm working in a workbook and want fresh data, I just run the macro.
> However, it probably wouldn't be a good idea to have a number of add-in
> workbooks open, because the macro would affect all of them.
>
> But if I have been working on an add-in workbook and am done with it, after
> I close it, I usually run the macro as well. That way, I have a fresh empty
> array for the next activity I start working on.
>
> On Tue, Aug 28, 2012 at 12:11 AM, wongkayau <wongkayau@...> wrote:
>
> > the problem of using "smfforcerecalculation" is that you have to close
> > data dowload worksheet. then you run "smfforcerecalculation" for a blank
> > sheet.
> >
> > it works but is not too cool to open/close files many times. thx
> >
>

Mon Aug 27, 2012 10:08 am (PDT) . Posted by:

"Stefn Rai" rainerglobal@ymail.com

Anybody know the answer to this?

From: "rainerglobal@ymail.com" <rainerglobal@ymail.com>
To: smf_addin@yahoogroups.com
Sent: Monday, August 27, 2012 11:41 AM
Subject: [smf_addin] How to retriev info

 
Hello, how would I retrieve the percentage information under the page http://www.barchart.com/snapopinion/futures/ESU12 ? E.g. the information to the right of Today's Opinion,Yesterday's pinion: , Last Week's Opinion: and Last Month's Opinion:

Kind Regards

Mon Aug 27, 2012 11:32 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

You need something like:

=RCHGetTableCell("http://www.barchart.com/snapopinion/futures/ESU12",2,"Today's
Opinion:",,,,1)

On Mon, Aug 27, 2012 at 2:41 AM, rainerglobal@ymail.com <
rainerglobal@ymail.com> wrote:

> Hello, how would I retrieve the percentage information under the page
> http://www.barchart.com/snapopinion/futures/ESU12 ? E.g. the
> information to the right of Today's Opinion,Yesterday's pinion: , Last
> Week's Opinion: and Last Month's Opinion:
>

Tue Aug 28, 2012 12:08 am (PDT) . Posted by:

"wongkayau" wongkayau

thanks a lot!
cheers

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> You certainly could. The smfForceRecalculation just blanks out *all* of the
> URLs to reset the array.
>
> But you can't just erase items 1, 6, 10, and 15. You'd then have to move
> later values up to fill items 1, 6, 10, and 15.
>
> What happens is when the add-in needs a web page to extract data from, it
> starts searching this array, starting from item 1. If it finds the
> requested URL, it uses the saved web page for extraction of data. If it
> runs into a blank URL, it then retrieves the web page from the Internet and
> saves both the URL and the web page in that slot.
>
> So, if a web page you don't want to retrieve again is in slot 25 and you
> just erase slot 15, the add-in will re-retrieve that web page and store it
> in slot 15, before it ever finds it in slot 25.
>
> However, I think you would have to add the macro or function to the add-in
> itself. I'm not sure a macro in your workbook could manually modify (or
> even access) an array in the VBA project of the add-in. But I've never
> tried it.
>
> On Sun, Aug 26, 2012 at 3:33 AM, wongkayau <wongkayau@...> wrote:
>
> > Thanks! Could I erase them manually or by macro? Thanks
> > Cheers
> >
>

Tidak ada komentar:

Posting Komentar