ClimberMel / SMF_Add-in

Stock Market Functions for Excel using VBA
https://climbermel.github.io/SMF_Add-in/
14 stars 5 forks source link

currency Yahoo history download #40

Closed joeyiii57 closed 1 year ago

joeyiii57 commented 1 year ago

Currency Prices

The attached spreadsheet (zip is not password protected) is an example of what I use to download Euro currency historical prices. This example spreadsheet is built to run standalone, apart from the RCH addin. If you open this spreadsheet file with the RCH addin enabled you might get unpredictable results. If so, disable the original RCH addin in the addins manager.

This VBA module will need significant cleanup. For instance it still calls RCHGetYahooPortfolioView even though the download is just a CSV file from the smfGetYahooHistoryCSV routine.

The following VBA References were enabled in my test file and my baskc work files Visual Basic For Applications Microsoft Excel 14.0 Object Library OLE Automation Microsfot Office 14.0 Object Library Microsoft HTML Object Library Microsoft WinHTTP Service, version 5.1 Microsoft Visual Basic for Applications Extensibility 5.3 Microsoft Scripting Runtime Microsfot Script Control 1.0 Microsoft XML, v3.0 Currency_Test.zip

ClimberMel commented 1 year ago

Why not just use the RCHGetYahooHistory function? Try the sample sheet on the web site and put in EURUSD=X for the ticker.

joeyiii57 commented 1 year ago

Couple of dumb reasons. The first being that it wasn't until after I posted my comment that I went to the Yahoo quote site and found that the EURUSD=x had a hstory tab. I first needed currency quotes years before I knew RCH existed. I was using a VBA module that some guy posted that worked with the old version of Yahoo that let you pick a range of financial elements. It did not seem to work with currencies. I found a foreign exchange website that let me manually download all the history data and manually import them into my spreadsheet. As I recall back in the day Yahoo did not have a history tab on the currency quote so I had to look for an alternate source. The other reason was I didn't realize at the time that EURUSD=x was the actual ticker symbol. I only discovered the RCH functions after the original routine didn't work because Yahoo changed their website structure. I then found RCH and started using it. I never thought to look again to see if I could actually download Yahoo currency history. I only needed to update my currency tracking sheet every couple of months so downloading and importing a file wasn't that aggregious. In trying to learn how to use RCH I figured out how to implement a current quote update in my basic stock tracking sheet as a means to teach myself how to use the various functions. The instructions for RCH were a little spartan for me to understand. Now I sure have a more convenient way to update my history file.

On Fri, Jun 9, 2023 at 1:59 PM ClimberMel @.***> wrote:

Why not just use the RCHGetYahooHistory function? Try the sample sheet on the web site https://climbermel.github.io/SMF_Add-in/templates.html and put in EURUSD=X for the ticker.

— Reply to this email directly, view it on GitHub https://github.com/ClimberMel/SMF_Add-in/issues/40#issuecomment-1584950848, or unsubscribe https://github.com/notifications/unsubscribe-auth/A57MM7ILZEH4I524X2KL2H3XKNP6ZANCNFSM6AAAAAAY3DJVII . You are receiving this because you authored the thread.Message ID: @.***>

-- iii