RedKTrader

Simple Portfolio Tracker

RedKTrader Diupdate   
This is just a simple portfolio tracker that i started to play around with - i'm sure there are smarter ways to do this, but i chose the simpler way :) -- please feel free to use this, or consider it as a starting point to your own indicator.

i will come back later and add some more stuff once i get time. for example, show the total value, recent change, P&L % ..etc

So the simple idea is to track a portfolio of few positions and watch how the total portfolio and the PnL changes over time as the price of the individual holdings move up and down. it can be added to any chart.

The code is currently set to track 5 positions - settings allow to enter if the positions is used or not, symbol, amount and cost price..

** note: more positions can be added by editing the code and copying and pasting the marked "position block" that contains the input statements and the calculations, then changing/replacing the position identifier (_1, _2, ..etc) in all variables with new number..
--- don't forget to add these extra positions you insert in the code to the formula lines that calculate the totals

i tried to make this as easy as possible in the code. the code includes a sample portfolio as default values just to help "demo" how this works

the input is made easy, thanks to the recent addition of the "inline" feature in the input() statement

i don't know if some traders will find this useful ?? or if more about how to use it is needed.. let me know in the comments.. as i mentioned, i was just playing with the idea over the weekend so didn't really put a lot of work into it.

Credits and thanks to @boji1 for inspiring this :)




Catatan Rilis:
- Support up to 10 positions per portfolio
- added the Summary (info) box with key portfolio stats all up and for current bar based on the chart timeframe
- some other code clean-ups

Next
- i'd like to include a way to add some "free cash". most position traders will always keep free cash in the account
- change the code to use arrays - will make things a lot easier and cleaner
- refine the infobox and add some more portfolio stats
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?