PureBytes Links
Trading Reference Links
|
I have Metastock 8.0 EOD; recently upgraded to 8.01. I am trying to create a "momentum" type function to use in the System Tester. I have learned lots of methods to write complex formulas by reading suggestions on this forum, but I can't figure this one out. Perhaps someone may have solved this (or something similar) and can provide some guidance.
Here is what I want to do:
1. I have a list of 30 stocks, that never change.
2. Every month (or week), I want to rank the Price ROC for each of the stocks over a fixed time period (for example the past 40 weeks).
3. I want to then SELL the three stocks that I own. (Assume I bought 3 to get started)
4. I then want to BUY the three stocks that have the greatest positive ROC over the fixed time period.
5. I want to repeat steps #2 through #4 every month (week) for the length of my System Tester backtest period.
6. At the end of the backtest, I want to determine the $$ gain/loss of this system, for the time period.
I think I can use the Security() function in combination with the ROC () function to create a unique variable name for each of the thirty stocks. Then, following an example I saw on this(?) forum about finding the maximum of a range of MA's, I should be able to "brute force" and find the stock with the highest ROC, by using the Max() function, and compare all of the unique variables one pair at a time, until I have the highest one, the second highest, and the third highest.
But then I am stuck. Once I find these top three, I can't determine how to get the System Tester to BUY these top three each month, nor can I determine how to get the System Tester to SELL the three that I already have before I perform the BUY.
Can someone who has more experience provide me with some guidance? It surely would be appreciated!
Harry
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/CNxFAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|