I am translating some WL4 code. This is one of the sections inside a class of Date fnxns:
CODE:
Please log in to see this code.
It seems to me the code could be simplified e.g. the while() code block is repetitive and perhaps could be invoked just once? But I am not able to figure out how.
Size:
Color:
Size:
Color:
You're encouraged to use the Community.Component's method, and you can see the open source code there, but the method was posted in
this discussion.
Size:
Color:
Maybe I am dense b/c I still couldn't figure out how to condense the repeating code.
Perhaps I should restate my Q:
Inside a switch/case routine, how does one re-use a code block w/o typing the whole thing every time? [If I had 20 cases, I would be repeating the code 20 times; surely there's a more elegant way.]
Size:
Color:
By extracting the code block into a new function?
Size:
Color:
Ok, will try it out.
Re: MarketInfo property, would you happen to know if this will, like fundamental data, have info going back approx 6yrs (+ some future years), or will it be now be cumulative going forward (currently, info is from Jan 2004 onward)?
Size:
Color:
The Holiday and special hours data come from the ..\Data\Markets.xml file, which hasn't been updated for more than a year. I'd like Fidelity to backfill the U.S. Holidays to at least 1991 (the start of Fidelity EOD backfill). Hopefully this will get done for the next release. Nonetheless, you can edit that file yourself and put anything you want in it. I did.
Size:
Color:
fyi, they have a helpful Holiday web service that returns a XML that can be cached:
GetHolidaysForDateRange @ holidaywebservice.com
Size:
Color:
Cone,
While waiting for Fidelity, can you look into making an updated Markets.xml file available for download through, say, the Extension Manager? Alternately, perhaps a "Holiday update" page can be created, like you have the Watchlist update page, that you/Eugene/users can update as needed and folks can then update their Markets.xml file manually that way? I would imagine that updates would be needed very infrequently.
I must say that I have become a fan of MarketsInfo property since I became aware of it just a few days ago.
Lastly, I have more or less finished translating some Date functions from WL4 to WL.NET and I will be submitting them shortly for review; it would be great if users start off with an updated Markets.xml file.
Size:
Color:
QUOTE:
can you look into making an updated Markets.xml file available for download through, say, the Extension Manager?
Just FYI: not through the Extension Manager because this XML file is not an Extension.
QUOTE:
folks can then update their Markets.xml file manually that way?
Folks will be able to update Markets.xml through a convenient and otherwise helpful tool called the Market Manager which is still unreleased, unfortunately.
Size:
Color: