[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: functions/variable scope errors



PureBytes Links

Trading Reference Links

that's what I was proposing in my posts, so we were were talking about
the same thing ...

reinventing the wheel everytime is not the best way to use our time I
think, so I prefer to focus on "new" creative ideas rather than
creative ways to implement "old" ideas ... and I often end up spending
most of my time in adapting to AFL very simple ideas which could be
coded in few lines in other languages/environments

but being practical I know this is a good framework , it would be
perfect with full OO, especially on the long term code could be much
more reusable and understandable
Ly


 


--- In amibroker@xxxxxxxxxxxxxxx, "tuzo_wilson" <j.tuzo.wilson@xxx> wrote:
>
> -- In amibroker@xxxxxxxxxxxxxxx, "loveyourenemynow"
> <loveyourenemynow@> 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
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/