The formula that you are trying to backtest does not contain proper Buy and Sell rules. Buy and Sell rules should be written as assignments as shown below:
Buy = Cross( Close, MA( Close, 50 ) );
Sell = Cross( MA( Close, 50 ), Close ) );
Help please.
Did you install the code that comes with Builder that is required by AmiBroker? From the user’s guide (Getting Started, Installation):
Platform Files: Builder includes several functions and indicators that need to be installed into the trading platforms for Builder-generated strategies to run properly. If these functions are not installed, the strategies generated by the program will not compile or run. These functions must be installed separately for each platform you intend to use for trading. Please read the sections below for the platforms you intend to use. To determine if the platform files have been updated for the current release and therefore need to be re-installed (if installed previously), please refer to the Release Notes page at Adaptrade.com or see the notes on the trial download page for the current release.
…
AmiBroker Installation Notes. AmiBroker strategies created by Builder require an associated "include" file: ASBuilderCommon.afl. This file can be found in the AFL folder in the Adaptrade Builder folder after Builder is installed. This file needs to be copied to the Include folder in the AmiBroker Formulas folder under Program Files. The full path under 64-bit Windows is C:\Program Files\AmiBroker\Formulas\Include. This file provides basic functionality that all AmiBroker strategies generated by Builder require.
Mike Bryant
Adaptrade Software
All AmiBroker strategies generated by Builder include the following line near the top of the strategy, just under the comment block:
#include <ASBuilderCommon.afl>
That’s where the required code is included in the strategy. You should not directly copy the code from ASBuilderCommon.aft directly into the strategy code.
If for some reason the strategy code you’re looking at doesn't contain the #include statement shown above, it’s not a valid Builder-generated strategy for AmiBroker. In that case, you should rerun the strategy; i.e., “Evaluate” it from the Evaluation menu, making sure AFL (“Ami”) is selected as the code type. In general, if you want to build strategies for AmiBroker, you should select the AmiBroker code type prior to building.