I was thinking about this issue yesterday and I have a question, please correct me if I am wrong:
During an optimization process there are so many repetitions of a function with invariant parameter equal to the total number of the steps of the optimization. In this case MA(C,15) will be calculated for every set of optimization parameter even if it is invariant, OK? If we have a very time consuming invariant function in the TS it will be calculated a lot of times even if it is not needed. This is true if I have well interstood how AB works, please correct me my idea is to store this very time consuming invariant function in a "fake" symbol (using Addtocomposite) and access to its values by Setforeing. Is it a good idea? Bisto --- In [email protected], "Tomasz Janeczko" <gro...@...> wrote: > > Hello, > > For example, take a look at this simple code: > > Buy = Cross( MA(C, 5 ), MA( C, 15 ) ); > Sell = Cross( MA( C, 15 ), MA( C, 5 ) ); > > There are 2 repetitions of same function call with invariant parameters: > MA(C, 5 ) - is called twice > MA( C, 15 ) - is called twice > > This can be written in more efficient manner using variables: > > shortma = MA(C, 5 ); > longma = MA( C, 15 ); > Buy = Cross( shortma, longma ); > Sell = Cross( longma, shortma ); > > That is what I meant. > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: "Rob" <sidharth...@...> > To: <[email protected]> > Sent: Tuesday, October 06, 2009 10:21 AM > Subject: [amibroker] Re: Tips for reducing CPU load > > > > TJ, > > > > Sorry my programming terminology is not as good as yours... > > What do you mean by 'replacing repeated function calls with invariant > > parameters'...?? > > > > --- In [email protected], "Tomasz Janeczko" <groups@> wrote: > >> > >> First and foremost: use AFL Editor, Tools->Code Check And Profile > >> to reduce complexity of your code, by removing repeated function calls > >> (with invariant parameters), > >> using array operators wherever possible instead of loops, > >> re-thinking code to get simpler formulation, > >> avoiding any JScript/VBScript / COM objects in charts, etc. > >> > >> Best regards, > >> Tomasz Janeczko > >> amibroker.com > >> ----- Original Message ----- > >> From: "Ara Kaloustian" <ara1@> > >> To: <[email protected]> > >> Sent: Tuesday, October 06, 2009 12:23 AM > >> Subject: Re: [amibroker] Tips for reducing CPU load > >> > >> > >> >- review your memory settings in preferences... make sure you are not > >> > allocating memory that you are not using > >> > > >> > - reduce number of symbols you monitor if you don't need them all > >> > > >> > > >> > ----- Original Message ----- > >> > From: "Rob" <sidhartha70@> > >> > To: <[email protected]> > >> > Sent: Monday, October 05, 2009 2:33 PM > >> > Subject: [amibroker] Tips for reducing CPU load > >> > > >> > > >> >> Hi All, > >> >> > >> >> I seem to be maxing out the core I'm using on AB... starting to cause > >> >> problems operationally. I'm mainly doing charting and real time AFL. > >> >> > >> >> Any tips for reducing CPU load so I can perhaps give myself a little > >> >> more > >> >> breathing space....?? > >> >> > >> >> TIA > >> >> > >> >> > >> >> > >> >> ------------------------------------ > >> >> > >> >> **** IMPORTANT PLEASE READ **** > >> >> This group is for the discussion between users only. > >> >> This is *NOT* technical support channel. > >> >> > >> >> TO GET TECHNICAL SUPPORT send an e-mail directly to > >> >> SUPPORT {at} amibroker.com > >> >> > >> >> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at > >> >> http://www.amibroker.com/feedback/ > >> >> (submissions sent via other channels won't be considered) > >> >> > >> >> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > >> >> http://www.amibroker.com/devlog/ > >> >> > >> >> Yahoo! Groups Links > >> >> > >> >> > >> >> > >> >> > >> > > >> > > >> > > >> > > >> > ------------------------------------ > >> > > >> > **** IMPORTANT PLEASE READ **** > >> > This group is for the discussion between users only. > >> > This is *NOT* technical support channel. > >> > > >> > TO GET TECHNICAL SUPPORT send an e-mail directly to > >> > SUPPORT {at} amibroker.com > >> > > >> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at > >> > http://www.amibroker.com/feedback/ > >> > (submissions sent via other channels won't be considered) > >> > > >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > >> > http://www.amibroker.com/devlog/ > >> > > >> > Yahoo! Groups Links > >> > > >> > > >> > > >> > > > > > > > > > > ------------------------------------ > > > > **** IMPORTANT PLEASE READ **** > > This group is for the discussion between users only. > > This is *NOT* technical support channel. > > > > TO GET TECHNICAL SUPPORT send an e-mail directly to > > SUPPORT {at} amibroker.com > > > > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at > > http://www.amibroker.com/feedback/ > > (submissions sent via other channels won't be considered) > > > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > > http://www.amibroker.com/devlog/ > > > > Yahoo! Groups Links > > > > > > >
