It is currently April 27th, 2024, 7:25 am

Market Prices

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

Looks like I missed the instruction to comment out the line in the MoreThanOne.inc when I added the text regarding the formatting of the price change.

The only reason I have to wait until next week to get the .txt files is that I’m away with no access to my PC.

Just want to be sure that the expected behavior of the skin with Debug=2 is that each time the skin refreshes (currently every 10 min), a NEW WebParserDump.txt will be created. Please confirm
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Market Prices

Post by eclectic-tech »

confirmed-rubber-stamp-free-png.png
EDIT: You may want to ensure you have this line in your Webparser measure:
Flags=ForceReload

Forces a download of the requested resource from the origin server, not from the cache.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

Besides what everybody else said, I suppose a "test skin" that automatically checks whether the price follows the price change in the .xml retrieved from CNBC and logs the info when this doesn't happen can be made, so that one could leave it loaded for a day and just check the log at the end of it to see if there were any problems. That wouldn't require staying put and alert to save the downloaded data every 10 minutes or so. Not sure if the Opening Price would be enough for that like Mordasius mentioned, or would require saving the "last" price in a variable so things can be computed based on the difference to the current price and compared.

Other than that, I find it odd that only certain stocks seem to exhibit this behavior, as this would normally indicate that the problem is not necessarily in the response from CNBC (which should be consistent for all stocks in the query). Not sure whether the other parameters of the query play a part in it (if such an issue is proven to exist in the first place, that is), maybe the data for some stocks changes at a different rate than for others (unlikely, but still). Also, I can't see how the multiple stock query's .xml would have this problem, but the single / individual stock query would not... :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

Yincognito wrote: February 16th, 2024, 5:45 pmOther than that, I find it odd that only certain stocks seem to exhibit this behavior, as this would normally indicate that the problem is not necessarily in the response from CNBC (which should be consistent for all stocks in the query). Not sure whether the other parameters of the query play a part in it (if such an issue is proven to exist in the first place, that is), maybe the data for some stocks changes at a different rate than for others (unlikely, but still). Also, I can't see how the multiple stock query's .xml would have this problem, but the single / individual stock query would not... :???:
I'm also perplexed by this but can now confirm that the downloaded files (see attached) are showing the correct Price Changes but sometimes not updating the Price accordingly. I got up very early (for me) to catch the relevant US stocks whilst the markets were still open and noted the following - check the Price and Price Changes for NASDAQ and Home Depot as examples.
stocks-0431.png
stocks-0450.png
I'm now going back to sleep and will come up with a fix tomorrow or later today my time.

P.S. I hadn't spotted this problem earlier as I sold all my stocks and shares in November 2021 and no longer have the Marketprices or MyPortfolio skins on my desktop. But for me the Price Change was always far more important than the Price so perhaps the best fix is just to eliminate the Price column and only show the price change. Who really pays any attention to the price? If you really want to know the current Trading Price you can just click on the Stock/Index name to bring up the relevant CNBC.com page.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

Mordasius wrote: February 16th, 2024, 10:02 pm I'm also perplexed by this but can now confirm that the downloaded files (see attached) are showing the correct Price Changes but sometimes not updating the Price accordingly. I got up very early (for me) to catch the relevant US stocks whilst the markets were still open and noted the following - check the Price and Price Changes for NASDAQ and Home Depot as examples.
stocks-0431.png stocks-0450.png
I'm now going back to sleep and will come up with a fix tomorrow or later today my time
That leaves me speechless too. I thought the multi-query was perfect otherwise. By the way, did you happen to try using your old way with a single-query (I let that available via left click on the stock in my repackaged version of your skin, just as you originally wrote it) and see if the price is still wrong when opening the stock in the browser?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

Yincognito wrote: February 16th, 2024, 10:18 pm By the way, did you happen to try using your old way with a single-query (I let that available via left click on the stock in my repackaged version of your skin, just as you originally wrote it) and see if the price is still wrong when opening the stock in the browser?
Yes I checked that and any left-click on the stock/index name gives the current and updated price which may or may not be the same as that shown on the MarketPrices skin.

I'm erring more and more to simply deleting the Price column which is not that useful anyway. There again I could simply replace the Current Price with the day's opening price.
Last edited by Mordasius on February 16th, 2024, 10:36 pm, edited 1 time in total.
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

Please don’t get rid of the Price column. I depend on that more than the change on a daily basis. I’m assuming you don’t need me to forward the dump files since you have seen the issue for yourself. Let me know, thanks.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: February 16th, 2024, 10:33 pm Please don’t get rid of the Price column. I depend on that more than the change on a daily basis.
How about I just replace the Current price with the Day's opening price? That makes more sense to me.

And: No we don't need any more "dump" files from you
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

Mordasius wrote: February 16th, 2024, 10:27 pm Yes I checked that and any left-click on the stock/index name gives the current and updated price which may or may not be the same as that shown on the MarketPrices skin.

I'm erring more and more to simply deleting the Price column which is not that useful anyway. There again I could simply replace the Current Price with the day's opening price.
Take a look at these for Home Depot (browser top, skin bottom):
HD Browser.jpg
HD Skin.jpg
Notice how the skin is actually correct, because both 362.25, 1.27 and 0.35% are present in the browser version, it's just that the <last>...</last> price is not the right one (see the .xml below, saved via the log and right click on the measure's String value):
Response.xml
and the Home Depot <quickQuote> (where all the 6 price related values are present - this was formatted by simply regex replacing >< with >\r\n< in Notepad++ and searching for the Home Depot <quickQuote>):

Code: Select all

<quickQuote>
<altName>Home Depot</altName>
<altSymbol>HD</altSymbol>
<assetSubType>Common Stock</assetSubType>
<assetType>STOCK</assetType>
<cacheServed>false</cacheServed>
<cachedTime>Fri Feb 16 17:54:10 EST 2024</cachedTime>
<change>1.27</change>
<change_pct>0.3517</change_pct>
<cnbcId>0</cnbcId>
<code>0</code>
<comments>Composite</comments>
<countryCode>US</countryCode>
<curmktstatus>POST_MKT</curmktstatus>
<currencyCode>USD</currencyCode>
<exchange>NYSE</exchange>
<extendedMktQuote>
<afthrs_last_time>2024-02-16T17:40:02.318-0500</afthrs_last_time>
<change>-0.10</change>
<change_pct>-0.0276</change_pct>
<exchange>NYSE</exchange>
<fullchange>1.17</fullchange>
<fullchange_pct>0.324</fullchange_pct>
<last>362.25</last>
<last_time>2024-02-16T17:40:02.318-0500</last_time>
<last_time_msec>1708123202318</last_time_msec>
<source>Last NASDAQ LS, VOL From CTA</source>
<timeZone>EST</timeZone>
<type>POST_MKT</type>
<volume>520263</volume>
</extendedMktQuote>
<feedSymbol>HD</feedSymbol>
<fullVolume>3899070</fullVolume>
<fundamentalData>
<beta>0.98127</beta>
<DEBTEQTYQ>2932.098</DEBTEQTYQ>
<dividend>8.36</dividend>
<dividendyield>0.0231</dividendyield>
<eps>15.5912</eps>
<feps>15.076</feps>
<fpe>24.03489</fpe>
<fpsales>2.365601</fpsales>
<fsales>152448827392</fsales>
<GROSMGNTTM>33.42441</GROSMGNTTM>
<MPreviousClose>361.07999</MPreviousClose>
<mktcap>360633106432</mktcap>
<mktcapView>360633.12M</mktcapView>
<NETPROFTTM>10.21638</NETPROFTTM>
<PDYTDPCHG>4.19276</PDYTDPCHG>
<pcttendayvol>1.3696</pcttendayvol>
<pe>23.240675</pe>
<psales>2.3461306</psales>
<ROETTM>1151.32</ROETTM>
<revenuettm>153713999872</revenuettm>
<revenuettmView>153714.0M</revenuettmView>
<sharesout>995261760</sharesout>
<sharesoutView>995.26M</sharesoutView>
<TTMEBITD>25328.0</TTMEBITD>
<tendayavgvol>2846936.00</tendayavgvol>
<yragoprice>320.69</yragoprice>
<yragopricechange>41.660004</yragopricechange>
<yragopricechangepct>12.99074</yragopricechangepct>
<yrhidate>2024-02-12</yrhidate>
<yrhiprice>368.72</yrhiprice>
<yrlodate>2023-10-27</yrlodate>
<yrloprice>274.26</yrloprice>
</fundamentalData>
<high>363.99</high>
<issue_id>145043</issue_id>
<issuer_id>19647</issuer_id>
<last>362.35</last>
<last_time>2024-02-16T16:10:00.000-0500</last_time>
<last_time_msec>1708117800000</last_time_msec>
<low>359.15</low>
<mainmktstatus>CLOSE</mainmktstatus>
<name>Home Depot Inc</name>
<onAirName>Home Depot</onAirName>
<open>360.68</open>
<prev_prev_closing>358.23</prev_prev_closing>
<previous_day_closing>361.08</previous_day_closing>
<provider>CNBC QUOTE CACHE</provider>
<providerSymbol>HD</providerSymbol>
<quoteDesc>
</quoteDesc>
<realTime>true</realTime>
<reg_last_time>2024-02-16T16:10:00.000-0500</reg_last_time>
<reg_market_close>16:00:00</reg_market_close>
<reg_market_open>09:30:00</reg_market_open>
<responseTime>Fri Feb 16 17:54:10 EST 2024</responseTime>
<shortName>HD</shortName>
<source>Last NASDAQ LS, VOL From CTA</source>
<streamable>1</streamable>
<symbol>HD</symbol>
<symbolType>symbol</symbolType>
<timeZone>EST</timeZone>
<todays_closing>362.35</todays_closing>
<trading_day_type>TRADING_DAY</trading_day_type>
<volume>3373591</volume>
</quickQuote>
Now, I don't know if I queried this at the right time or not, or whether it's the same for other stocks, but in this case it looks to me that the problem is not that the .xml contains the wrong data, but the fact that the skin extracts the "other" / "wrong" instance of the <last>...</last> field (and yes, there is in fact a <last>...</last> field in the .xml that has the "correct" 362.35 value). Or, it's the other way around and the "wrong" instances of <change>...</change> and <change_pct>...</change_pct> are extracted. If this is true for all cases (and not just for Home Depot or this particular instance when the market was closed), it can be corrected by minor adjustments to the RegExp options, which I intentionally let very simple and easy to adjust if needed.

I guess some more tests will be needed on this, before jumping to a hasty decision - just my opinion... :???:
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on February 16th, 2024, 11:31 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

Just my 2 cents worth (no pun intended), but if there is a way to have an accurate current price that would be a home run. One more data point is that since I first starting noticing the discrepancy, the “wrong” current price can sometimes go on for hours before it shows the correct price