[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Can I do this in AB?



PureBytes Links

Trading Reference Links

Hello,

1. You can have #include statement anywhere.
It does not matter. #include is a PRE-PROCESSOR command
that just "inserts" the contents of the external file at the position where you have include.
And it does BEFORE execution. That's why it is called pre-processor command.
This works the same as you would PASTE the code into the place where you have used #include.

So, it will be included unconditionally, but executed *conditionally* as any code
fragment that is enclosed with if( condition ) { ... code fragment .... }

2. Mostly yes. It is NOT executed when chart pane does not change its parameters nor its size.
But in any other case it is executed.

3. Yes.



Hope this helps.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "mmqp" <mmqp@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, September 18, 2003 11:43 PM
Subject: [amibroker] Re: Can I do this in AB?


> Thanks,
> I only copied partial codes for example.  My real question is:
>
> 1. Can I have "#include" statement within a if statement like below?
> 2. Does the entire AFL code get executed each time I perform any
> interactive inputs IE. zoom out/in, change parameters etc.
> 3. Does "!=" or "==" work with Strings?
>
> Thanks
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
> wrote:
> > Hello,
> >
> > currentSymbolName variable is uninitialized at the beginning of
> the execution
> > so the code below will give you "uninitialized variable" error.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "mmqp" <mmqp@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, September 18, 2003 9:04 PM
> > Subject: [amibroker] Can I do this in AB?
> >
> >
> > > I have a script that I only want it to execute when a new symbol
> is
> > > entered in IB.  So, Will this work?
> > >
> > > if ( currentSymbolName != Name () ) {
> > >   #include "C:\Program Files\AmiBroker\AFL\myAFL\commonMIDAS.afl"
> > >   currentSymbolName = Name (); // updating to new symbol.
> > > }
> > >
> > >
> > > TIA
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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