OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniScripts
Read Weights from internal list
Last Activity 9/1/2024 11:18 PM
2 replies, 560 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Boris Lund

Regular
2525
Posts: 59

Joined: 12/9/2021

User Profile
 
Subject : Read Weights from internal list
Posted : 1/10/2022 11:37 AM
Post #31828

'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]

Attached file : ReadWeigths.txt (2KB - 178 downloads)

^ Top
Boris Lund

Regular
2525
Posts: 59

Joined: 12/9/2021

User Profile
 
Subject : RE: Read Weights from internal list
Posted : 1/10/2022 12:29 PM
Post #31829 - In reply to #31828

Here is the SP&100 list

Attached file : SP100 and Shares.txt (0KB - 183 downloads)

^ Top
Boris Lund

Regular
2525
Posts: 59

Joined: 12/9/2021

User Profile
 
Subject : RE: Read Weights from internal list
Posted : 1/10/2022 9:01 PM
Post #31830 - In reply to #31829

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.

Attached file : Correlated Weighted Direction.txt (4KB - 177 downloads)
Attached file : CorrelatedWeightedDirectionPlot.png (59KB - 190 downloads)

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.