You can automate virtually anything with AB by using JScript/_vbscript_ and AFL.
Something like this came in mind:
AA.LoadSettings("mysystem.abs"); // Report tab set to summary
AA.LoadFormula(...);
AA.BackTest(1);
AA.SortByColumn(....); // sort so that the top 20 stocks are at the beginning of the files
AA.Export("myresults.csv");
AA.LoadSettings("original.abs"); // Report tab set to trade list
 
Now you can write code to read the first 20 lines of "myresults.csv" and put them to a watchlist.
Then write code to Scan/Explore and send signals to IB TWS......
 
----- Original Message -----
From: brpnw1
Sent: Saturday, September 16, 2006 4:10 PM
Subject: [amibroker] Re: Select best system stocks automatically?

Hi Mark,

Looks promising! I have to leave for about 36 hours, but before I do
I want to clarify one thing... my goal is to automate this and add
this as a script that's part of a series of scripts that all work
together (using Batman).

You mention the "Report" tab being set to "Summary." If you have a
quick answer, great... should I/can I alter this in my script and
then set it back to "trade list" for the other scripts? Not sure
what the full implications are for changing this tab, since I am
getting ready to walk out the door and the AB manual will take me
some time to read (if it even answers this question).

Will work on this manana.

Thanks in advance!

Bman/Brian

--- In [EMAIL PROTECTED]ps.com, "Mark H" <[EMAIL PROTECTED]..> wrote:
>
> Brian:
>
> That can be easily done with Automatic Analysis. Here are the
steps:
> 1. Load your formula
> 2. Use filter to include the tickers you are interested (you can
create a watchlist first)
> 3. In Settings/Report tab, choose results list shows "Summary".
> 4. Select the range you want
> 5. Click on the down arrow beside "Back Test" button and
choose "Individual Backtest".
> 6. Now you can see how the stocks would do under your system in
the results list. Sort them to choose top 20 based on your criteria.
>
> Hope this helps,
>
> - Mark H.
>
> ----- Original Message -----
> From: brpnw1
> To: [EMAIL PROTECTED]ps.com
> Sent: Saturday, September 16, 2006 11:17 AM
> Subject: [amibroker] Select best system stocks automatically?
>
>
> Hello fellow AB crew,
>
> I am looking for either search terms I can use to find previous
posts
> on this topic (please advise which terms to use) or an overview
of how
> to build the following in AFL...
>
> I want to identify which specific stocks/ticker symbols are
expected
> to perform best with my trading system. I would like to isolate
the
> best-performing 20 stocks that have historically generated the
best
> reults for my trading system. I only want to trade these stocks
with
> the given system.
>
> My understanding is that stocks that have performed best in the
very
> recent past have a better chance of performing well in the near-
term.
> This is based on a friend's robust trading system which is
working
> quite well. Therefore, I am interested in also selecting the
length of
> historical data that will be tested against the system for each
stock.
>
> Any ideas or code that you can throw at me to get me started?
>
> Thanks in advance,
>
> Brian, aka "Bman"
>

__._,_.___

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
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to