1. Cash is a property of the backtester
so bo.Cash gives you the available cash at each bar;
2. posize and poscore are properties of the signal object.
if you want to you can do all your selling/scaleout first, and use the
available cash to do what you need.
and use the bo.EntrerTrade or bo.ScaleTrade to do what you need.
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of vlanschot
Sent: Thursday, 3 May 2007 11:00 PM
To: [email protected]
Subject: [amibroker] Re: CBT: Scaled trades
Thanks mate, but forgot to mention: I use rotational mode in CBT
which seems to complicate matters due to the fact that scaling is
triggered by stock-specific variables (arrays) which relate to both
(current vs. required) PositionSize and (previous vs. new)
PositionScore.
I have been unable to determine:
1) how much cash is available for all ScaleIns at each bar
2) how to allocate this cash according to a specific "ScaleIn"-rule.
Support question, I suspect.
PS
--- In [EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com,
"Paul Ho" <[EMAIL PROTECTED]> wrote:
>
> Mate
> If you're using CBT, you can program the way you want it
> just put scaleout before the others, they will be executed first ;)
>
>
> _____
>
> From: [EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com
[mailto:[EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com]
On Behalf
> Of vlanschot
> Sent: Thursday, 3 May 2007 9:01 PM
> To: [EMAIL PROTECTED] <mailto:amibroker%40yahoogroups.com> ps.com
> Subject: [amibroker] CBT: Scaled trades
>
>
>
> Could anybody possibly confirm whether ScaleOut trades are executed
> FIRST, in order to release cash for the subsequent ScaleIn trades?
>
> And if so, is the only way to calculate the resulting amount of
cash
> available for the ScaleIn-trades to add (PosSize - Exit
Commissions) of
> each ScaleOut to the bo.Cash of the previous bar?
>
> Thx,
>
> PS
>