请教版主及各位老师: 之前在论坛看过有高人提到用Script来控制Amibroker,有点不太明白,后来才知道就在是AFL中插入脚本。因为AmiBroker官方也没有更一步的资料可以参考。所以想请教一下,AB能否实现我们绝大部分的想法? 有没有必要再用VBscript和Jscript来补充?或者是用C等语言来进行二次开发? 如果用用Script来做,目前我们要如何学习哪一个Script比较好? 谢谢。
Hi, You can find the official document for OLE automation here: http://www.amibroker.com/guide/objects.html As far as I know, you can do almost everything that you used to do with jscript/vbscript in AFL instead. Use this line: AB = CreateObject("broker.application"); then call any OLE function with the AB variable. However, some functions (e.g. AB.Import()) do not work in AFL. You need to use jscript/vbscript instead. For me, I use JScript to import historical data to Amibroker for scanning and exploration, and remove expired option contracts etc... it's quite useful actually for repeated tasks. For the choice of language, I recommend JScript. If you are good with Excel VBA then you will be right at home with VBScript.