Optimus:I want to identify a swing high -- a high where there are at least 5 lower highs than the swing high bar high and at least 5 lower lows that the swing high bar low on either side of the swing high bar. The tricky part is they do not have to be consecutive?
I think you will find the forum.dll variable sum function will help you out here; or you could use a count and reset system which is a little more complicated, but not impossible.
Hope this helps.
wabbit
MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
For custom MetaStock programming : http://www.wabbit.com.au
My SkyPE status : 
My SkyPE account : wabbit.com.au