There are two ways to test for the chart periodicity. Using MSFL you
can run a relative slow and complicated series of formulas to make the
discovery. It works most of the time, but on lesser traded commodities
it (allegedly) occassionally throws back false positives and true negatives. (I don't use this method myself so cannot guarantee the accuracy of any results)
The other option is to write an external function as the information
you are seeking is already available to these external library
functions and extracted with absolute minimum error.
Hope this helps.
wabbit
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
Edsgar W. Dijkstra
MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC C, 11 PRO w/QC & MDK
For custom MetaStock programming : http://www.wabbit.com.au
My SkyPE status : 
My SkyPE account : wabbit.com.au