Dear All,
The Portfolio() function is now available in buy/sell rules as well as in the screener. It returns true when the stock being analyzed in the rules is a holding in other specific portfolio(s). A good use case for this functions is when multiple strategies are used to avoid buying “duplicates”.
The function was also moved, it is now located in MISC->Group->Portfolio. Below is the documentation. Let us know of any issues or feedback.
Thank You.
Portfolio(id1 [,…,id10])
Return TRUE if stock being analyzed is held in the portfolio(s). Use either the portfolio name in quotes, or the numerical id. This function is not point-in-time: it only looks at the current holdings of a portfolio or the last holdings of a simulation.
Examples
Screen for stocks in the universe that are being held in either portfolio “My Port” or the portfolio with the unique id 1230
Portfolio(1230 , “My Port”)=TRUE
Screen for stocks that are held in both portfolios “My Port” and id 1230
Portfolio(1230 ) AND Portfolio (“My Port”)
NOTE: Only portfolios owned by you can be used as parameters