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 )
);
For more details see Tutorial: Backtesting your trading ideas