lavolp3 / MMM-AVStock

MagicMirror module for displaying stock price with Alphavantage API
MIT License
38 stars 18 forks source link

Show own purchase prices within mode ticker #31

Closed spitzlbergerj closed 3 years ago

spitzlbergerj commented 3 years ago

I have extended the ticker mode with the possibility to display my own purchase prices. Since the purchase prices don't change that often (at least for me as a not so active trader), I added them to the config.js as an array. When the purchase prices are displayed, they are colored red or green to make loss or gain visible.

ezar commented 3 years ago

may be interesting

lavolp3 commented 3 years ago

looks good. Can you add the change percentage against purchase price, ideally in the same line? Would be helpful as well. I see you mentioned profit/loss but I don't see anything in the code

spitzlbergerj commented 3 years ago

Hi, i will have a look at it this weekend and extend the pull request accordingly

spitzlbergerj commented 3 years ago

Now the total performance compared to the own purchase price can be displayed

spitzlbergerj commented 3 years ago

.... and the conflicts in the .js are solved

lavolp3 commented 3 years ago

Thanks. Strongly considering extending this to the table and the grid. If you want to do it, be my guest!

lavolp3 commented 3 years ago

I see that your purchasePrice performance is shown in total (105%) and not relative to purchase price (+5%) I think relative is a better indicator and would like to change that. What do you think?

spitzlbergerj commented 3 years ago

Many thanks for the merge. I only use the ticker (without ticker :-), so only static display as lines. I am currently working on a few other modules for my project CaravanPi. If there is time afterwards, I will have a look at this.

And yes, change the relation gladly. I've been thinking about it for a few days now, which is better. In my portfolio, for example, 105% is shown, but 5% seems now better to me.