You can see the [mIndex2_TotalChangeAbs] value is correct at 204:
Portfolio.inc:
Code: Select all
Nindex2=C3AI
Symbol2=AI
; Total of your holdings for this stock
Holding2=15
; Below is the investment buy-ins listed one-by-one, to track total $ and % change of account
Investment2Cost1=967.20
;Total of all investment buy-ins for this stock
TotalInvestment2 = #Investment2Cost1#
Code: Select all
[InfoIndex2]
Measure=WebParser
URL=https://www.cnbc.com/quotes/?symbol=#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_PriceNum]
Measure=String
String=[mIndex2_Price]
DynamicVariables=1
[mIndex2_Value]
Measure=Calc
Formula=( [mIndex2_PriceNum:] * #Holding2# )
RegExpSubstitute=1
Substitute="^(\d{1,3})(\d{3})(\d{3})$":"\1,\2,\3","^(\d{1,3})(\d{3})$":"\1,\2"
DynamicVariables=1
[mIndex2_TotalChange]
Measure=Calc
Formula=Round(( mIndex2_Value - #TotalInvestment2#),0)
[mIndex2_TotalChangeAbs]
Measure=Calc
Formula=Abs(mIndex2_TotalChange)
[Label_TotalChange2]
Meter=STRING
MeterStyle=sTextRight
FontColor=#ColorSteady#
x=#Col9XPos#
[TotalChangeColor2]
Measure=Calc
Formula=[mIndex2_TotalChange]
IfAboveValue=0
IfAboveAction=[!SetOption "Label_TotalChange2" "FontColor" "#ColorUp#"] [!SetOption "Label_TotalChangePer2" "FontColor" "#ColorUp#"] [!SetOption "Label_TotalChange2" "Text" $[mIndex2_TotalChange]]
IfEqualValue=0
IfEqualAction=[!SetOption "Label_TotalChange2" "FontColor" "#ColorSteady#"] [!SetOption "Label_TotalChangePer2" "FontColor" "#ColorSteady#"] [!SetOption "Label_TotalChange2" "Text" $[mIndex2_TotalChange]]
IfBelowValue=0
IfBelowAction=[!SetOption "Label_TotalChange2" "FontColor" "#ColorDown#"] [!SetOption "Label_TotalChangePer2" "FontColor" "#ColorDown#"] [!SetOption "Label_TotalChange2" "Text" -$[mIndex2_TotalChangeAbs]]
DynamicVariables=1
Any ideas?