achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
5.02k stars 273 forks source link

Total value not adding up correctly #107

Closed viperperidot closed 3 years ago

viperperidot commented 3 years ago

The total value is not adding up correctly when using the currency conversion.

I think what is happening is as follow:

The problem with this is that the numbers that are being summed up for each lot have already been converted, so you dont need to do another conversion with that number to get the total.

For example: Conversion set to CAD

Lot 1 value = $100 (CAD already converted) Lot 2 value = $200 (CAD already converted)

Now I think what happens is $300 is then converted from USD to CAD again giving an incorrect total value in the summary at the top of Ticker when the total should just display $300.

I have not looked at the code to verify this is what is happening but I ran the numbers manually and that is my guess as to what is happening.

achannarasappa commented 3 years ago

Thanks for helping to testing this

I've pushed a fix for #106 #105 and this issue in release v3.1.1. Have a look if you have a moment and let me know if that resolves the issue

viperperidot commented 3 years ago

fixed in 3.1.1, nice!