It is currently December 6th, 2022, 2:27 pm

Market Prices

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

Re: Market Prices

Post by Mordasius »

vuryal wrote: October 24th, 2022, 5:41 pm I would like to have the "Invested" and "Today's Gain/Loss" columns show as USD with 2 decimal points.
The quickest way to do this is to open MyPortfolioValue.ini, scroll down to [sTextRight] around line 38. Then add a line with NumOfDecimals=2. The complete [sTextRight] will now look like this:

Code: Select all

[sTextRight]
FontFace=#TextFont#
StringAlign=RIGHTCENTER
FontSize=#FontHeight#
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=000000
y=r
Antialias=1
DynamicVariables=1
NumOfDecimals=2
The downside is that the Overall Gain/Loss will now also be shown with two decimal places. This can be overcome but it will involve a lot more changes.
vuryal
Posts: 2
Joined: October 24th, 2022, 5:38 pm

Re: Market Prices

Post by vuryal »

That is perfect. Thank you!!
3l3phant
Posts: 3
Joined: November 22nd, 2022, 1:28 pm

Re: Market Prices

Post by 3l3phant »

I was wondering if there was a way to extend the number of decimal places the My Portfolio skin can track? For example we own 0.032635 shared of Amazon (seriously) and similar with a few other stocks. It's showing up as 0 shares (believe it or not we actually see earnings for such a small amount). I tried the instructions in the previous post but it doesn't seem to make a difference.

BTW, the widget is incredibly useful! Thank you for taking the time to create it.

-3
User avatar
Mordasius
Posts: 1099
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

3l3phant wrote: November 22nd, 2022, 1:31 pm I was wondering if there was a way to extend the number of decimal places .......
Yes it could be done in a similar way to that described above but going up to six decimal places will make a real mess of the table layout. You would have to increase the number of units column with by around sixty pixels as the increased number of decimal places would be shown for all the stocks you hold.

BTW: with the default two decimal places you should see 0.03 rather than 0.00.
3l3phant
Posts: 3
Joined: November 22nd, 2022, 1:28 pm

Re: Market Prices

Post by 3l3phant »

Thank you Mordasius. I copy/pasted the code you provided, and does display 0.00, but not 0.03. I tried extending to 3 places, but it just shows 0.000. Any suggestions?
User avatar
Mordasius
Posts: 1099
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

3l3phant wrote: November 22nd, 2022, 1:31 pm For example we own 0.032635 shared of Amazon... It's showing up as 0 shares
I'm sorry I didn't read your post properly / remember what the skin was supposed to display. The MyPortfolio skin does not display the number of shares you own. It displays the amount you invested which equals the number of units you bought multiplied by the price you bought them at.

So for example if you bought your 0.032635 Amazon shares in December 2019 at a price of 89.32 per share you would enter the following in MyStockCodes.inc:

Code: Select all

Symbol1=AMZN
Units1=0.032635
BuyPrice1=89.32
This would show '3' in the 'Invested' column. Surely this is close enough to $ 2.9149582.
3l3phant
Posts: 3
Joined: November 22nd, 2022, 1:28 pm

Re: Market Prices

Post by 3l3phant »

Gotcha! Thank you so much for taking the time to explain (and for an amazing skin!) Have an fantastic holiday season :)