It is currently April 27th, 2024, 8:41 am

Market Prices

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: February 20th, 2024, 2:57 pm Thanks so much for updating the skin. Before I install it, just wondering if there are any lines I need to add to format all displays (price, change, percent change) to limit decimal places to 2.
Sorry but I can't remember what of your requested changes were incorporated in the latest version of MarketPrices. I think the default for all Prices and Price Changes is set at two decimal places. Load it up and take a look but wait a few minutes before refreshing the skin if you have to make any changes.
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 20th, 2024, 2:45 pm I waited for the markets to open, ran the debug skin and confirmed that the RegExp suggested by Yingognito gave Prices consistent with those being shown on CNBC.com. I then made the changes to MarketPrices.ini refreshed the skin and found that my IP had apparently been blocked.
I'm banned.png

I then went back to an older version of MarketPrices.ini that used individual page reads for each stock and low and behold no more blocking. ‘Oh what a tangled web we weave/When first we practice to deceive...'

Latest version on DA incorporates the RegExp suggested by Yingognito and should be good to go. Just take a breath or five between loading and refreshing the skin.
That's curious, I don't have any problems for my "parallel" / "test" version of your skin (sorry for the visuals, it's not polished / finished yet, and obviously not meant for release):
Financial.jpg
Sure, I've been exclusively using the local .xml during building / replicating the skin (including creating the needed measures or number formatting via Lua, though done a bit differently), but it's my 3rd (manual, under the 10 minute interval) refresh since I saw your reply and it doesn't seem to have issues conecting or retrieving the response from the site. :confused:

In any case, the fact the regex works is good news. :thumbup:
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 »

Skin is working great. Am seeing up to 4 decimal places for some stocks in "Price Change". My recollection was that for some users, the investments they are tracking have micro changes and would require several decimal places to show relative movement.

This is what you suggested for "Price Change" formatting:

[LabelPrice_7]
Meter=STRING
; MeasureName=mIndex7_Price
MeterStyle= sTextRight | sColorSetGray
x=#Col2XPos#
Text=[&mFormatPriceScript:format_price( [&mIndex7_Price] , 2 )]

Is this still the best option?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

sk14 wrote: February 20th, 2024, 3:32 pm This is what you suggested for "Price Change" formatting:

[LabelPrice_7]
Meter=STRING
; MeasureName=mIndex7_Price
MeterStyle= sTextRight | sColorSetGray
x=#Col2XPos#
Text=[&mFormatPriceScript:format_price( [&mIndex7_Price] , 2 )]

Is this still the best option?
The [LabelPrice_7] meter displays the Price not the Price Change. If you want to limit the Price Change to two decimal places you need to edit the [LabelIndex7_Change] meter to be like this

Code: Select all

[LabelIndex7_Change]
Meter=STRING
; -->  MeasureName=mIndex7_Change
MeterStyle= sTextRight 
FontColor=#ColorSteady#
Text=[&mFormatPriceScript:format_price( [&mIndex7_Change] , 2 )]
x=#Col4XPos#
sk14
Posts: 25
Joined: February 9th, 2024, 7:21 pm

Re: Market Prices

Post by sk14 »

You're right. I pasted the wrong expression. I'll make the change you suggested.
Thanks again.
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: Market Prices

Post by emp00 »

@Mordasius: Thanks for the update wrt. to the "<last>" error as discussed in this thread! I noticed that you only updated the "Market Prices" but not yet the "MyPortfolioValue" skin on DeviantArt --> probably forgotten, you may consider to update this skin as well. I am using both skins (with some personal modifications) and I can confirm the RegExp-mod works for both, of course ;-)

Code: Select all

; RegExp=(?siU)<last>(.*)<\/last>
RegExp=(?siU)^.*?<last>(.*)<\/last>
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

emp00 wrote: February 24th, 2024, 4:33 pm @Mordasius: Thanks for the update wrt. to the "<last>" error as discussed in this thread! I noticed that you only updated the "Market Prices" but not yet the "MyPortfolioValue" skin on DeviantArt --> probably forgotten, you may consider to update this skin as well. I am using both skins (with some personal modifications) and I can confirm the RegExp-mod works for both, of course ;-)
I've updated the file on Deviant Art. I suggest you rename the ....Documents\Rainmeter\Skins\MyPortfolioValue folder before you download and install the new version. That should make it much easier to add any other changes you have made.
mook2007
Posts: 2
Joined: July 12th, 2023, 9:11 am

Re: Market Prices

Post by mook2007 »

Hi Mordasius,

my Currency Markets didnt update in a couple of days already... Your time permitting could you check whether any update is needed for your excellent tool?

Cheers
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

My Version=26-08-2021 seems to be up to date so perhaps you have to wait for the markets to open for the currencies you are tracking.
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: Market Prices

Post by emp00 »

Still working fine here as well, no issues.