에디터즈 픽OPEN-SOURCE SCRIPT

RedK Portfolio Tracker [Table Version]

업데이트됨
RedK Portfolio Tracker is a simple tool that enables a trader to monitor and track a portfolio of up to 10 holdings (+ free cash) in real time - directly on the chart

Now that we have tables in Pine, this is a table version of my previously published Portfolio Tracker

- The table works better in visualizing the various table elements (title row, column labels..etc), and is more flexible in allowing color coding of gain/loss. for many traders, myself included, these simple visual signals are valuable in helping timely trading decisions.

I'll come back and improve this script as i'm really enjoying the ability to track things this way - if you liked this and want to receive the updates, please flag / favorite it below and you'll get notified when i publish new versions.

Some new features for the table version:
- ability to change default color of various table elements (text, default background, title background, gain/loss color, border..etc)
- ability to change the text size to suit your monitor and visual preference
- ability to change table position

The "portfolio-specific" inputs are similar to the previous version - we get the ability to enter up to 10 positions, entry price and qty, then also add the free cash

- also a change from prior version, this table will plot by default on the price chart, but will have no scale - the portfolio ploy itself will also show (blue/orange stepping line) but the PnL plot will be hidden by default -- how we plot the portfolio & P/L is possibly one of the areas for improvements for next versions - also thinking of other adding valuable data i track in my own trading, like the quarterly dividends for the held positions .. we'll see - this is just a start

hope some will find this useful. feel free to comment.
릴리즈 노트
- Brought back the "Value of Positions" and added the "Return on Positions" rows
- Proper distinction between Total P/L % (includes the free cash in the calculation) vs the "Return on Positions" which only looks at cost of positions vs "current value" - please note some brokers may have slightly different ways of calculating/naming these values - I'm sticking to how i see most brokers do this.

- sorry for showing negative values - just want to validate/show the dynamic color change for +ve vs -ve values ;)
릴리즈 노트
v3 adds few changes mainly to enable tracking of short positions when needed
- separate "Return on Positions" from PnL - wanted to see these values separately to validate calculations were done properly if short positions are held
- separate "Portfolio Summary" and "Portfolio Performance" in different sections. Added the "Initial Capital" line
- maybe later we can separate short and long positions each in their own columns to avoid the confusing P/L math :)
- Please note, when we short, we should include the cash proceeds of the short position in the "Cash" entry in the settings.

the example below shows an example of a portfolio with one short position (sold 1,000 NKLA @ $20) - and how that would reflect on the Portfolio Table.

스냅샷
릴리즈 노트
V4 adds summary of quarterly dividends for the positions in the portfolio - Been eager to do this for sometime :)
- note that the qtrly dividend yield is relative to initial capital

- also all plots are now hidden by default, except the portfolio table itself
- few other clean-ups
- Sample chart above shows how the table colors can be changed to suit user preference - you don't have to use mine :)
릴리즈 노트
v5 Introduces a new dynamic "Target Tracker" section - and cleans up the table a little further:
- The Portfolio Tracker will only show when a target is set in the indicator settings (check box), and target needs to be > zero
- When a target is set, we really want to track against the 100% value, so i kept separate rows for PnL as "percent of target", and the PnL "variance to target" (VTT) - which shows the gap from our current PnL value above of below the 100% target value. Traders will differ in how they track their PnL against a target so both values are available.
- removed redundant PnL row

couple of other trading metrics i track are related to PnL Run Rates (yearly, monthly, weekly) -- not sure if others are interested in bringing these too - but they will require some date entry and manipulation .. so i'm not really sure. let me know.
릴리즈 노트
v5.1
- fixed a bug where the dividend table breaks for instruments with no dividends data (thanks to remcoros for feedback)
- added an option to the settings to show / hide the dividends section.
- in consistency with the target section, for the dividends section to appear, the option to show the dividends section should be enabled *AND* quarterly dividends amount for the current portfolio should be > $0
릴리즈 노트
v6.0 Changes:
- Upgraded to Pine v5
- Supports crypto positions: changed the way dividends are calculated to avoid issues with crypto positions (thanks for the feedback on this) - big thanks to our Pine Wizards for their many advices.
- Some code clean-ups
릴리즈 노트
v7.0 changes:
- code optimization & streamlining, some variables do not need to calculate on each bar. Table should load slightly faster
- default position of table changed to lower right - makes it easier to identify this version vs prior ones.
PNLportfolioPortfolio managementpositionmanagementredktableTrend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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

면책사항