| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Feature Suggestions » Thread: Feature Request: Be able to use data of other stocks or indices |
|
Total posts in this thread: 4 |
[Request a Feature] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
hyper
Advanced Member
|
There should be a way to reference another stock so that we can do comparisons with other stocks or ETFs. The next step is then to be able to reference the indices in the same manner as referencing other stocks. A simple example of how this could be applied is to specify in the buy rules to only buy stocks if the S&P 500 index is above its moving average. More specific industry or sector indices could also be used in place of the general S&P 500 index. In Metastock, we can reference another security using the Security() function: Here are some examples so that you can see the syntax: Security("$SPX",C) gives the most recent close value of the S&P 500 index. Mov(Security("$SPX",C),20,E) gives the 20-day exponential moving average of the close values of the S&P 500 index. HHV(Security("$SPX",H),20) gives the highest value of the high of the S&P 500 index over the previous 20 days. View the feature request here. |
||
|
|
hyper
Advanced Member
|
In Metastock syntax, this would look like: Security("$SPX",C) > Mov(Security("$SPX",C),200,S) and you would put something like this in the buy rules in a Portfolio123 simulation/portfolio/screener. |
|||
|
|
jcbrick
Member UNITED STATES Joined: Feb 4, 2007 Posts: 19 Status: Offline |
I've been considering writing about this for some time. It's a sterling request and could allow users to guage the broader impact of the market rather than merely the already provided Industry indicators. I'd also like to see the ability to use technicals on indices or market indicators such as within an Eval statement. Jon |
||
|
|
marco
|
Please see the function GetSeries() which can be used in many TA functions ---------------------------------------- Portfolio123 Staff |
||
|
| [Show Thread Printable Version] |