Invalid Integer numbers as paramenter

 
The attached indicator (MACD Divergence) shows an error called "invalid integer number as parameter 2 for indicator call function.

And, after a little search here, in the web site, I can´t find any help about that error.
Files:
 
string timeFrame=0;

Period parameter cannot be a string, integer only
 
Thanks.

Now it should be fixed.

Well, at least works ok.
Files:
Reason: