[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] System Tester Problem



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 thought I could 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 tried to "brute force" it 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 had the stock with the highest ROC, the second highest, and the third highest.

But I couldn't get that to work. I could find the maximum Max() OK, but I could never get the System Tester to buy that specific stock (it bought them all: just once, and never again), and I could also never determine how to get System Tester to perform the SELL function first, and then BUY.

Can someone who has more experience provide me with some guidance? It surely would be appreciated! I am very frustrated. (I can get the results I need just fine using the Explorer, but that takes manual manipulation to rank the securities, and there is no buy or sell function in Explorer.)

Harry


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/