4 Messages
Digest #4489
Messages
Mon Feb 25, 2019 1:52 am (PST) . Posted by:
6b8b3927578b12d581525f87a02e8a38
Hi,
I have a daily screener generated symbol list in column A5-A45. I would like to run a macro to generate ~2 years of DOHLCVA for each symbol. Starting with the symbol in A5, have the historical data dump begins at row C5-I5 then the symbol name in A6 data dump starting at row K5-Q5, then the symbol name in A7 have the data dump start at row S5-Y5, etc.
Is there a macro efficient way to accomplish this?
Several years ago I was doing this via a macro call to my looping VBA function to getYahooData passing in the symbol name, date range and output range. This legacy code is broken so I was hoping to incorporate one of the functions perhaps smfGetYahooPotfolioView.
Thank for any help or ideas or a link to where this is already talked about.
Rob
I have a daily screener generated symbol list in column A5-A45. I would like to run a macro to generate ~2 years of DOHLCVA for each symbol. Starting with the symbol in A5, have the historical data dump begins at row C5-I5 then the symbol name in A6 data dump starting at row K5-Q5, then the symbol name in A7 have the data dump start at row S5-Y5, etc.
Is there a macro efficient way to accomplish this?
Several years ago I was doing this via a macro call to my looping VBA function to getYahooData passing in the symbol name, date range and output range. This legacy code is broken so I was hoping to incorporate one of the functions perhaps smfGetYahooPotfolio
Thank for any help or ideas or a link to where this is already talked about.
Rob
Mon Feb 25, 2019 2:18 am (PST) . Posted by:
"Randy Harmelink" rharmelink
I would do something like this:
Dim i1 As Integer, sTicker As String, oCell As Range
Set oCell = Range("A5")
For i1 = 0 To 100
sTicker = oCell.Offset(i1, 0).Value
If sTicker = "" Then Exit For
oCell.Offset(-1, 8 * i1 + 2) = sTicker
oCell.Offset(0, 8 * i1 + 2).Resize(500, 7) =
smfGetYahooHistory(sTicker, pRows:=500, pCols:=7)
Next i1
.....but it will return "dohlcvu", since all "ohlc" are all adjusted values.
On Mon, Feb 25, 2019 at 2:52 AM mushin2003@... wrote:
> I have a daily screener generated symbol list in column A5-A45. I would
> like to run a macro to generate ~2 years of DOHLCVA for each symbol.
> Starting with the symbol in A5, have the historical data dump begins at row
> C5-I5 then the symbol name in A6 data dump starting at row K5-Q5, then the
> symbol name in A7 have the data dump start at row S5-Y5, etc.
>
> Is there a macro efficient way to accomplish this?
>
> Several years ago I was doing this via a macro call to my looping VBA
> function to getYahooData passing in the symbol name, date range and output
> range. This legacy code is broken so I was hoping to incorporate one of
> the functions perhaps smfGetYahooPotfolioView.
>
> Thank for any help or ideas or a link to where this is already talked
> about.
>
>
>
Dim i1 As Integer, sTicker As String, oCell As Range
Set oCell = Range("
For i1 = 0 To 100
sTicker = oCell.Offset(
If sTicker = "" Then Exit For
oCell.Offset(
oCell.Offset(
smfGetYahooHistory(
Next i1
.....but it will return "dohlcvu"
On Mon, Feb 25, 2019 at 2:52 AM mushin2003@.
> I have a daily screener generated symbol list in column A5-A45. I would
> like to run a macro to generate ~2 years of DOHLCVA for each symbol.
> Starting with the symbol in A5, have the historical data dump begins at row
> C5-I5 then the symbol name in A6 data dump starting at row K5-Q5, then the
> symbol name in A7 have the data dump start at row S5-Y5, etc.
>
> Is there a macro efficient way to accomplish this?
>
> Several years ago I was doing this via a macro call to my looping VBA
> function to getYahooData passing in the symbol name, date range and output
> range. This legacy code is broken so I was hoping to incorporate one of
> the functions perhaps smfGetYahooPotfolio
>
> Thank for any help or ideas or a link to where this is already talked
> about.
>
>
>
Mon Feb 25, 2019 5:38 am (PST) . Posted by:
6b8b3927578b12d581525f87a02e8a38
Thanks a lot! Working great, much appreciated.
Rob
Rob
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF
Tidak ada komentar:
Posting Komentar