Shane,
Try including the whole path enclosed in double quotes in your include statement: #include "C:\Program Files\AmiBroker\Formulas\Include\MovingAverage.afl" Regards, David _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of bakermrms Sent: 04/23/2007 8:11 AM To: [email protected] Subject: [amibroker] Problem with include Error 42 Hi I am a serious newbie to AFL and ami and I am having a problem using #include. I keep getting an Error42 #include failed because the file does not exist. Formulas\Include\MovingAverage.afl (current working directory is 'C:\Program Files\Amibroker) Use "Edit Formula" to correct error. I can see the MovingAverage file in the include directory. The formulas are as follows; This one is in the Include directory under MovingAverage, // Moving average Function function MovingAverage(Periods) { return MA(C, periods); } // Name this "MovingAverage.afl" and put into your Include directory This one is in the Custom directory saved as ma_test #include<Moving Average.afl> Plot(MovingAverage(5),"MA",2,1); Can anyone shed any light as to why they may not be working please? Many thanks for any assistance offered. Shane
