indices = BarIndex();
    firstIndex = LastValue(ValueWhen(Status("firstbarinrange"),
indices));
    lastIndex = LastValue(ValueWhen(Status("lastbarinrange"), indices));
    barsInRange = lastIndex - firstIndex + 1;


Mike


--- In [email protected], "jamesfarrow2003"
<jamesfarrow2...@...> wrote:
>
> Hello,
>
> I have what I think should be a pretty basic question, but I cannot
seem to figure it out.
>
> I am adding a custom back test metric to my system. I want to add a
penalty function (as described by Howard Bandy in QTS) based on trade
frequency.
>
> I hove found where to get the number of trades in the backtest
("AllQty" ), but I cannot figure out where to find the number of days
covered in the backtest.
>
> I thought I would be able to use intial equity, ending equity, and CAR
to calculate it, when I do, it does not come up with the right number.
Does AmiBroker use something other than the standard CAR calculation?
>
> Any help would be appreciated,
>
> James
>


Reply via email to