You still can use OLE but OLE has got nothing to do with Amibroker. OLE is developed by Microsoft. And as such OLE can not be multi-threaded. OLE is old-fashioned technology. www.amibroker.com/guide/h_multithreading.html As said you can still use it. But the warning messages are recommendations. For auto-trading use stuff like Amibroker's IB controller.
帮助里说AB界面图表使用了多线程,如果用CreateObject可能会引起死锁,应当避免使用,看了微软页面说只能单线程。做外汇的可以用IB,我是想用AB做国内期货,只有CTP的COM接口,脚本里要CreateObject啊。不知Amibroker's IB controller内部是怎么实现的。
如果要让AB运行地又快又稳定的话,我建议你把自动交易的代码放在exploration里面,扫描的原理是逐个ticker运行,每个ticker产生相应的交易指令,这样用COM不会有问题。 如果你把交易代码写到指标上,又调用COM的话,AB 5.5就是每个图一个线程(如果我理解正确的话),就涉及多线程的问题了。而且,如果AFL自动交易的代码太复杂,ticker太多的话,整个系统也快不了。 没办法,AB的功能其实是太强太灵活,所以用不好的话(尤其是再加上多线程),反而出现很多问题。AB的用户手册里面也没有针对在indicator和exploration上面开发自动交易系统的这些区别做详细说明,这个在AB 的yahoo group上有一般人专门讨论过,都说exploration上面做自动交易系统要更高效和稳定。我的经验也是这样。