COCO研究院

 找回密碼
 註冊
搜索
查看: 3913|回復: 2

[範例程式碼] 请问:AFL里面可以调用DLL里面的数据吗?

[複製鏈接]
發表於 11-9-22 20:46 | 顯示全部樓層 |閱讀模式
例如把 “YYMA=MA(Close,10);  ” 放到DLL里面,
可以在AFL里面调用“YYMA”吗?
用什么语句呢?


谢谢!
發表於 11-9-23 13:59 | 顯示全部樓層
這得先去鑽一下User's Guide中Plug-in in AFL提到的部份
Plug-in in AFL
This section describes regular plug-in DLLs. If you are interested in ActiveX plugins check "COM support in AFL" section.

Plugin interface
AmiBroker Plugin interface allows to call an external module (DLL library) directly from AFL. Such a library can expose multiple functions that can be used in your trading systems, indicators, commentaries, scans and explorations. The plugin DLL can be created using any C/C++ compiler, Delphi and other languages supporting creation of regular DLLs. As the code of a plug in is compiled to a native processor machine code it runs several times faster than AFL. Also since you can use full power of C/C++ (or other) language to build the most complex functions with ease.

In addition to exposing functions to AFL, plugin DLLs have ability to call back AFL built-in functions, directly retreive and set AFL variables and support automatic syntax colouring of functions exposed by the plugin.

A detailed description of plugin interface and the sample code of plug in DLL are included in the AmiBroker Development Kit (ADK). The ADK is available for registered users only (downloadable from members area).


Getting 3rd party plugins

Freeware 3rd party plugins are available for download from http://www.amibroker.net/3rdparty.php

Using third-party plugins:

To use third-party plugin DLL just copy the DLL file to the Plugins folder in the AmiBroker directory. Then run AmiBroker. Then choose Tools->Plugins menu. In the Plugins window you should see the list of all loaded plugin DLLs. If AmiBroker was running when you copied the DLL you should click on "Unload" and then on "Load" button. This will force rescanning the Plugins folder and loading the DLLs.

When the plugin DLL is loaded the new functions exposed by this DLL become available to all your AFL formulas. For the list of functions exposed by plugin you should consult the documentation of the plugin itself.

IMPORTANT NOTE: AmiBroker makes no representations on features and performance of non-certified third-party plug-ins. Specifically certain plug-ins can cause instabilities or even crashes. Entire use of non-certified third-party plugins is at your own risk.


這玩意→AmiBroker Development Kit (ADK)
 樓主| 發表於 11-9-25 13:20 | 顯示全部樓層
谢谢 非常感谢
谢谢 非常感谢
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-11-23 00:22

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |