Please help to improve Amibroker AFL performance?

Hi friends,
I'm new to AFL, learning the things. I've written a very long code AFL with nearly 1000 IF conditions. So it takes about 1 minute to run the scan or back test. While trying to improve the performance I found out Amibroker runs each and every symbols through every each line of AFL code.
It would be much faster if Amibroker can run the first Buy condition and return the result (list of symbols satisfy the first Buy condition) and then check if these symbols meet the second Buy condition (in my case is 1000 IF conditions).
Currently I have to write 2 formula, the first one is something like this (Buy = C==HHV(C,250):wink: to get the symbols that have highest close of 250 bars. I add these symbols to the watchlist and then use the second formula (1000 IF conditions) to run for this watchlist to get final result.
Is there anyway we can do this in just 1 single formula?

Thank you very much.

Unfortunately your question isn't clear enough and does not provide all necessary details to give you an answer. Please follow this advice: How to ask a good question

In short: post the formula.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.