RedKTrader

Simple Portfolio Tracker

RedKTrader 업데이트됨   
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 :)




릴리즈 노트:
- 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
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?