Nizar,
Here's my attempt at solving the problem!
{Start}
{Metastock CPI (Australia) Turover Filter - written in Metastock v9 and will need to be modified for use after 2007}
Base:=500000;{Enter minimum system turnover for 2007 eg 500000}
YEARVAL:=If(Year()=2007,Base,If(Year()=2006,Base/1.033,
If(Year()=2005,Base/1.061,If(Year()=2004,Base/1.089,
If(Year()=2003,Base/1.115,If(Year()=2002,Base/1.148,
If(Year()=2001,Base/1.184,If(Year()=2000,Base/1.253,
If(Year()=1999,Base/1.276,If(Year()<=1998,Base/1.296,Base*20))))))))));{End}
{If you wish to use this filter when back-testing copy from "{Start} to {End}" inclusive and paste it at the beginning of MetaStock exploration code.
You will also need to amend the Turnover Filter in the EntryTrigger to show "YEARVAL" instead of an amount, for example,
Mov(V*C,21,S)>=YEARVAL;}
The above code can undoubtedly be simplified and the resultant simplification may allow a longer lookback period.
If we could just attract the attention of a learned MetaStock carrot-munching mammal from the hare family we will have our answer.
Whilst every endeavor has been made to ensure this code offers a basic CPI related turnover filter I would recommend that you validate the results of including this code in your back-testing before relying on any outcomes.
Basis of Calculation
Qtr Ending Au/CPI Year CPI Factor (Rounded to 3 Decimal Places)
31/12/2006 155.5 2007 155.5/155.5
31/12/2005 150.6 2006 155.5/150.6
31/12/2004 146.5 2005 155.5/146.5
31/12/2003 142.8 2004 155.5/142.8
31/12/2002 139.5 2003 155.5/139.5
31/12/2001 135.4 2002 155.5/135.4
31/12/2000 131.3 2001 155.5/131.3
31/12/1999 124.1 2000 155.5/124.1
31/12/1998 121.9 1999 155.5/121.9
31/12/1997 120.0 1998 & earlier 155.5/120.0
Unfortunately I can't get this table to post as I would prefer which obviously highlights my total lack of knowledge in making posts.