PureBytes Links
Trading Reference Links
|
Tomasz,
Thanks - exactly what I was after - I had never given a thought to using the
cum function.
regards
Richard
----- Original Message -----
From: "Tomasz Janeczko" <tj@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, March 09, 2001 5:53 PM
Subject: Re: [amibroker] Automatic Analysis
> Hi Richard,
>
> To detect the last bar use the following code:
>
> /* detect the last bar */
> barnumber = cum( 1 );
> lastbar = barnumber == lastvalue( barnumber );
>
> /* and then modify the sell condition */
> sell = your_original_formula;
> sell = sell OR lastbar;
>
>
> Best regards,
> Tomasz
>
>
> ----- Original Message -----
> From: "Cloonan" <cloonan@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, March 09, 2001 07:38
> Subject: [amibroker] Automatic Analysis
>
>
> > Tomasz,
> >
> > In the automatic analysis window, is there anyway of reliably triggering
a
> > sale at the closing date of an analysis period?
> >
> > I like to do this so I can establish the nett financial position of a
system
> > (including sale transaction costs) as at the closing date. It also
makes it
> > easier to identify all the transactions which go into the results
reported.
> > (it is sometimes difficult to identify the purchase date of an unclosed
> > transaction unless other transactions have taken place on that ticker).
> >
> > I currently have a condition in the assignment of the SELL variable such
as
> > 'or (datenum() == 1010308)' but this test fails where no quotation
exists
> > for that day, leaving the possibility of open positions, and it requires
> > updating daily. Would it be worthwhile to have an option in the
settings
> > menu to close all transactions at the end?
> >
> > regards
> > Richard
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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/
>
>
|