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

RE: [amibroker] short cut keys



PureBytes Links

Trading Reference Links


<SPAN 
class=490401411-28092002>-CS:
<SPAN 
class=490401411-28092002> 
<FONT 
size=2>>>
Some of us wanted a call (subroutine) to other afl formulas 
to REDUCE code 
bloat.<<
 
I thought this was how#include 
was supposed to work.  Tell me how the following is not 
correct
 
File: called 
Common.AFL
 
Ready = C > 
EMA(C,21);
Not_Ready = C < 
EMA(C,21);
Go = 
Flip(Ready,Not_Ready);
 
 
New AFL code called 
DoIt.AFL
 
#INCLUDE C:\Program 
Files\Amibroker\Common.AFL
Vol=V>EMA(V,50); // or any 
other common buy condition
Buy = Go AND 
Vol;
Sell = NOT 
Go;
 
 
First 
question:
Does #INCLUDE work like I have 
written it above?  Does it "bring along" the various arrays within it to 
the new, "calling" AFL file?
 
Second question (if 1 is 
yes)
Is this not like a subroutine 
call?
 
Help me understand.  The 
above is what I took from the help paragraph that came with the 
distribution.
 
Thanks,
 
Ken 
 
 
<SPAN 
class=490401411-28092002> 
<SPAN 
class=490401411-28092002> 
<FONT face=Tahoma 
size=2>-----Original Message-----From: CS 
[mailto:csaxe@xxxx]Sent: Saturday, September 28, 2002 12:30 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
short cut keys
Dingo,
You can see all the code now. Just cut and paste. 

Forget that #include exists. If you don't know what formula 
coding #include refers to, you shouldn't use it.
 
Some of us wanted a call (subroutine) to other afl formulas 
to REDUCE code 
bloat.
It was getting ridiculous to duplicate the same 
often-used code for its use in every system and its variant.
 
-CS
 
 
----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
dingo 
To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Friday, September 27, 2002 7:10 
PM
Subject: RE: [amibroker] short cut 
keys

Then 
there's no need for the #include?
<SPAN 
class=509070402-28092002> 
The 
best way would be to have a variation to please both 
crowds..
<SPAN 
class=509070402-28092002> 
So 
you've got an AFL system with several pages of code?  Sounds 
interesting..
<SPAN 
class=509070402-28092002> 
<SPAN 
class=509070402-28092002>dingo
<SPAN 
class=509070402-28092002> 
<SPAN 
class=509070402-28092002><FONT color=#0000ff face=Arial 
size=2><FONT 
size=2><SPAN 
class=509070402-28092002> 
<SPAN 
class=509070402-28092002> -----Original 
Message-----From: Bob Jagow [mailto:bjagow@xxxx] 
Sent: Friday, September 27, 2002 9:12 PMTo: <A 
href="">amibroker@xxxxxxxxxxxxxxxSubject: 
RE: [amibroker] short cut keys

Different 
strokes, I guess, Dingo.
<FONT color=#0000ff 
size=2> 
I'd have a 
major problem if the #include directive in C [or uses or import or ... in 
other languages] inserted several pages of source code!
  If I 
wanted to insert source code, cut and paste would 
suffice.
<FONT color=#0000ff 
size=2> 
<FONT color=#0000ff 
size=2>Bob

<FONT face=Tahoma 
size=2>-----Original Message-----From: dingo 
[mailto:dingo@xxxx]Sent: Friday, September 27, 2002 4:50 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: 
[amibroker] short cut keys
<FONT color=#0000ff face=Arial 
size=2>But why wouldn't you want to see what was included? I too believe 
it should call the entirety of the text it points to..
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>Just curious, I guess.  Its not like its wasting 
paper..
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>In the future I'd like to see the capablilty of substitutionas 
well. Something like:
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>#include "path\to my 
file\name path.afl" 28, 7
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>Where the included text might contain:
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>blah blah blah
<FONT color=#0000ff face=Arial 
size=2>A1=EMA(C,%1)-EMA(C,%2);    //MACDblah blah 
blah
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=7>dingo


<FONT 
face=Tahoma size=2>-----Original Message-----From: Jayson 
[mailto:jcasavant@xxxx] Sent: Friday, September 27, 
2002 7:27 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
RE: [amibroker] short cut keys
<SPAN 
class=459432423-27092002>Personally I prefer a single line that calls 
entire formula as it makes for a cleaner more organized formula. I like 
it the way it is...
 
Jayson 

<FONT face=Tahoma 
size=2>-----Original Message-----From: Ted Chmilar 
[mailto:tchmilar@xxxx]Sent: Friday, September 27, 2002 
7:07 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: 
[amibroker] short cut keys
Dingo,
 
I don't use this feature for the same 
reason. Difficult to desk check code for conflicting 
statements.
 
Ted

----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
dingo 

To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Friday, September 27, 2002 
2:26 PM
Subject: RE: [amibroker] short 
cut keys

<FONT color=#0000ff face=Arial 
size=2>Tomasz,
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>When I tried to use it it doesn't actually show the included 
lines in the formula so that when the report is shown on the #include 
line is there. Do you have plans to actually show the included 
lines?
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>Something like:
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>#include "path\to my file\name 
path.afl"
## Line 
1
## Line 
2
<FONT face=Arial 
size=2>.
<FONT face=Arial 
size=2>.
## Last 
Line
<FONT face=Arial 
size=2> 
<FONT face=Arial 
size=2>dingo


<FONT 
face=Tahoma size=2>-----Original Message-----From: Tomasz 
Janeczko [mailto:amibroker@xxxx] Sent: Friday, 
September 27, 2002 12:46 PMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] short 
cut keys
Ken,
 
When using #include please note that if you 
specify the full path
it should have single backslashes (this is 
different from regular AFL code that
needs double backslashes).
 
So your sample #include statement should look like 
this:
 
#include "C:\Program 
Files\AmiBroker\AFL\MyFile.afl"
 
 
Best regards,Tomasz 
Janeczkoamibroker.comPost 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.