OmniTrader Professional Forum
-
OmniScripts
Read Weights from internal list |
^ Top | ||
Boris Lund![]() 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 :) ![]() | |
^ Top | ||
Boris Lund![]() Posts: 59 Joined: 12/9/2021 ![]() | Here is the SP&100 list ![]() | |
^ Top | ||
Boris Lund![]() Posts: 59 Joined: 12/9/2021 ![]() | Correlated Weighted Moves. An attempt of weighing the price movement of the spy by the total correlation of the underlying symbols. The idea being that the more correlated the underlying signals are, the more significant a directional move is. It became clear that using weights was the same as just using the top 10 symbols. So no need to read all 100 into the loop. 100 symbols on 100 bars is too much on RT. But room to play around with different setups. The plot shows price difference from yesterday so green>0 shows an upward price move. Weighted by the total correlation. ![]() ![]() |