Boris Lund![]() Regular ![]() ![]() Posts: 59 Joined: 12/9/2021 ![]() | 'Reads from listed symbols and their outstanding shares. 'Calculates Market Cap for each and sums it up in a Total Market Cap. 'Second run it calculates each weight: Price*Shares / Total Market Cap Example is done with a very simple list for verification. SymbolShares = "AAPL,1,ABBV,2,ABT,3," From the DebugMSG AAPL 170.33 Shares 1 MarketCap 170.33 Weight 0.2012524 ABBV 135.15 Shares 2 MarketCap 270.3 Weight 0.3193714 ABT 135.24 Shares 3 MarketCap 405.72 Weight 0.4793762 MarketCapTotal 846.35 Now it is possible to look at several symbols summarized, weighted or how many did x or y. Example, how many from this list have hit their highest high within x-peiods (from the fear/greed index) Thank you Jim for the pointers :) [Edited by Boris Lund on 1/10/2022 11:41 AM] ![]() |