ClimberMel / SMF_Add-in

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

RCHGetYahooHistory date issue and sorting #11

Closed ClimberMel closed 1 year ago

ClimberMel commented 1 year ago

OK, I ran the new version of RCHGetYahooHistory. There are 2 issues: (1) the more serious is that that range I got when I used: Range("A1:B20000") = RCHGetYahooHistory("TQQQ", , , , , , , , "DA", 1, 1, 1, 20000, 2) is from inception date (2/11/10) to 12/31/20. The last date should be today (2/8/23). (2) A minor issue is that the dates are inverted, with the latest dates at the beginning of the data set. Of course, this is easily corrected, but I would like to suggest that we retain Randy's convention that the data set begins at the earliest date and ends at the latest.

ClimberMel commented 1 year ago

The data appears to be in reverse order now. But the formula: = RCHGetYahooHistory("TQQQ", , , , , , , , "DA", 1, 1, 1, 20000, 2) is requesting a Resort = RCHGetYahooHistory("TQQQ", , , , , , , , "DA", 1, 1, 0, 20000, 2) would provide the data unsorted and from oldest to newest

ClimberMel commented 1 year ago

The date issue is due to the default end date in the code was 2020-12-31, so since the above formula has no dates, it was using that default date. I will update it to something in the future and test.

ClimberMel commented 1 year ago

I have tested and pushed the code fix to GitHub. Since the data appears to come back in the correct order, I'm not going to change that. The resort parameter can be set to 1 to reverse the order to be latest to oldest.

ClimberMel commented 1 year ago

The data order seems to be an issue so I will change it in this coming release.