It is currently April 27th, 2024, 6:42 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 »

I was able to get the info before leaving. I have a couple of screen shots and 3 txt files. The indices seem to work fine, but the individual stock prices and price changes are not in sync. Any ideas are welcome.
Market Prices 9_35am.jpg
MarketPrices9_55am.jpg
MarketPrices10_05am.jpg
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 »

sk14 wrote: February 15th, 2024, 3:11 pm I was able to get the info before leaving. I have a couple of screen shots and 3 txt files. The indices seem to work fine, but the individual stock prices and price changes are not in sync. Any ideas are welcome.

Market Prices 9_35am.jpgMarketPrices9_55am.jpgMarketPrices10_05am.jpg
For the record, your .jpgs don't match the .txts in terms of time (e.g. one .jpg is for 09:35 and the "corresponding" .txt is for 09:45). Neither the stocks that are interrogated do, between the .jpgs and the .txts. That's not the biggest problem though, but the fact that all .txts have the same file content:
MarketPrices.jpg
Here, I duplicated the "MarketPrices" skin folder (left) to a "MarketPrices2" one (right), the former using the 09:55 .txt data and the latter using the 10:05 .txt data (the times that have a match with the .jpg files). As you can see, the info is identical, making comparison and debugging impossible. Just saying... :confused:
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

I only included the .jpg's to show that the "price change" isn't synced with the "prices". I set the Debug=2 in the .ini file, but it doesn't seem to me that the data was getting placed in the .dmp file. The creation date in the .dmp file never changed (date was 2/11/24, the date I installed the latest version). Is there something I did wrong?

That's likely why the data was the same even at different times.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

sk14 wrote: February 15th, 2024, 10:22 pm I only included the .jpg's to show that the "price change" isn't synced with the "prices". I set the Debug=2 in the .ini file, but it doesn't seem to me that the data was getting placed in the .dmp file. The creation date in the .dmp file never changed (date was 2/11/24, the date I installed the latest version). Is there something I did wrong?

That's likely why the data was the same even at different times.
I can't tell if you did something wrong or not, Mordasius' instructions seem accurate to me. If you followed them properly, then the .txts should have been different. But, if you wonder about an alternative way, you could just copy the string value of that measure from the log via right click, and paste it to a new .txt or .xml file - it should be the same idea.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

Clearly I did something wrong. If I rename the WebParserDump.txt to indicate the time (ie. WebParserDump 10_05.txt), will the Skin create a new file with the WebParserDump.txt name?

Like I mentioned, the file date does not change, seemingly indicating it is not being written to.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Market Prices

Post by Yincognito »

sk14 wrote: February 16th, 2024, 12:33 am Clearly I did something wrong. If I rename the WebParserDump.txt to indicate the time (ie. WebParserDump 10_05.txt), will the Skin create a new file with the WebParserDump.txt name?

Like I mentioned, the file date does not change, seemingly indicating it is not being written to.
Manually renaming your WebParserDump.txt in your Explorer window is independent of the skin creating such a file, which only happens when the measure (Infos, in this case) is updated. As for the file date not being changed, it depends on which file date your Explorer shows. File creation date is not changed when the file is changed, only its file modification date, AFAIK.

Basically, you only need to rename the file after the measure just updated (this happens by default every 10 minutes, starting with the moment when you load or refresh the skin), since the measure should create a new one automatically the next time it updates.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

This is what I did:

At 9:45 am I renamed WebParserDump.txt to WebParserDump_9_45am.txt
Copied that file into another directory on my drive

At 9:55, after seeing that the Skin had updated, I renamed the file in the @Resources directory to
WebParserDump_9_55am.txt
Copied that file into another directory on my drive

At 10:05, renamed the file in @Resources to WebParserDump_10:05am.txt
Again copied file to another drive

Forwarded those three text files that I had in the alternate directory to Mordasius.

Are these the correct steps to take?
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, 1:40 am This is what I did:

At 9:45 am I renamed WebParserDump.txt to WebParserDump_9_45am.txt
Copied that file into another directory on my drive

At 9:55, after seeing that the Skin had updated, I renamed the file in the @Resources directory to
WebParserDump_9_55am.txt
Copied that file into another directory on my drive

At 10:05, renamed the file in @Resources to WebParserDump_10:05am.txt
Again copied file to another drive

Forwarded those three text files that I had in the alternate directory to Mordasius.

Are these the correct steps to take?
Nope. I'm sorry but your method has, as Yincognito pointed out, resulted in three identical data files which doesn't help us at all. Let's try again:

1) I think you already modified the [Infos] Webparser measure correctly to set Debug=2 but just to be sure it should look like this:

Code: Select all

[Infos]
Measure=WebParser
URL=https://quote.cnbc.com/quote-html-webservice/quote.htm?partnerId=2&requestMethod=quick&exthrs=1&noform=1&fund=1&output=xml&symbols=[&Symbols]&callback=quoteHandler1
;--- use the URL=file://#@#WebParserDump.txt if you want to test adaptations or customisation of the skin.
; URL=file://#@#WebParserDump.txt
;---- setting Debug=2 will download your stock prices to WebParserDump.txt which can then be copied to the @Resources folder for testing
Debug=2

2) Load MarketPrices.ini and once the prices are being shown open the ....Documents\Rainmeter\Skins\MarketPrices folder with Microsoft Explorer set to View - Details.

3) RENAME WebParserDump.txt to indicate the time it was downloaded. Get this time from the Date modified column of the details view in Microsoft Explorer. If the date modified is 16/02/24 10:30 right click and rename WebParserDump.txt to WebParserDump-1030.txt (best to use the 24hr time format for brevity and clarity). No need to move or copy this renamed file anywhere.

4) After ten minutes or so a new WebParserDump.txt file will appear in the MarketPrices folder indicating that the WebParser has download a fresh set of prices and price changes. Repeat step 3.

5) Continue renaming WebParserDump.txt until you spot a few Prices that haven't been updated to correspond to the Price Change shown in MarketPrices skin.

6) Post two or three of the most recently RENAMED WebParserDump.txt files to a post here.
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

The reason I followed the method I did was because when I first renamed the WebParserDump.txt file it seemed that a new version was not generated after 10 minutes. Maybe in my impatience to get you the data before leaving for a few days I did not refresh my view in Explorer and therefore didn’t see the new file. Of course it makes sense now that I just kept renaming the same file.

I will try again when the market opens again on Tuesday.

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:27 am I will try again when the market opens again on Tuesday.
Well it's already Friday where I am but "okie dokie" as the eloquent character Hannibal Lecter said a couple of times before continuing to do all sorts of nasty stuff.

I checked the more MoreThanOne.inc file you uploaded and couldn't see anything amiss there.

There are however a couple of places where you've added formatting to a string meter from the FormatPriceScript but left the Measurename as it was. It won't make any difference to the value displayed but I suggest you comment out the MeasureName just so it's quite clear what is being displayed e.g

Code: Select all

[LabelIndex2_Change]
Meter=STRING
;-> MeasureName=mIndex2_Change
MeterStyle= sTextRight 
FontColor=#ColorSteady#
x=#Col4XPos#
Text=[&mFormatPriceScript:format_price( [&mIndex2_Change] , 2 )]
My guess is that once we get some useable WebParserDump.txt files from you we are going to find that CNBC has updated the Price Change value but not the Price Value on every update.

No problem we can easily generate the current price from Opening Price +/- the Price Change but that seems to be putting the proverbial cart before the apparently comatose horse.