It is currently October 18th, 2021, 9:54 am

Market Prices

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

Market Prices

Post by Mordasius »

Market Prices.jpg
This skin has been on Deviant Art for a couple of years. There has been an increase error reports and requests for modifications in recent times so I've decided to post it here where it is much easier to reply with suggestions and snippets.

To get the ball rolling here are some clarifications on the UserAgent string and Symbols

A) UserAgent string --- As of February 2021 it doesn't seem to matter what you have as the UserAgent string. Everything works just fine with whatever you put there but it is best to put something (even "") just to be sure.

B) Symbols --- Find Symbols by going to http://www.cnbc.com then entering the stock/index name you want in the search box. When the page opens look in the top-left of the address window and make a note of EXACTLY what comes after https://www.cnbc.com/quotes/ if there is a Period (.) after the backslash (/) you MUST include it. or it will not work.

eg. https://www.cnbc.com/quotes/.SPX --> Symbol3=.SPX

If there is no period (.) DO NOT add one or it will not work.

eg. https://www.cnbc.com/quotes/AAPL --> Symbol4=AAPL
You do not have the required permissions to view the files attached to this post.
jghojh
Posts: 6
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Hi, I'm trying to edit the ini file so that the ticker fits in my taskbar and only include the price of the stock. To do this I would need a horizontal layout of 3 stocks max in a column. After some edits, I was able to get this setup, but unable to figure out how to split up the stocks to 3 columns and to delete the empty space on top after I removed the title/icon. Any advice/tips? Thank you.

Image

Here is my current .ini file:

Code: Select all

;  ######################################################
;  #    MarketPrices-showing eight stocks/indexes       #
;  #    Prices from CNBC.com                            #      
;  ######################################################

[Rainmeter]
MiddleMouseUpAction=!Refresh
AccurateText=1
ContextTitle="-> Edit Stocks/Labels"
ContextAction=["#@#CNBC-8.inc"]

[Metadata]
Author=Mordasius
Name=8quotes-Small
Version=18-01-2021
Information= Shows the price and change in price for eight stocks or market indexes. Prices are from http://www.CNBC.com | Right-click on the skin -> Edit Stocks/Labels - to change the stocks being shown

[Variables]
TableTitle=
UpdateQuotes=600
TextFont=Calibri
ColorPair-Quote=cccccc
ColorSteady=cccccccc
ColorUp=00FF00cc
ColorDown=FF0000
FontHeight=9
ExpQuote=(?siU).*Intangible/FinancialQuote.*"name":"(.*)".*"price":"(.*)".*"priceChange":"(\+|\-?.*)".*"priceChangePercent":"(\+|\-?.*)"
@Include=#@#CNBC-8.inc
PanelWidth=178
PanelHeight=133
Col1XPos=10
Col2XPos=172
Col3XPos=188
Col4XPos=244
Col5XPos=300
Row1YPos=31
Yspace=12r

;___________________________________________________
; STYLES
[sTextLeft]
FontFace=#TextFont#
StringAlign=LEFT
FontSize=#FontHeight#
StringStyle=BOLD
StringEffect=SHADOW
FontColor=#ColorPair-Quote#
FontEffectColor=1a1a1a
MouseOverAction=[!SetOption "#CURRENTSECTION#" FontColor 66ccff] [!Update]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" FontColor ""] [!Update]
y=r
W=138
ClipString=1
Antialias=1
Group=2

[sTextRight]
FontFace=#TextFont#
StringAlign=RIGHT
FontSize=#FontHeight#
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=000000
DynamicVariables=1
y=r
Antialias=1
Group=2

[sColorSet1]
FontColor=#ColorPair-Quote#
;____________________________________________
[InfoIndex1]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol1#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex1_Price]
Measure=WebParser
Url=[InfoIndex1]
StringIndex=2

[mIndex1_Change]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=3

[mIndex1_ChangePer]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=4

[mIndex1_UpDown]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex2]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol2#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex2_Price]
Measure=WebParser
Url=[InfoIndex2]
StringIndex=2

[mIndex2_Change]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=3

[mIndex2_ChangePer]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=4

[mIndex2_UpDown]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex3]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol3#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex3_Price]
Measure=WebParser
Url=[InfoIndex3]
StringIndex=2

[mIndex3_Change]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=3

[mIndex3_ChangePer]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=4

[mIndex3_UpDown]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex4]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol4#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex4_Price]
Measure=WebParser
Url=[InfoIndex4]
StringIndex=2

[mIndex4_Change]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=3

[mIndex4_ChangePer]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=4

[mIndex4_UpDown]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________

[InfoIndex5]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol5#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
DynamicVariables=1
UpdateRate=#UpdateQuotes#

[mIndex5_Price]
Measure=WebParser
Url=[InfoIndex5]
StringIndex=2

[mIndex5_Change]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=3

[mIndex5_ChangePer]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=4

[mIndex5_UpDown]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex6]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol6#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex6_Price]
Measure=WebParser
Url=[InfoIndex6]
StringIndex=2

[mIndex6_Change]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=3

[mIndex6_ChangePer]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=4

[mIndex6_UpDown]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=3

;____________________________________________
[InfoIndex7]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol7#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex7_Price]
Measure=WebParser
Url=[InfoIndex7]
StringIndex=2

[mIndex7_Change]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=3

[mIndex7_ChangePer]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=4

[mIndex7_UpDown]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex8]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol8#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
DynamicVariables=1
UpdateRate=#UpdateQuotes#

[mIndex8_Price]
Measure=WebParser
Url=[InfoIndex8]
StringIndex=2

[mIndex8_Change]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=3

[mIndex8_ChangePer]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=4

[mIndex8_UpDown]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
; 	METERS
[QuotesBackground]
Meter=Image
SolidColor=00000044
W=#PanelWidth#
H=#PanelHeight#
UpdateDivider=-1
Group=2

[InnerBackground]
Meter=IMAGE
X=3
Y=3
SolidColor=000000dd
W=(#PanelWidth#-6)
H=(#PanelHeight#-6)
UpdateDivider=-1
Group=2
;________________________________________
;---  Quote Meters
[LabelIndex1]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol1#
X=#Col1XPos#
y=#Row1YPos#
Text=#Nindex1#

[LabelPrice1]
Meter=STRING
MeasureName=mIndex1_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex2]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol2#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex2#

[LabelPrice2]
Meter=STRING
MeasureName=mIndex2_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex3]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol3#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex3#

[LabelPrice3]
Meter=STRING
MeasureName=mIndex3_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex4]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol4#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex4#

[LabelPrice4]
Meter=STRING
MeasureName=mIndex4_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex5]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol5#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex5#

[LabelPrice5]
Meter=STRING
MeasureName=mIndex5_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex6]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol6#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex6#

[LabelIndex6_Price]
MeasureName=mIndex6_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex7]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol7#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex7#

[LabelIndex7_Price]
MeasureName=mIndex7_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex8]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol8#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex8#

[LabelIndex8_Price]
MeasureName=mIndex8_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
User avatar
Mordasius
Posts: 1074
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

Horizontal-1.jpg
Is this the sort of thing you are looking for?
You do not have the required permissions to view the files attached to this post.
Last edited by Mordasius on February 15th, 2021, 1:53 am, edited 2 times in total.
jghojh
Posts: 6
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Yep! Preferably I would have it set to the same text size and white font color as the regular style so it can fit 3 stocks in a column on the Windows 10 taskbar with the transculenttaskbar skin. Pardon my bad Microsoft paint skills, but this is the endgoal for me:
Image
User avatar
Mordasius
Posts: 1074
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

horizontal-2.jpg
How about this?

You can edit the font size, colours, spacings and a bunch of other stuff in the MarketPrices-Horizontal.ini file. Change HideColoredPrices=0 to HideColoredPrices=1 to toggle the up/down/steady colour for prices.

MarketPrices-Horizontal_150221.rmskin
You do not have the required permissions to view the files attached to this post.
jghojh
Posts: 6
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Exactly what I was looking for, thank you so much for the help! :D
teiji
Posts: 5
Joined: April 9th, 2021, 5:15 pm

Re: Market Prices

Post by teiji »

Hello, thank you for making such a nice skin.

I'm trying to make the background transparent. Could you tell me how to do that?

Edit: Nvm, I just deleted [QuotesBackground] and [InnerBackground] meters, and it's fully transparent. Don't know if that's the correct way, but it works. lol
User avatar
SilverAzide
Rainmeter Sage
Posts: 1615
Joined: March 23rd, 2015, 5:26 pm

Re: Market Prices

Post by SilverAzide »

teiji wrote: April 9th, 2021, 5:17 pm Hello, thank you for making such a nice skin.

I'm trying to make the background transparent. Could you tell me how to do that?

Edit: Nvm, I just deleted [QuotesBackground] and [InnerBackground] meters, and it's fully transparent. Don't know if that's the correct way, but it works. lol
No, that's not the proper way to do it. The proper way would have been to simply change the color of the background. The skin code already set the colors to partially transparent, so all you needed to do was make them fully transparent. To do that, on the meters you deleted, you just had to set the SolidColor options to "0,0,0,1" (which is "R,G,B,A" format) instead of "00000044" and "000000dd" (which are in "RRGGBBAA" hex format, a format that's a little harder to understand maybe).
Gadgets Wiki GitHub More Gadgets...
teiji
Posts: 5
Joined: April 9th, 2021, 5:15 pm

Re: Market Prices

Post by teiji »

SilverAzide wrote: April 9th, 2021, 5:49 pm No, that's not the proper way to do it. The proper way would have been to simply change the color of the background. The skin code already set the colors to partially transparent, so all you needed to do was make them fully transparent. To do that, on the meters you deleted, you just had to set the SolidColor options to "0,0,0,1" (which is "R,G,B,A" format) instead of "00000044" and "000000dd" (which are in "RRGGBBAA" hex format, a format that's a little harder to understand maybe).
That works! And thanks for the explanation.
User avatar
JoeyStyles
Posts: 2
Joined: February 9th, 2021, 9:36 am
Location: Virginia

Re: Market Prices

Post by JoeyStyles »

I've recently started to use rainmeter and this skin is very nice looking. I noticed it several months ago but downloaded it only yesterday. I'd also like to thank you for this useful guide. I didn't know how to set up the setting correctly, so you helped me a lot. Now I can follow the actual market prices and analyze the situation. I've been trading for not so long time, so sometimes I struggle to make good decisions. But recently I've found the forextb.com platform where experts post daily market analysis and economic articles. But still, I notice that my knowledge increases day by day, and that fact makes me happy.