Tomasz, Thanks for taking the time to provide details on this. Where this is of interest to me is trying to estimate amount of time required for an AFL with about 10 strategies running against 18 pairs. Sometimes I see the scan is completed in AA in less than a minute, in some case it takes upto 2mins.
I am using timenum functions to check if most recent hourly bar is complete and then after 2mins, I have a routine that creates the orders file from amibroker . Then at the begining of 3rd minute after the most recent hourly bar completion, i have another vbscript to move the files to the metatrader platform folders. So rather than have these STATICALLY defined, I am exploring ways to detect end of AFL completion and then set a variable and then use that variable to perform the file move. http://finance.groups.yahoo.com/group/AmiBroker-at/message/2875 I am also interested in knowing some of the programming NO-NOs that affect performance. I don't have any looping but have PLENTY of multitimeframe conditions.I have checked against common coding errors and so far I don't seem to be hitting any of those or have been corrected. I am upgrading mem to 2GB. I use esignal RT Forex feed. So I plan on usin this AFL execution to see what modules of the code are hogging the resources. But I don't know if there is such thing as an AFL parser that scans through the 1800 lines and finds out areas of improvement. ( Like a memmaker...Oooh did I even say that) Thanks again for your posting. Amibroker rocks. Pls keep up the good work. Cheers,Padhu ----- Original Message ----- From: Tomasz Janeczko To: [email protected] Sent: Sunday, September 23, 2007 6:50 PM Subject: Re: [amibroker] Measuring AFL Execution Times Hello, The reason for my mistake was that actual time spent in some calls is much lower than reported by the method presented in UserKB. This is so because the DebugVIew overhead. Often outputting text to debugview takes much more time than the function being measured. For example if you measure the time needed to call Param() function 1000 times: GetPerformanceCounter( 1 ); for( i = 0; i < 1000; i++ ) { x = Param("test", 1, 0, 100, 1 ); } Title=""+GetPerformanceCounter(1)+" milliseconds"; It will show up that it takes 5 milliseconds to call Param() 1000 times. So single call is actually 5 microseconds, not 1 millisecond (1000 microseconds) as reported by the method presented. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: Tomasz Janeczko To: [email protected] Sent: Monday, September 24, 2007 1:43 AM Subject: Re: [amibroker] Measuring AFL Execution Times Hello, Please ignore previous post. I made mistake, the RESOLUTION is in microseconds, not the UNIT. The UNIT is millisecond but resolution is upto 0.001 millisecond = 1 microsecond. Best regards, Tomasz Janeczko amibroker.com
