Now #include works!!!
I did as you said. In "PR2" I wrote:

#include <PR1.afl>
xyz = C*ind();
Plot(xyz,"", colorRed);

Thank you so much for the professional answer.
Lech

--- In [email protected], Graham <[EMAIL PROTECTED]> wrote:
>
> If you check the #include function you place the path for that afl 
in the
> statement line, then checking the examples links provide you can 
see how it
> is used
> using any directory to the file
> 
> #include "C:\ProgramFiles\AmiBroker\Formulas\MyPr\PR1.afl"
> xyz = c*ind();
> 
> if you have your function afl in the default include path
> #include <PR1.afl>
> xyz = c*ind();
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> On 01/09/06, credos_77 <[EMAIL PROTECTED]> wrote:
> >
> > I'm asking again about help in a very simple case. As I see, many
> > people in the group have the same or a similar problem. The 
problem
> > is about transferring or using the same constants or values from 
one
> > program to another program (.afl) in AmiBroker. I got information
> > from AB support that I should use function " #include".  I did
> > everything what says the instruction for function "#include" and
> > still the error occurs.
> > I would like to somebody from group or AB support to write how it
> > can be done using very simple example, which can be really helpful
> > for others AB's users and me.
> >
> > For example:
> > ·       I create a program with name "PR1", path
> > C:\ProgramFiles\AmiBroker\Formulas\MyPr\PR1.afl
> >
> > ·       I write code in this program:
> > Function ind()
> > { r1 = RSI(10);  r2 = RSI(20);  return r1/r2; }
> >
> > ·       In Tools -> Preferences -> AFL -> Standard include path - 
I
> > pick my path:
> > C:\ProgramFiles\AmiBroker\Formulas\MyPr
> >
> > ·       Now I create the second program "PR2", path
> > C:\ProgramFiles\AmiBroker\Formulas\MyPr\PR2.afl
> >
> > ·       I want to use, earlier written in program "PR1" function 
ind
> > (), in program "PR2"
> >
> > ·       For example:
> > I want to multiply "ind()" by "Close" [A = ind()*Close]  and after
> > that draw a plot in "PR2"
> >
> > #include <PR1>  and what next?
> > How can I invoke (initialize) "ind()"  in order to multiply it and
> > draw a plot in "PR2"?
> >
> >
> > Thanks for any help
> > Lech
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to