emp00 wrote: ↑April 6th, 2024, 11:33 am @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:
Actually we are not checking for the string "UNCH" but rather substituting '0' for "UNCH" ( Substitute="UNCH":"0" ) in [mIndex_UpDown]. That's a carry over from earlier versions of MarketPrices ( pre-February 2024) when the price of each stock/index was read from a separate web page which sometimes displayed "UNCH" meaning unchanged. This mostly meant that the stock was not being traded because the markets were closed. However, some stock are traded after hours which shows as changes in price and Indices in particular seem to be "traded" or at least the composite price changes all the time.
So whilst the "UNCH" flag indicates when many stocks and commodities are, or rather are not, being traded it can't be reliably used determine whether the markets are open or closed. I expect all the information you need is buried somewhere in the CNBC xml file - it's just a case of waiting until the markets open on Monday to see what is going on.
Mordasius wrote: ↑April 6th, 2024, 6:12 am
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.
The only changes I made to your last posted Skin was to add the lines limiting decimal places to (2). Don't know if that could have any effect.
Hello everyone,
I have a problem with the latest version of the skin. When adding the CW8^-IT action, nothing works anymore. After various tests, this is when a symbol contains "^".
Do you have any ideas to resolve this?
Capture d'écran 2024-04-23 001208.png
You do not have the required permissions to view the files attached to this post.
Crick wrote: ↑April 22nd, 2024, 10:14 pm
I have a problem with the latest version of the skin. When adding the CW8^-IT action, nothing works anymore.
I think this is because you entered the wrong symbol in StockSymbols.inc
What you need to do is go to http://www.cnbc.com then enter the stock/index name you want in the search box. When the page opens look in the top-left address window and make a note of EXACTLY what comes after https://www.cnbc.com/quotes/
Mordasius wrote: ↑April 6th, 2024, 6:12 am
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.
I am looking for the possibility to show the current "post market / after hours" price. As of now, the skin only shows the <last> price from the regular market (which is often an outdated closing price) -> I would like to see the "extended market" quote if it's available. If no such extended market price is delivered by CNBC, of course the regular last price shall be displayed. Has anybody already implemented this functionality? Thanks for sharing the relevant measures.
See below NVDA.O as example. In case <extendedMktQuote> is available -- how to parse this additional <last> price from under <extendedMktQuote> (here: 1069.00) and ignore the <last> closing price (here: 1064.69) ? Of course also the <change> and <change_pct> parsing measures should use the <extendedMktQuote> structure tags and since <extendedMktQuote> is not available for all stocks/exchanges, there needs to be some error handling in the parsing measures as well... Can anybody help ?
I am looking for the possibility to show the current "post market / after hours" price. As of now, the skin only shows the <last> price from the regular market (which is often an outdated closing price) -> I would like to see the "extended market" quote if it's available. If no such extended market price is delivered by CNBC, of course the regular last price shall be displayed. Has anybody already implemented this functionality? Thanks for sharing the relevant measures.
See below NVDA.O as example. In case <extendedMktQuote> is available -- how to parse this additional <last> price from under <extendedMktQuote> (here: 1069.00) and ignore the <last> closing price (here: 1064.69) ? Of course also the <change> and <change_pct> parsing measures should use the <extendedMktQuote> structure tags and since <extendedMktQuote> is not available for all stocks/exchanges, there needs to be some error handling in the parsing measures as well... Can anybody help ?
Short answer - you should use branch reset groups in your final extraction measures: https://www.regular-expressions.info/branchreset.html
Use the <extendedMktQuote> <last> pattern as the 1st branch, and the regular <last> one as the 2nd branch. That way, the regex will first look to capture the <last> in <extendedMktQuote> as \1, and if it fails, it will instead capture the regular <last> as \1.
Yincognito wrote: ↑May 27th, 2024, 11:14 am
Short answer - you should use branch reset groups in your final extraction measures: https://www.regular-expressions.info/branchreset.html
Use the <extendedMktQuote> <last> pattern as the 1st branch, and the regular <last> one as the 2nd branch. That way, the regex will first look to capture the <last> in <extendedMktQuote> as \1, and if it fails, it will instead capture the regular <last> as \1.
That sounds like a perfect-fit solution! I really tried: reading, understanding, finding examples (I need concrete examples for understanding...). Found even this branch reset demo on regex101.com but it's too much for me. Can you give me a hint how to adapt the below RegExp expression in the measure [mIndex1_Price] ?
Below code includes the Webparser and all variables needed for live testing, if needed. it's basically Mordasius skin. This CNBC-RegExp grabs 7 stock symbols from around the world, some with extended market data... StringIndex=1 is obviously NDAQ and StringIndex=6 is NVDA in this example... I just need a working expression for 1 measure. Thanks for sharing your incredible RegEx expertise!