有人给我一些示例代码,如何使用带有C#的AmiBroker插件将库存EOD数据添加到amibroker。我从amibroker.codeplex.com下载'带有C#的AmiBroker插件'。它没有任何文件说明如何将EOD数据添加到库存中。
答案 0 :(得分:1)
基本上,您只需要在Plugin.cs / GetPluginInfo()方法中添加有关插件的信息,并在Plugin.cs / GetQuotesEx()中引用相关逻辑。例如:
public static unsafe int GetQuotesEx(string ticker, Periodicity periodicity,
int lastValid, int size, Quotation* quotes,
GQEContext* context)
{
for (var i = 0; i < 5; i++)
{
quotes[i].DateTime = new AmiDate(DateTime.Now.AddDays(i - 5));
quotes[i].Price = 10;
quotes[i].Open = 15;
quotes[i].High = 16;
quotes[i].Low = 9;
quotes[i].Volume = 1000;
quotes[i].OpenInterest = 0;
quotes[i].AuxData1 = 0;
quotes[i].AuxData2 = 0;
}
return 5;
}
有关详细信息,请访问:http://github.com/kriasoft/amibroker