PureBytes Links
Trading Reference Links
|
Hi,
You are right lastbar refers to the last bar loaded (it always was like this).
The formula you quoted was a workaround since pre 3.65 versions haven't
included open trade in the trade list.
I really don't see the point now in using workaround since it is no longer needed.
But ... if you need this for some reason and use date ranges you can
use
lastbar = datenum() == 1010823;
sell = sell OR lastbar;
when working with the date range you have given in the example.
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: <qqqqq_99999_qqqqq@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, August 25, 2001 12:12 PM
Subject: [amibroker] Re: "lastbar exit" stopped working in 3.68Beta?
>
> It turned out I could observe the phenonmenon when I set "range" in
> Automatic Analysis window to the date other than the last date
> loaded.
>
> So I'd assume "lastbar" refers to the last bar loaded, not the last
> bar of the analysis range.
>
> Assuming the last date of the loaded data is 2001/08/24, when I set
> analysis range to 2001/08/23 or before, how can I change the
> following code so that I can exit at the last bar of the analysis
> range and have no open position.
>
> barnumber =cum(1 );
> lastbar =barnumber ==lastvalue(barnumber );
> buy =datenum()==1010801;
> sell =lastbar;
>
> Thank you in advance.
>
> sincerely,
>
>
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > Hello,
> >
> > > Thank you for your prompt reply.
> > >
> > > But when you exit at the last bar, it's not an open position any
> > > more. It's a closed trade. Thus, it should be reported as Total
> > > number of trades and Open position gain/loss be reported as zero
> in
> > > AmiBroker System Test Report Overall performance summary, should
> it
> > > not?
> >
> > I think we should differentiate between trades closed by the system
> > itself, and open trade that was closed out at the end of the
> testing
> > range. Open trade usually does not show true system behaviour,
> > so I think it should be reported separately as it is now.
> >
> > Any other ideas?
> >
> > Best regards,
> > Tomasz Janeczko
> > ===============
> > AmiBroker - the comprehensive share manager.
> > http://www.amibroker.com
> >
> > >
> > >
> > > --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > > > Hello,
> > > >
> > > > There is no need for last bar exit anymore in v3.65 and higher
> > > > since AmiBroker reports open positions in the trade list.
> > > >
> > > > Best regards,
> > > > Tomasz Janeczko
> > > > ===============
> > > > AmiBroker - the comprehensive share manager.
> > > > http://www.amibroker.com
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: <qqqqq_99999_qqqqq@xxxx>
> > > > To: <amibroker@xxxx>
> > > > Sent: Friday, August 24, 2001 7:27 PM
> > > > Subject: [amibroker] "lastbar exit" stopped working in
> 3.68Beta?
> > > >
> > > >
> > > > >
> > > > > I installed 3.68 Beta and "lastbar exit" seemed to stop
> working.
> > > > >
> > > > > barnumber = cum( 1 );
> > > > > lastbar = barnumber == lastvalue( barnumber );
> > > > > buy = datenum() == 1010801;
> > > > > sell = lastbar;
> > > > >
> > > > > Total number of trades should be one, not zero and there
> should
> > > not
> > > > > be Open position gain/loss.
> > > > >
> > > > > Subsequently, all the related statistics seems to be messed
> up
> > > > > because of that.
> > > > >
> > > > > Am I doing anything wrong?
> > > > >
> > > > > sincerely,
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
|