No, because it is sick idea implemented in MS because they don't have a normal loop construct in the language. Metastock PREV essentially re-calculates entire array (number of bars)-times resulting (number of bars) performance degradation. So if you have say 10000 bars, the code runs 10000 slower.
Everything that you do in MS using PREV should be coded using the loop in first place instead - and the resulting code will be 2 or 4 orders of magnitude faster. Search the archive of the mailing list how to write loop equivalent. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: Mubashar virk To: amibroker@yahoogroups.com Sent: Monday, June 15, 2009 1:06 PM Subject: [amibroker] MetaStock's PREV Hi all, Has any one worked out a universal AFL Function = the perversity in MetaStock that is called PREV. Thanks