When you run strategies in Amibroker scanner for multiple symbols, the orders are being fired only for the first symbol.
Solution
AutoTrader afl functions provided in (algotrader-util.afl) use chart level parameters. So same parameters are used for all symbols. But in case of scanner, you need a different parameter per symbol. In simple words, the symbol passed to placeOrder*() function must be different for each stock. No matter which placeOrder*() function you use, always pass a symbol using Name() function as shown below:
See (at-ema-crossover-scanner.afl) in AutoTrader samples (C:\autotrader\scripts\amibroker\Formulas\AutoTrader).
placeOrder(AT_EXCHANGE , AT_INSTRUMENT, AT_SYMBOL , “BUY”, AT_PRODUCT_TYPE , AT_ORDER_TYPE, 10, 0, 0, AT_OPTION_TYPE, AT_STRIKE_PRICE , AT_EXPIRY );
So change AT_SYMBOL to Name() function in your Amibroker afl.
placeOrder(AT_EXCHANGE , AT_INSTRUMENT, Name(), “BUY”, AT_PRODUCT_TYPE , AT_ORDER_TYPE, 10, 0, 0, AT_OPTION_TYPE, AT_STRIKE_PRICE , AT_EXPIRY );
Please refer to this link:
http://www.amibroker.com/kb/2014/10/29/using-per-symbol-parameter-values-in-charts/