Are you talking about a portfolio equity curve or the equity curve
of an individual security? Unfortunately, I think equity() only works
for individual securities, not portfolio equity. I have been looking
into the same issue with respect to portfolio equity, but am stuck as
well.
-Greg
--- In amibroker@xxxxxxxxxps.com,
Rick Osborn <ricko@xxx> wrote:
>
> Check the IIF function in the Help files.
>
> The proper construct is
> positionsize = IIF(equity() > ma(equity(), 20), -20, -10);
>
> Best Regards
> Rick Osborn
>
>
>
>
> ________________________________
> From: Wolfgang Hader <faked@xxx>
> To: amibroker@xxxxxxxxxps.com
> Sent: Fri, November 6, 2009 3:49:41 PM
> Subject: [amibroker] Trading equity-curve in Amibroker
>
>
> Hi all,
>
> how can I code some like this in Amibroker
> (I know the following code is wrong, but how can I do it correctly
in
> Amiboker)?
>
> iif(equity() > ma(equity(), 20), positionsize= -20,
positionsize= -10);
>
> Thank you,
> BR
>