Michael --
I compared your trades with your log file. And observed that all of your 'missing' trades attempted to buy on the *same* day as you closed a previous trade. That is only a hint. See attachment.

However, there were two trades that were made in the trade list that did buy on the same day as you closed a previous trade. These two trades were opened on 4/13/2010 and 6/14/2010.

Other comments:
I just briefly scanned your code. And I notice that you use for loops a lot, and also there were no Ref() or ExRem() functions. I am guessing that you could do without so many for loops and with somewhat simpler code.

Also, I noticed that iif() was not capitalized as IIf(), indicating that at least this part of your code had not been checked in AB's Editor.

It would be much easier to compare the log with the trades.html if the log file looked more like the trades file. For example, open and close of trade on the same line.

That being said, based on your forum postings, you have been using AB for only about a month. You're miles ahead of where I would expect one to be, after such a short time.

-- Keith

On 7/8/2010 11:51, michaels_musings wrote:

Sorry Keith,

I apparently didn't have non-logged in members able to view uploaded files :(

It's been fixed.

Michael

--- In amibroker@yahoogroups.com <mailto:amibroker%40yahoogroups.com>, Keith McCombs <kmcco...@...> wrote:
>
> Michael --
> I went to your web site. via your link below. However, I couldn't find
> any of the files you refer to. Do I need a secret password or handshake?
> -- Keith
>
>
> On 7/7/2010 16:57, michaels_musings wrote:
> >
> > Anyone know how to get the Backtester and Optimizer to include all
> > trades in their results? The code below (firstSystemPostCopy.afl)
> > initiates trades that get captured by the logfile, but they don't show
> > up or get accumulated in the Backtester or Optimizer. The results are
> > from ~six months of 1-minute bars of FAS. The Backtester shows 16
> > trades with profit of $7,110.38. Per the logfile there were 24 trades
> > with profit of $3,751.29.
> >
> > Anyone know why the extra 8 trades weren't included in the Backtester?
> >
> > Thanks,
> > Michael
> >
> > First few trades from Backtester:
> > Ticker Trade Entry Exit
> > FAS Long 11/30/2009 2:53:00 PM 25.03 12/8/2009 7:32:00 AM 23.52
> > FAS Long 12/23/2009 7:27:00 AM 25.03 1/5/2010 2:42:00 PM 27.03
> > FAS Long 2/16/2010 2:31:00 PM 23.18 2/22/2010 1:24:00 PM 25.03
> > FAS Long 3/5/2010 9:44:00 AM 27.03 3/10/2010 9:10:00 AM 29.19
> >
> > First few trades from Log File:
> > Symbol, Action, Date, Time, Buy point, Entry, Exit
> > FAS, Bought, 2009-11-30, 14:53:00, 5, 25.0300
> > FAS, StopLoss, 2009-12-08, 07:32:00, 5, 25.0300, 23.5200
> > FAS, Bought, 2009-12-23, 07:27:00, 5, 25.0300
> > FAS, Profit, 2010-01-05, 14:42:00, 5, 25.0300, 27.0300
> > FAS, Bought, 2010-01-05, 14:42:00, 6, 27.0300
> > FAS, StopLoss, 2010-01-22, 06:11:00, 6, 27.0300, 25.4000
> > FAS, Bought, 2010-02-16, 14:31:00, 4, 23.1800
> > FAS, Profit, 2010-02-22, 13:24:00, 4, 23.1800, 25.0300
> >
> > [Since no one wants a 1,000 line email, full files are at:
> > http://michaels-musings.com/amibroker-optimizer-and-backtester-losing-trades.html
> > ]
> >
> > firstSystemPostCopy.afl - Script I'm running
> > trades.html - Backtester trade list
> > settings.html - Backtester settings
> > stats.html - Backtester stats
> > firstSystemLog.txt - Log File created by firstSystemPostCopy.afl
> > AmiBrokerLostTrades.xls - Trade list from log file w/ computed Profit
> >
> >
>


Reply via email to