Sorry it didn't work out. I must admit I didn't test the above solution in MarketPrices.ini as I've had my IP banned in the past when repeatedly making quick changes and then refreshing the skin. To avoid getting blocked I used a dummy skin with [mIndex1_Price] defined as a string measure using String=#PriceString1#. This is what caused the problems you were having.I followed your instructions line by line ...and I have to report it does not work.
[cIndex1_PriceCalc] was yielding a Calc Extra Operation error because the string value of [mIndex1_Price] was null until the WebParser had sucked the value from CNBC.com. I suspect that all you need to do is add DynamicVariables=1 so that value changes when [mIndex1_Price] does, comme ci
Code:
[cIndex1_PriceCalc]Measure=CalcFormula=[mIndex1_Price]DynamicVariables=1
As to your other points:
1) I completely agree with your suggestions to add the DecPlacesXX variables to Stocksymbols.inc and put FormatPrice.lua in the @Resources subfolder. I didn't do this because I wasn't testing the solution using MarketPrices.ini.
2) Yes you will need to modify the measure [LabelPrice_^1^] in MetMeaTemplate.inc once the fix is working. You will also need to modify the [LabelPrice_^1^] meter in MetMeaTemplate.inc.
3) Yup, the FormatPrice.lua script will keep the thousands separator commas no matter what you set as the number of decimal places. You can even display a less precise price by using a negative number of Decimal Places.
Statistics: Posted by Mordasius — Today, 3:54 am