To be truly honest, I just figured I would try pressing the 'easy' button and 
post here to see if anyone had coded this already (and was willing to share).
The concept is to take the S$P100 index and use troughbars(), peakbars(), and 
zig() to create reference points on the index. 

Then use those reference points to compare the relative performance of each 
stock in the index against the index itself. 

Specifically:
Measure the percentage increase/decrease, ROC(), of the index from one peak to 
the next trough (and vice-versa). Then use the same peak and trough of the 
index to measure the percentage increase/decrease of an individual stock. The 
result is to compare each stock's performance to the index as the index is 
hitting pivot highs and lows. 

Simple enough. I'll surely be able to figure this out on my own but it sure 
would be nice if someone could save me a bit of elbow grease.

I figure the barindex() function will be a useful tool for this but haven't 
worked out the details.

  Pete  :-)

Reply via email to