-- In [email protected], "loveyourenemynow"
<[EMAIL PROTECTED]> wrote:

> I need to optimize on the functions, so their definition should change
> for different optimization parameter, and since I cannot define them
> within if statements I don't see how I could achive whar I want using
> your idea.

I think Graham mentioned to parameterize your functions so that within
the function you can have a totally different implementation.  e.g.


function Test(myParam, myClose)
{
     if (myParam == 0)
     {
         result = Ref(myClose, -1);
     }
     else
     {
         result = StDev(myClose, 10);
     }

     return result;
}


I think you should focus on achieving the functionality you want within
the technology constraints presented instead of focusing on polymorphism
(or other design patterns).

Tuzo

Reply via email to