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

Variable that tells if an optimization is underway?



PureBytes Links

Trading Reference Links

Hi folks,

I do some time-consuming things like plot and print
junk out to the debug window in some of my functions. 
Since they hog up time I comment them out whenever I
begin a large optimization.  Of course, a better way
would be for the function to know when it is being
called during an optimization and that it needs to
hurry up and not waste time doing things that don't
affect the P&L.  So what global variables are affected
by an optimization other than the actual variables
being tweaked?  If I knew the name of, e.g., the
"optimizationrunnumber" I would just write

If optimizationrunnumber<=1 then begin 
   {fluffy diagnostic code here here}
   Print(x/y+z/2);
End;

{necessary code here}
...

and save loads of time.

Jack