Legacy functions/features

List of outdated functions/variables as of AmiBroker 6.39:

  1. EnableRotationalTrading() function
    replaced by
    backtestRotational mode of SetBacktestMode() function

  2. Equity() function

    IMPORTANT NOTE: Equity() function uses so called "old" single-security backtester that offers only subset of features of new backtester. To retrieve value of portfolio-level equity generated by new backtester use Foreign("~~~EQUITY", "C").

  3. ExRemSpan() function
    replaced by
    ApplyStop() function

  4. GetCategorySymbols() function
    replaced by
    CategoryGetSymbols() function

  5. PositionSize variable
    replaced by
    SetPositionSize() function.

  6. WriteVal() function
    replaced by
    NumToStr() function

Obsolete Analysis functionalities:

Old Analysis being replaced by New Analysis in AB 5.50.

Obsolete analysis programming features:



-> In new code use AddColumn, AddTextColumn, AddMultiTextColumn() functions.

Obsolete Chart functionalities:



AmiBroker Object Model:


Obsolete object Analysis of Old Analysis window.
New ones (for New Analysis window): AnalysisDoc, AnalysisDocs



If something is missing or other outdated functions/features appear in upcoming AmIBroker versions then feel free to add in posts below.


I think it should be noted in the case of Equity(), it still has a modern use-case.
I don't know if this could possibly be true with other functions.

1 Like

The reason for Equity() being outdated has been explicitly mentioned already.
It is just single security backtester with limited number of features compared to portfolio backtester.
As for limited number of features:
E.g. some SetOption() fields will not work with Equity function.
Also Currency conversion (see Tools - Preferences - Currencies) will not work with that function.

It does not mean that you can not use Equity function anymore.
But you should be aware of its limitations.

But besides of your example Equity() is also used for output of ApplyStop exit signals in chart/scan/explorer.

Another function to the list:

  1. IsEmpty()

    AFL Function Reference - ISEMPTY

    IsNull is a synonym for IsEmpty. It is suggested to use IsNull in new formulas, because of naming consistency with Null constant.

Correct. Which is why I mentioned it. The wording both in the thread title and body entails it is obsolete and has no significant use for us now, when in fact it provides very specific functionality that nothing else can (no my knowledge).

when in fact it provides very specific functionality that nothing else can (no my knowledge).

Your statement is incorrect.
You can achieve the same goal/results (multiple equities per same data and via single AFL) with portfolio backtester too! Just via different coding.

Long story short and once again...
You can get same results with portfolio backtester (and via up-to-date features) that you can get with Equity function backtester. But you can not use same features and as such can not get same results with Equity() function in comparison to using portfolio backtester.

The wording both in the thread title and body entails it is obsolete

The thread subject clearly says that it is about obsolete and outdated functions and features.
Also by comments of AmiBroker in the past the Equity function will not get updated to being compatible to new backtester features (being available to portfolio backtester. I don't know if it is still the case but that's what was communicated in the past). So since it won't get updated it is outdated. So Equity() function being part of list is absolutely valid!

1 Like

I would not call them obsolete. I would call them "legacy". They are valid and will remain valid and working forever (I don't break backward compatibility).

Someone seriously gone overboard with that. @fxshrat is NOT member of AmiBroker staff and has no title to declare functions as obsolete.