Calling custom user functions in our code

I am trying to replicate what is explained in the below link for calling custom user functions:

I followed the same steps, please refer the screen shots below:





Could you please help me in fixing this error?

If program says that the file does not exits, then it does not exist or it can't be open (for example because you opened it exclusively in some other program). You need to open Windows Explorer navigate to path given on screen (C:\Program Files (x86)\AmiBroker\Formulas\Include") and verify if file (including proper .AFL extension) really exists.

As you suggested, I have checked the file in the specified folder and it exists, please find the screen shot of the file:


But still getting the error message.

It is hard to say what is happening on your machine. Normally it just works.

Sometimes antiviruses do all kind of weird things that affect normal operation of Windows, causing all kinds of weird problems, for example

You may try absolute path instead.

#include "C:\Program Files (x86)\AmiBroker\Formulas\Include\"

or relative this way:

#include "Formulas\Include\"

@av.ragavan line 5 of your "myMACD" AFL under "use of function" requires a parenthesis and a semi-colon at the end that the article has also missed.

Try and see if that makes it work.