Ton,
This "replacing of the code"
is done on the fly by the compiler. It doesn't change your AFL that you see,
but you can be sure the compiled version "acts" as if the #include
line was simply replaced by the code in the include file. It has the effect you
wish, re-useable code, but it is executed inline unless the include code itself
is a function which never executes unless it is specifically called.
--
Terry
Ton Sieverding
<[EMAIL PROTECTED]> wrote:
Terry I assume that you mean 'it
includes a copy of the include file on runtime'. So during interpretation of
the AFL code. It will of course not replace the #Include line with the
include file in the AFL code. First because that's not what it does in my AB
version and second because you will give up the Include
advantage. Includes for me are code that can be used in sereval programs
and where you can modify the Include without going through all programs
that use the Include code. So the re-using principle ...
----- Original Message -----
Sent: Sunday, September
10, 2006 11:14 PM
Subject: RE:
[amibroker] Candlestick pattern scan
You
are confusing #include with functions in other programs.
All
an include does is COPY the lines of code from the include file and INSERTS
them into your code IN PLACE OF the #include line.
It
is EXACTLY THE SAME as if you just typed those lines in your code.
Amibroker
does have function calls. In the second example I gave, the include was coded
as a function call. Thus this include WOULD have to be place near the top of
your code since the function must be "seen" before it is
"called". Any, yes, this function will never do anything unless and
until you call it. However, the first version as noted above is just inline
code and it gets executed as if you had typed in there in the first place.
-----Original Message-----
From: [EMAIL PROTECTED]ps.com
[mailto:amibroker@yahoogroups.com] On
Behalf Of Ton Sieverding
Sent: Sunday,
September 10, 2006 02:45
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker]
Candlestick pattern scan
Terry thanks. Some remarks and
questions about the use of includes.
1. When entering an
include in the code it does not mean that you are calling the function.
The link for the external function when running the code is available.
That's all. Therefore I still do not understand why it should not be called in
your code.
2. In most languages I know, you
must place the includes as the first line in the code. You have placed the include
as the last line. Can I place includes in AFL where ever I want to place them ?
----- Original Message -----
Sent: Saturday,
September 09, 2006 7:42 PM
Subject: RE:
[amibroker] Candlestick pattern scan
All
this does is change the background color of the chart. The first version IS
used because it does not need to be "called" to work since it is not
a function.
For
those that don't realize what an Include file is: It simple INSERTS the include
code in place of the #include line. It is the SAME as you typing the code
inline and it just a convenience to a) make your code easier to read, b) save
you time in re-writing code you frequently use. An #include is NOT a function,
unless you design it as such as in my second example.
-----Original Message-----
From: [EMAIL PROTECTED]ps.com
[mailto:amibroker@yahoogroups.com] On
Behalf Of Ton Sieverding
Sent: Saturday,
September 09, 2006 11:04
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker]
Candlestick pattern scan
Thanks. Question of course is why
entering the code because you did not use it in your code anyway ?
----- Original Message -----
Sent: Saturday,
September 09, 2006 2:26 AM
Subject: RE:
[amibroker] Candlestick pattern scan
Didn't
realize that was in there. I made it. It's very short and used as a
convenience.
BkgColor = ColorHSB( Param("Hue", 75, 0, 240 ),
Param( "Saturation", 50, 0, 240 ),
Param("Brightness", 200, 0, 240 ));
SetChartBkColor( BkgColor );
//Another
version as a function you can call
function
SetBackColor( HUE, SAT, BRI )
Param("Hue", HUE, 0, 240 ),
Param( "Saturation", SAT, 0, 240 ),
Param("Brightness", BRI, 0, 240 ));
SetChartBkColor( BkgColor );
-----Original Message-----
From: [EMAIL PROTECTED]ps.com
[mailto:amibroker@yahoogroups.com] On
Behalf Of Ton Sieverding
Sent: Friday,
September 08, 2006 01:41
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker]
Candlestick pattern scan
Terry where did you find the Color-Background
inlude
?
----- Original Message -----
Sent: Thursday,
September 07, 2006 9:48 PM
Subject: RE:
[amibroker] Candlestick pattern scan
See attached AFL I got from someone on this board
and/or AB library.
--
Terry
-----Original Message-----
From: [EMAIL PROTECTED]ps.com
[mailto:[EMAIL PROTECTED]ps.com]
On
Behalf Of infynhome
Sent: Thursday, September 07, 2006 10:15
To: [EMAIL PROTECTED]ps.com
Subject: [amibroker] Candlestick pattern scan
HI,
Need help on creating scans for specifically scanning candlestick
patterns:
Dark cloud cover
Morning and evening star
doji
hammer and hanging man
I would appreciate if there are seperate scans for each of this pattern.
Kindly help
Mithil
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
How
low will we go? Check out Yahoo! Messenger’s low PC-to-Phone
call rates.
__._,_.___
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
SPONSORED LINKS
__,_._,___
|