TradingView
BOB_cat
17 giu 2022 11:09

My_Portfolio 

AXS / TetherUSBinance

Descrizione

Displays all time high/low/mean prices and average cost with lines; and the price changes relative to the average cost in percentages.
This does not calculate average cost. This is just a fast way of viewing the current situation of one's portfolio.
Parities invested in and average costs for them have to be manually entered in the settings or by editing the script.
Should work with all parities.

Note di rilascio

Switch to using switch statement instead of nested if statement.

Note di rilascio

Made the code more readable, and the settings window prettier.
Commenti
web545web
Excellent work. Thank you!
It has become very convenient to indicate the price in cryptocurrency and see what income or loss.

Tell me, is it possible to make cryptocurrency averaging in the settings ?, so that you can enter several different prices in one coin
BOB_cat
@web545web, No, that's not possible in this state of the script. I'm using Google Sheets as my ledger where I calculate my average cost. I wrote this script as a supplement to that.
But, instead of entering the average price for a pair manually, it is possible to calculate it inside the script and feed the result to where the manual input would be. I might do that in the future. I don't know how to expose this functionality to the settings menu though.
Thank you.
Altro