Rolf,

You have to include your custom indicator code in your strategy code.  This can 
be done a number of ways:

- copy the custom indicator code into your strategy code.
- #include your custom indicator AFL at the top of your strategy code.

If you have a need to call your indicator over and over again in your strategy, 
then you should encapsulate your indicator's logic in a function (lookup 
"function" in the Help file) which you would #include at the top of both your 
indicator AFL and strategy AFL.

It's a good idea to use _SECTION_BEGIN and _SECTION_END around your indicator 
code.  That way the indicator parameters are grouped together on the Parameters 
form (access through either right-clicking on a chart or the Parameters button 
in Automatic Analysis).

The only way I know to have the AFL editor recognize a custom indicator name is 
to create the indicator in a plug-in using the AmiBroker ADK and a programming 
language / compiler that supports Windows DLL files.

Regards,

David
--- In amibroker@yahoogroups.com, "rolf.spuler" <rolf.spu...@...> wrote:
>
> Hello
> 
> I have a beginner question but I could not figure out from the user guide 
> what I am doing wrong.
> 
> I coded my custom indicator. It is showing up in the Custom folder and I can 
> attach it to a chart. But when I try to write a simple buy/sell script in the 
> AFL Editor it does not recognize my indicator (syntax error). It also does 
> not show up in the auto-completion drop down (typing first char and pressing 
> ctrl + space). Did I miss something or do I have to include the indicator 
> somehow?
> 
> Thanks for any help
> 
> Rolf
>

Reply via email to