如何使用IPOStockQuotasProvider和IPOStocksProvider查询新股申购额度和新股申购列表?
使用IPOStockQuotasProvider
查询新股申购额度信息,具体用法见示例一:
示例1:使用IPOStockQuotasProvider查询新股申购额度信息
using guosen;
vars:IPOStockQuotasProvider IQP(null);
method void AnalysisTechnique_Initialized( elsystem.Object sender, elsystem.InitializedEventArgs args )
begin
IQP = new IPOStockQuotasProvider;
IQP.StateChanged += IQP_StateChanged;
IQP.Load = TRUE;
end;
Method void IQP_StateChanged(elsystem.object sender,tsdata.common.StateChangedEventArgs args)
vars:int loop;
Begin
if(args.NewState = tsdata.common.DataState.loaded)then
Begin
For loop = 0 to IQP.Count-1
Begin
print("资金账户:",IQP[loop].AccountID);
print("上海申购额度:",IQP[loop].SHIPOSharesQuota);
print("深圳申购额度:",IQP[loop].SZIPOSharesQuota);
End;
End;
End;
//打印输出示例
//资金账户:410009987251
//上海申购额度: 0.00
//深圳申购额度: 0.00
使用IPOStocksProvider
查询新股申购列表信息,具体用法见示例一:
示例2:使用IPOStocksProvider查询新股申购列表信息
using guosen;
vars:IPOStocksProvider ISP(null);
method void AnalysisTechnique_Initialized( elsystem.Object sender, elsystem.InitializedEventArgs args )
begin
ISP = new IPOStocksProvider;
ISP.StateChanged += ISP_StateChanged;
ISP.Load = TRUE;
end;
Method void ISP_StateChanged(elsystem.object sender,tsdata.common.StateChangedEventArgs args)
vars:int loop;
Begin
if(args.NewState = tsdata.common.DataState.loaded)then
Begin
print("今日可申购数:",ISP.Count);
For loop = 0 to ISP.Count-1
Begin
print("申购日期:",ISP[loop].ApplicationDate.ToString());
print("申购代码:",ISP[loop].BuyApplicationSymbol);
print("名称:",ISP[loop].Description);
print("发行价格:",ISP[loop].IssuePrice);
print("申购上限:",ISP[loop].MaxPurchase);
print("代码:",ISP[loop].Symbol);
End;
End;
End;
//今日可申购数: 0.00