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

RE: [amibroker] 10 uses for the #Include



PureBytes Links

Trading Reference Links




It 
interacts as if you pasted that code into your formula rather than have it in a 
separate file.  That's it.
<FONT face=Arial color=#0000ff 
size=2> 
So the 
word "interact" is not really applicable.  It seems like you're looking for 
more than there is. Its not like a Subroutine in some languages where you pass 
that subroutine some values and the subroutine works on them and passes them 
back.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>d

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Anthony 
  Faragasso [mailto:ajf1111@xxxxxxxx] Sent: Saturday, April 26, 2003 
  1:51 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: 
  [amibroker] 10 uses for the #IncludeDingo, I 
  guess what I am trying to say is this....How does the rest of the 
  formulainteract with what is included in the #include function... 
  This is the Moving average that is stored elsewhere : as an example 
  Movingaverage=ma(c,28); Anthony 
  -------Original Message------- From: 
  amibroker@xxxxxxxxxxxxxxx Date: Saturday, April 26, 2003 1:40:00 PM 
  To: amibroker@xxxxxxxxxxxxxxx Subject: RE: [amibroker] 10 uses for the 
  #Include Sure but what you've got to provide me is the AFL formula 
  that I'll put intothe file: "C:\Program 
  Files\AmiBroker\IncludeFiles\movingaverage.afl" All the include does 
  is allow you to have some AFL code stored in a filethat become 
  incorportated into the rest of the formula where the includestatement is. 
  Think of that "included" AFL as invisible. For instance - If I 
  have the attached formula All Code In One File.afl and Idecide that I 
  don't need to keep seeing all of that code for the equitycalculations in 
  my AA window every time - it just gets in the way - I wouldbreak the code 
  into 2 pieces: Main Code In One File.afl andEquityCalcsInSeparateFile.Afl. 
  The line #Include 
  "C:\ProgramFiles\Amibroker\IncludeFiles\EquityCalcsInSeparateFile.Afl" 
  will cause AB toinclude that code in my Main Code WHEN AB RUNS THE 
  FORMULA.  But I don'tever see it in the AA window. That's as 
  good an explanation as I can muster. Hope its enough! d 
  -----Original Message----- From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx] Sent: Saturday, April 26, 2003 1:14 PM To: 
  amibroker@xxxxxxxxxxxxxxx Subject: RE: [amibroker] 10 uses for the 
  #Include Dingo, Ok...Could you supply a sample output 
  using this moving average and the #include function. I am still 
  lost on how to use this #include function. TIA Anthony 
  -------Original Message------- From: amibroker@xxxxxxxxxxxxxxx 
  Date: Saturday, April 26, 2003 11:09:15 AM To: 
  amibroker@xxxxxxxxxxxxxxx Subject: RE: [amibroker] 10 uses for the 
  #Include Anthony, WHen you use the include you never get to 
  see the code in the AA window. Amibroker reads it internally when it runs 
  your formula.  This is how you can save space in the AA window.  
  The code that is "included" should have been thoroughly tested and error 
  free. d -----Original Message----- From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx] Sent: Saturday, April 26, 2003 7:40 AM To: 
  amibroker@xxxxxxxxxxxxxxx Subject: RE: [amibroker] 10 uses for the 
  #Include Herman, Thank you for that...That much I do 
  know...but how do I read this file.... example..How would I read this in 
  The AA window on an explore.....Or in the Indicator Builder... TIA 
  Anthony -------Original Message------- From: 
  amibroker@xxxxxxxxxxxxxxx Date: Saturday, April 26, 2003 2:27:30 AM 
  To: amibroker@xxxxxxxxxxxxxxx Subject: RE: [amibroker] 10 uses for the 
  #Include You create a directory in your AmiBroker directory that is 
  called "IncludeFiles", you copy all your include files to that directory. 
  Then to read the include file code into your system you insert this line: 
  #include "C:\Program Files\AmiBroker\IncludeFiles\movingaverage.afl"; 
  h -----Original Message----- From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx] Sent: April 25, 2003 7:55 PM To: 
  amibroker@xxxxxxxxxxxxxxx Subject: Re: [amibroker] 10 uses for the 
  #Include Herman,   I have not worked with the #include 
  pre-proccessor yet...mainly I do not know how....   Say I 
  have a file called Movingaverage....( movingaverage=ma(c,28) ).....Now 
  I want to use this in some other formula....so I write the following: 
  #include "C:\Program Files\AmiBroker\AFL\movingaverage.afl"   
  Now What do I do ??  Thank you Anthony     
  -------Original Message-------   From: amibroker@xxxxxxxxxxxxxxx 
  Date: Friday, April 25, 2003 10:31:36 PM To: amibroker@xxxxxxxxxxxxxxx 
  Subject: [amibroker] 10 uses for the #Include Hello,   The 
  #include does not enhance processing power or provide additional 
  functions. I substitute it with the full code after development or for 
  performance testing. However it is extremely handy for:   1) Making 
  code more readable during development by hiding a major part that doesn't 
  require any more work. Working on a program of a few hundred lines and 
  scrolling back and forth, from begin to end, doesn't make for pleasant 
  working. Breaking it up into modules will speed up you work.   
  2) During development, when working with loops, you can hide the entire 
  body of the loop so that you can see the begin and the end of the loop and 
  work on the code in those areas. For quick temporary hiding of code 
  sections use a standard name like Mod1, Mod2, etc.   3) I plot 
  equity and other indicators from the backtester using the Equity button, i 
  find this easier than working from two formula windows. Most 
  indicators contain completed code so they can very conveniently be put 
  into an #Include file, so as not to clutter up the systems code. Fred's 
  equity code is a nice example that you might want to have in an Include 
  file.   4) Some of my systems use many calibration constants, a 
  long line of 100 short statements messes up the code and makes it harder 
  to work with. Placing the assignments in an include file hides them nicely 
  and makes it very easy to switch constants by commenting out one or 
  another include   5) During development I use ,any AddCollumn 
  statements, 10, 20, even more. In a major project it is well worth to 
  develop such debugging tools and leave them in the code. Simply uncomment 
  them when you need them...   6) Include files can be used to 
  "attach" documentation to a program without cluttering the window and 
  using up a lot of space. Sometimes it is handy to use the Indicator 
  formula window (if not used) to keep notes in an Include file.   
  7) Scripts, if used, are pretty well stand-alone pieces of code and it is 
  nice to hide them from view.   8) If you use pattern recognition 
  and work with long lists of patterns or Candle stick patterns, you can 
  define those in an include file.   9) If you want to translate 
  Status("StockNum") to a literal string ("MSFT") and you work the N100, 
  you'll need a 100 statements that mess up your code. Also since this type 
  of code can be called from many other programs it is nice to have it self 
  contained.   10) You can pass parameters to Include files (as needed 
  in 9 above) by reserving a suitable variable name for Include files 
  ,or as I do, i give the include file a long name that tells me what it 
  expects and what it returns. For example: N100Number-n-ToTicker-T.afl this 
  files expects a pointer named "n" to be defined before using the 
  #Include and returns the Ticker name-string in "T". I define n before the 
  include and use the string T after it. Easy?   11) I know: I 
  can't count! Some standard Param() applications that are needed for 
  debugging but not in the final version - an Include may be useful 
  here.             
  Yahoo! Groups 
  Sponsor           Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxx Send SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx ----------------------------------------- Post 
  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 Yahoo! 
  Terms of Service. Send BUG REPORTS to bugs@xxxxxxxxxxxxx 
  Send SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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 <A 
  href="">http://docs.yahoo.com/info/terms/ 
  Yahoo! Groups Sponsor ADVERTISEMENT 
  Send BUG REPORTS to bugs@xxxxxxxxxxxxx Send 
  SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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 Yahoo! Terms of 
  Service. Send BUG REPORTS to bugs@xxxxxxxxxxxxx Send 
  SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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 Yahoo! Terms of 
  Service. Yahoo! Groups Sponsor Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxx Send SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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 Yahoo! Terms of 
  Service. Send BUG REPORTS to bugs@xxxxxxxxxxxxx Send 
  SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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/groupfaqhtml 
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
  Yahoo! Groups Sponsor Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxx Send SUGGESTIONS to suggest@xxxxxxxxxxxxx 
  ----------------------------------------- Post 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/groupfaqhtml 
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
  Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  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. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.