|
Cren Soppelsa wrote:
> Hi all, I downloaded the following file: TechTradeTool
>
> http://www.mathworks.com/matlabcentral/fileexchange/3806-techtradetool
>
> I tried to use it, but starting "Plot Trading System" button gives me
> the following error message:
>
> ??? Error using ==> tsmovavg
> Invalid number of inputs.
>
> Error in ==> movAv at 3
> tsOut = tsmovavg (tsIn, 's', (iDays-1), 0,1);
> What's the problem? How can I solve it?
It appears that the interface for tsmovavg() has changed over the years.
I am not certain, but comparing documentation of the old interface,
http://www.math.carleton.ca/old/help/matlab/MathWorks_R13Doc/toolbox/ftseries/tsmovavg.html
against the new
http://www.mathworks.com/access/helpdesk/help/toolbox/finance/tsmovavg.html
the documented difference is that the "lead" parameter has been dropped. In
the call there, "lead" would correspond to the (iDays-1) expression.
However, if you examine what the parameter does in the old interface and
compare to the new interface, the semantic meaning of what used to be called
"lead" _seems_ to be the same as what is now called "lag", and there does not
appear to be any equivalent to what was formally called "lag". The "lag" value
that is coded there is the 0, so what used to be called "lag" was effectively
not used before.
If I am correct in my interpretation of the wording of the new documentation,
the implication is that you should be able to fix the code by deleting the 0,
out of the tsmovavg call in the movAv routine.
It would not surprise me if you encounter other similar problems, but it's
worth a shot.
|