PureBytes Links
Trading Reference Links
|
All: I have done some work using a lot of include statements and wanted
you to know about what I have done. I also am requesting comments on
some unusual observations. Perhaps if Tomasz replies, we can all learn
some more about using the INCLUDE statement.
Background:
I have built a series of files using a "CORE" file, a "PLOT" file, and
an "ANALYSIS" file. While I realize that the commands are context
sensitive, I am using so many different combinations of code lines, that
it seems more simple to separate them. I also only need to change the
CORE code one place and all indicators, backtests, combinations, etc.,
will reflect the changes properly.
Also, as a small point, if I have a PLOT statement within the logic and
I then use the Equity Plot (Tonetti's enhanced code), I get the Plot of
the Equity lines PLUS the PLOT statement that is within the main code
lines, which obviously distorts the equity display. I avoid this with
the separate PLOT subroutine.
DETAILS:
I call the "Core" code the following T1C_NAME.afl. It has all of the
logic for the T1 "signal" I am building.
I call the Plotting code "T1P_NAME.afl, and it just contains some plot
statements and the INCLUDE function calling T1C_NAME.afl.
I call the Analysis coce "T1A_NAME,afl, and it just contains the
buy/sell logic and INCLUDE function calling T1C_NAME.afl.
As the NAME code evolves, I only have to change it one place.
I have found it very convenient to build combined signals with something
like (not proper syntax--just trying to illustrate the idea):
INCLUDE (C:\......\T1C_NAME.afl;
T1 = some logic...
INCLUDE (C:\......\T2C_NAME2.afl;
T2 = some logic...
TSum = T1 + T2 + .... (you should get the idea).
As I moved into Optimization, I observed the following two things
(comment needed from Tomasz or others on this):
1. The optimization (of just one Core logic module) was very very slow
(normally a 1-2 minute pass of 5800 steps took 11 minutes when done thru
the INCLUDE statement. Could it be that it is looking up the CORE code
on each pass?
2. (Counter to #1), when I made a change in the key constants within
the Core code, resaved it, reloaded the Analysis code and ran a
backtest, the results used the original constants---IOW, it did not
recognize the changes I had made in the called code. I fiddled with it,
but the only way I was able to get the changes recognized was to exit AB
and restart AB. Then the changes were recognized and the different
results were displayed.
So the question is: during optimize does the include statement go and
read the original code on every pass, and if this is so, why do manual
changes made to the called code not get recognized without exiting the
program and restarting it??
I hope some of you find this interesting and if you have any comments or
suggestions, please fire away.
Thanks,
Ken
------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/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/
|