It is currently May 6th, 2024, 9:33 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 »

Skin is working great since the update. Question about the colors representing gains or losses on individual stocks during the day. There are times the prices/change/% for and individual stock will be in gray even though there has been a change. If I Refresh the Skin, the indices will change to the appropriate color (i.e. Red or Green). Any idea what causes this behavior?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: April 4th, 2024, 6:31 pm Any idea what causes this behavior?
The change in price and percentage change should show grey when the CNBC stock page records the change in price as "UNCH". I'm not sure why it would change when you refresh the skin unless the prices did actually change since the prices were last download which would seem a little odd if it was happening to more than a few stocks at the same time or the markets had just opened.

To help sort out what is going on would you please go to line 129 in MarketPrices.ini and change ; Debug=2 to Debug=2 (with no leading ';'). Then next time you load the skin and see a bunch of grey figues suggesting no change in price:

1) take a screenshot and then go to the ..\Documents\Rainmeter\Skins\MarketPrices folder and copy the WebParserDump.txt file to some other folder.
2) refresh the skin (middle-mouse click) to see if the prices have changed colour.
3) if there are any that have suddenly changed take a screenshot and then go to the ..\Documents\Rainmeter\Skins\MarketPrices folder and rename the WebParserDump.txt file to WebParserDump-AFTER.txt.
4) Copy the WebParserDump-AFTER.txt file to the same place as you copied the earlier WebParserDump.txt file.
5) Post the two screenshots along with the WebParserDump.txt and WebParserDump-AFTER.txt files here

With those we can try and work out what is going on.
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

See below: In this case, see before and after for "Travelers" and "Blackstone". Have seen the same issue for other stocks at other times. Thanks again for your help.
You do not have the required permissions to view the files attached to this post.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: April 5th, 2024, 4:23 pmIn this case, see before and after for "Travelers" and "Blackstone".
Sorry but I can't reproduce the error. Using your WebParserDump.txt my version of MarketPrices looks like this
using webparserdump.jpg
This is displaying the values for "Travelers" and "Blackstone" correctly.

The only way we can take a better look at what is going on is if you pack up your customized version of MarketPrices (the complete folder with all the associated files) and post it as an .rmskin here.
You do not have the required permissions to view the files attached to this post.
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

Haven't created an .rmskin before, but attached is my attempt. Let me know if this is what you need.
You do not have the required permissions to view the files attached to this post.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: April 6th, 2024, 2:04 am Let me know if this is what you need.
Yes that is what was needed. It seems to be working well and behaving itself on my desktop. Guess I'll have to leave it there until the markets open to see what happens.
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: Market Prices

Post by emp00 »

I would like to have a measure that clearly indicates whether the markets are "open" (price is changing) or "closed" (price is frozen) for my stock portfolio. Goal is to use this for setting e.g. a gray color instead of red/green for the change/change_pct values. Otherwise I always have the visual impression that markets are open, which I don't like at all. :)

@Mordasius: You are checking for the string "UNCH" in <change> and <change_pct> but in my stock portfolio I have never seen this giving "UNCH" in my Webparser-dumps: I always get a numerical figure of the last change, but this can be 3 days old in case markets are closed.

Looking at the CNBC xml, which of these tags do you recommend to use for my purpose?
  • <curmktstatus>REG_MKT</curmktstatus> --> probably this has a different meaning?
  • <mainmktstatus>OPEN</mainmktstatus> --> unfortunately does not seem to be available for all international stocks/indices. Example non-working symbols: /LCOM4 and BTC.CB=
  • <last_time>2024-04-05T12:09:46.000-0400</last_time> --> this could work for all stocks/indices, seemingly giving the last price update time, however needs an extra calc measure to compare with system time (making sure we compare UTC with UTC time...) and I noticed that it sometimes gives a time stamp in the future (some hours, seen for example /LCOM4) ?
  • <last_time_msec>1712333386000</last_time_msec> --> the same as above, here as Epoch Unix Timestamp, looking good
  • <realTime>true</realTime> --> this looks nice giving true or false, but not sure if it's what I want ? Can somebody confirm or share experience what this tag really means?
  • <trading_day_type>TRADING_DAY</trading_day_type> --> sounds good but seems to be constant no matter of markets are open/closed, thus of no use
There's probably no publicly available documentation of the CNBC API xml that I could check out, right? Thanks for tipps.
User avatar
Yincognito
Rainmeter Sage
Posts: 7203
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

emp00 wrote: April 6th, 2024, 11:33 am Looking at the CNBC xml, which of these tags do you recommend to use for my purpose?
The curmktstatus field value can change from REG_MKT to POST_MKT or similar in some cases when closed. Also, the trading_day_type field value can change from TRADING_DAY to WEEKEND or similar in the same circumstances. Obviously, the mainmktstatus field value can go from OPEN to CLOSE in such instances.

However, you can have REG_MKT, TRADING_DAY and CLOSE at the same time for the same stock (the cnbc.com/quotes/<symbol> webpage did not display After Hours in such a case, when i tried with the .N225 symbol), so maybe a combined checking of these fields is more feasible.

I think the best choice would be to monitor and compare these values with the actual cnbc.com/quotes/<symbol> webpage display for a while, to see which fields react to such events and how. At least that's what I would do.

P.S. I don't think the realTime field value has anything to do with the market status, but rather with how data is retrieved for such stocks. It stays true when market is closed, by the way.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: Market Prices

Post by emp00 »

Yincognito wrote: April 6th, 2024, 2:29 pm The curmktstatus field value changes from REG_MKT to POST_MKT or similar when closed. Also, the trading_day_type field value changes from TRADING_DAY to WEEKEND or similar in the same circumstances. Obviously, the mainmktstatus field value goes from OPEN to CLOSE in such instances.

P.S. I don't think the realTime field value has anything to do with the market status, but rather with how data is retrieved for such stocks. It stays true when market is closed, by the way.
Note: This posting is from Saturday, April 6th 12:45 UTC, practically no trading today.

<realTime> : Indeed, seems to unrelated to the market status.
<curmktstatus> : Unreliable, e.g. this symbol from Shenzhen/China stock market shows REG_MKT but surely has market closed right now; I think this tag has a different meaning?
<mainmktstatus> : Unreliable, e.g. this symbol shows OPEN right now, but last price change is more than 24 hours old (today on Saturday, no trading of this stock right now)
<trading_day_type> : This gives indeed WEEKEND for many of the stocks i'm looking at, not too bad! But also here some exceptions are at play, e.g this symbol currently shows TRADING_DAY instead of WEEKEND.

I could not yet identify a clear strategy to identify whether a stock is currently "trading hot" or not. The best thing coming to my mind is combining the above findings but I cannot come up with a successful AND/OR combination...
User avatar
Yincognito
Rainmeter Sage
Posts: 7203
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

emp00 wrote: April 6th, 2024, 2:59 pm Note: This posting is from Saturday, April 6th 12:45 UTC, practically no trading today.

<realTime> : Indeed, seems to unrelated to the market status.
<curmktstatus> : Unreliable, e.g. this symbol from Shenzhen/China stock market shows REG_MKT but surely has market closed right now; I think this tag has a different meaning?
<mainmktstatus> : Unreliable, e.g. this symbol shows OPEN right now, but last price change is more than 24 hours old (today on Saturday, no trading of this stock right now)
<trading_day_type> : This gives indeed WEEKEND for many of the stocks i'm looking at, not too bad! But also here some exceptions are at play, e.g this symbol currently shows TRADING_DAY instead of WEEKEND.

I could not yet identify a clear strategy to identify whether a stock is currently "trading hot" or not. The best thing coming to my mind is combining the above findings but I cannot come up with a successful AND/OR combination...
Well, I've been editing the reply you quoted with more or less the same observations in the meantime - looks like you quoted the "older" version of the reply, which was not entirely correct (my bad).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth