Bitcoin price predictionNew Cryptocurrencies

Build Your Own Stock Portfolio Tracker On Google Sheets

D:D▷0))) Price: =if(ISBLANK(A3),””,GOOGLEFINANCE(A3,”Price”)) Change%: =if(ISBLANK(A3),””,GOOGLEFINANCE(A3,”changepct”)/100) Change$: …



  1. Make sure to subscribe to my channel for more awesome content like this! I post new videos every single week!

  2. Did you go to school to learn Google sheets or are you self taught. I am trying to make a similar layout and I keep hitting obstacles and after about 50 hours of watching videos I'm stuck! great videos and good understanding, easy to follow, keep it up

  3. Thank you for a great explanation. I just created my own portfolio with this video.

    I am trying to do a small addition to this tracker. Currently my Realized gains are showing in Dashboard. But i do not know which ticker gave me how much profit. Is it possible to add another tab which shows the list of all closed positions with buy price, sell price, qty and profit ? Right now i need to search in my history to get those information.

    Thank you again for wonderful video.

  4. When I fill up Malaysian Stock code, googlefinance function (tab position, column D) couldn't appear the price. Its stated not applicable (#N/A)? For example, i have try both DNEX / KLSE:DNEX. Please, help me..

  5. Anyone knows how to solve the average issue if you've bought & sold the same share more than once? my average price is screwed up because i've had a few transactions for the same stock.

  6. When i add "Cash"(as deposit, not ticker) in the History tab, it reflects to my Positions list and think "Cash" is ticker. how can i stop this? thanks!

  7. I love your tracker and build one for myself. Questions: 1)for Dividend, what should I enter in the history tab under quantity column? If I enter "1", it adds to the total number of shares for that specific security. if I leave it blank, it does not add to the sum of dividend under dashboard. 2nd question, I tried to follow your logic and added a "fee" (for ADRs) in your coding, the same question for "fee", what should I do in the history tab under quantity? Thanks.

  8. the average.weighted function to calculate purchase price is not working when you buy, sell and then buy again.

  9. Hi there, I’m stuck on syncing my history to positions tab. Some of the tickers are missing. Any suggestions please?

  10. I try to build this, but i have a problem that when i debug and run, there is error which says security, actions, quantity, price is undefined
    and when i try to put it in the google sheets using myPositions function, its return #Error Value. i already put value in HistorySecurity, HistoryAction, HistoryQuantity, and HistoryPrice

  11. Thank you for posting this tutorial, I have tried following your instructions to create my own portfolio. However after i have typed the code, save run and entered it in the excel as MyPortfolio(History!B3:B1000,HistoryD3:D1000), instead of showering me the data, I got an Error showing Unknown Function ‘MyPortfolio”, may i ask if you know what the issue is?

  12. love your content however, I notice your script has not taken dividend inputs & DRIP inputs in the history tab into consideration & which is consequently producing wrong values (for those who have dividend & DRIP inputs in the history tab )in the position tab for the number of stocks that I own, this error in turn is making a mess all over the place, please help!!

  13. I've just learned that NVDA are doing a stick split this month. How do I amend my history tab to reflect this split?

  14. I right after we finish the script – MyPortfolio I ran it and it is not taking in the sheets. Sheet says Unknown Function. I think the script is not being applied to the sheet. How to fix it?

  15. Hello, thank you so much for sharing this video. It is great. I am having trouble with the command: =MyPortfolio(History!B3:B1000,History!D3:D1000). It is not recognizing it. I have reviewed the codes a thousand times
    , and I do not think I am missing anything. Could you please help me?

  16. In one of your video's, you made an improved version of this code; I can't seem to find this video though.
    A few days ago, I sold shares, but it messed up my portfolio. I receive the error:
    ReferenceError: Trades is not defined (line 33)

    If I put a "buy" in my history instead of a "sell", all is working fine.
    I suppose I messed up the code in line 33, but don't know where. Underneath, you'll find line 32 to 34 of this code.

    if (activeTrades != null){

    let sharesToSell = Number(Number(trades.shares).toFixed(precision));

    while (sharesToSell > 0){

    Can you or someone see why I receive that error?

  17. I have a new issue that I really hope you see. The Portfolio tab is now refusing to show any of the data from the History tab. It has broken for some reason and 100% useless now. What could have happened?

  18. Hello! I followed the instructions and the code also worked (got the same error message which you suggested to ignore). But when I called the function in cell A3 in my Positions tab, it didn't pull all the tickers from the History tab. Only a few came through and those also had incorrect values. But when I entered a makeshift transaction in the History tab to see if it gets detected in the Positions tab, it did work. Any ideas what may be going wrong?


  20. the script isnt working for me anymore

    TypeError: Cannot read property 'length' of undefined
    MyPortfolio @

    function MyPortfolio(tickers, values) {

    var total = []
    var sums = {}

    for(i = 0; i < tickers.length; i++){

    var t = tickers[i].toString()

    if(t != "Cash"){

    if(t in sums){
    sums[t] += Number(values[i])
    sums[t] = Number(values[i])

    for(var ticker in sums){
    total.push([ticker, sums[ticker]])
    return total

  21. I also got an error when I tried to put in the Myportfolio function under the Tickers. The issue was the spaces inside of the parentheses. Just delete them, I think there were only 2. Line 1 and Line 23. I hope this helps everyone that had the same issue as me!!

  22. Sir there is an mistake in these formula. Plz check it.

    Positions Tab:

    🔸Purchase: =if(isblank(A3),"",AVERAGE.WEIGHTED(FILTER(History!E:E,History!B:B=A3,History!D:D▶0),FILTER(History!D:D,History!B:B=A3,History!D:D▶0)))

    1/1/20 date purchase 10 qty of apple share @ 500.
    2/1/20 date sold 10 qty of apple share @ 600.
    3/1/20 date again purchase 5 qty of apple share @ 550.

    So in "position sheet" in price column the price of apple will show 525 (average of 500 & 550), but actually the price should be 550. Due to this it is affecting the accurate balance sheet.

  23. There is a mistake in purchase in position.
    E.g. in history sheet supposed you buy 10 pypl then sold 10 pypl then again buy 5 pypl. These record will be in history sheet, but in position sheet I want to see average cost of pypl which I'm holding currently not which I had bought and sold previous.

  24. Hey! I have prepared this Dashboard. Thanks a ton for that. But I am getting cash entry ino Positions tab . So the cash cell on Dash board does not show correct result. Can you guide me ?

  25. Noticed that the weighted average function used for avg price/share doesn't work for when you sell out of a position and then buy back in – because it's adding the price from when you first owned the share to what you own now. Thoughts on a work around for this?

  26. This is such a great video tutorial! Was super easy to follow and in a span of an hour or so I've built my Dashboard.
    The only issue I've faced, somehow "," symbol does not work for me in formulas, therefore they look like e.g. "=sumif(History!C:C;"Deposit";History!F:F)"
    But the rest is fine. Warmly reccomend!

  27. Why can't I make it? I always finish creating the script, the script data is unreadable. Is there a solution or step by step gradually to make it easier.? Thanks bro

  28. is it possible to automatically make the quantity for all Sell trades as negative in the history tab?

  29. Great video! Super helpful but I have a question, I think the weighted average formula didn't account for the sell amount of shares, so when we have stock dividends, the price is not calculated correctly

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button