欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 这个程序编译的时候通不过,不知道怎么转换,请教了

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3180人关注过本帖树形打印复制链接

主题:这个程序编译的时候通不过,不知道怎么转换,请教了

帅哥哟,离线,有人找我吗?
yuhongcpa
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:17 积分:0 威望:0 精华:0 注册:2014/8/29 21:16:33
这个程序编译的时候通不过,不知道怎么转换,请教了  发帖心情 Post By:2014/9/1 22:14:31 [只看该作者]

dim shanchushanchu = 0 ;
dim dangtianshuju ;
dim bili bili = 0.001 ; 
dim xinheyuexinheyue = "IF88" ;
dim xinmingchengxinmingcheng = "IF等价K线";
dim xinshichangxinshichang = "ZJ" ;
dim laoheyuelaoheyue = "IF00" ;
dim laoshichanglaoshichang = "ZJ";
dim laozhishulaozhishu = "IF13" ;
Sub lishishuju() ;
cunzai = marketdata.IsExistStock(xinheyue,xinshichang)    ;
if cunzai = 0 then      
call
marketdata.AddStock(xinheyue,xinshichang,xinmingcheng)  ;    
 application.MsgOut ; 
else     
 application.MsgOut;
end if
          
set
Report1 = marketdata.GetReportData(laoheyue,laoshichang) ;      
qj = Report1.Open*bili   ;       
if shanchu = 1
then           
Set
History1 = marketdata.GetHistoryData(xinheyue,xinshichang,0);           
for j = 0 to History1.Count-1      
History1.RemoveAt(j) ;     
next          
call
History1.InsertAt(0)      ;
 History1.open(0) = Report1.Open    ;  
History1.close(0) = Report1.Open       ;
History1.high(0) = Report1.Open       ;
History1.low(0) = Report1.Open      ;
History1.Date(0) = Report1.Date       ;
History1.Volume(0) = Report1.Volume      ;
History1.OpenInt(0) = Report1.OpenInt      ;
Call
 History1.SaveData(xinheyue,xinshichang,1)  ;            
application.MsgOut ;"等价K线【历史数据初始化】成功!"   
end if                 
set
minutedata = marketdata.GetMinuteData(laoheyue,laoshichang) ;  
Count =  minutedata.Count    ;       
for i = 1 to count-1            
Set
History2 = marketdata.GetHistoryData(xinheyue,xinshichang,0) ;            
mxopen = History2.open(History2.Count-1);       
mxclose = History2.close(History2.Count-1);       
mxhigh = History2.high(History2.Count-1);       
mxlow = History2.low(History2.Count-1);       
mxDate = History2.Date(History2.Count-1);       
mxVolume = History2.Volume(History2.Count-1);       
mxOpenInt = History2.OpenInt(History2.Count-1);       
close = minutedata.newprice(i);       
fbDate = minutedata.Date(i);             
Volume = minutedata.Volume(i);       
mxVolume = minutedata.Volume(i-1);       
OpenInt = minutedata.OpenInt(i);       
if close > mxhigh
then
mxhigh = close;
end if      
if close < mxlow 
then
mxlow = close;
end if       
mxdate = fbDate;       
mxxVolume = (Volume-mxVolume)+mxxVolume;       
mxOpenInt = OpenInt ;              
History2.close(History2.Count-1) = close;       
History2.high(History2.Count-1) = mxhigh;       
History2.low(History2.Count-1) = mxlow ;      
History2.Date(History2.Count-1) = mxdate;         
History2.Volume(History2.Count-1) = mxxVolume;         
History2.OpenInt(History2.Count-1) = mxOpenInt;        
call
History2.SaveData(xinheyue,xinshichang,1);              
if abs(close-mxopen) > qj
then                    
call
History2.InsertAt(History2.Count) ;      
History2.open(History2.Count-1) = close;       
History2.close(History2.Count-1) = close;       
History2.high(History2.Count-1) = close ;      
History2.low(History2.Count-1) = close  ;     
History2.Date(History2.Count-1) = mxdate;         
History2.Volume(History2.Count-1) = 0;          
History2.OpenInt(History2.Count-1) = OpenInt;         
call
History2.SaveData(xinheyue,xinshichang,1);          
mxxVolume = 0  ;     
 end if            
next
End Sub
sub dengjiaK();   
call
lishishuju();
end sub
Sub APPLICATION_VBAStart();   
call
Application.SetTimer(0,1000);

Sub APPLICATION_Timer(ID);      
if ID = 0
then   
 if (cdate(time)<=cdate("11:30:00") and cdate(time)>cdate("9:15:00")) or (cdate(time)<=cdate("15:15:00") and cdate(time)>cdate("13:00:00")) then           '等价区间处理         
set
Report1 = marketdata.GetReportData(laoheyue,laoshichang);        
qj = Report1.Open*bili;              
set
Report2; = marketdata.GetReportData(laozhishu,laoshichang);                        
Set
History2 = marketdata.GetHistoryData(xinheyue,xinshichang,0);             
mxopen = History2.open(History2.Count-1);       
mxclose = History2.close(History2.Count-1);       
mxhigh = History2.high(History2.Count-1);       
mxlow = History2.low(History2.Count-1);       
mxDate = History2.Date(History2.Count-1);       
mxxVolume = History2.Volume(History2.Count-1);       
mxOpenInt = History2.OpenInt(History2.Count-1);               
set
minutedata = marketdata.GetMinuteData(laoheyue,laoshichang);       
Count =  minutedata.Count ;                       
close = minutedata.newprice(Count-1);       
fbDate = minutedata.Date(Count-1);        
mxVolume = minutedata.Volume(Count-2);       
Volume = minutedata.Volume(Count-1);       
OpenInt = minutedata.OpenInt(Count-1);       
if close > mxhigh
then
mxhigh = close ;
end if       
if close < mxlow
then
mxlow = close ;
end if       
mxdate = fbDate ;      
mxxVolume = mxxVolume+(Volume-mxVolume);       
mxOpenInt =OpenInt' ;     
 application.MsgOut mxxVolume&" "&Volume&" "&Volume-mxVolume       
 History2.close(History2.Count-1) = close;       
History2.high(History2.Count-1) = mxhigh ;      
History2.low(History2.Count-1) = mxlow ;      
History2.Date(History2.Count-1) = mxdate;         
History2.Volume(History2.Count-1) = mxxVolume;         
History2.OpenInt(History2.Count-1) = mxOpenInt ;        
call
History2.SaveData(xinheyue,xinshichang,1) ;             
if abs(close-mxopen) > qj
then                 
call
History2.InsertAt(History2.Count) ;      
History2.open(History2.Count-1) = close;       
History2.close(History2.Count-1) = close ;      
History2.high(History2.Count-1) = close  ;     
History2.low(History2.Count-1) = close   ;    
History2.Date(History2.Count-1) = mxdate   ;      
History2.Volume(History2.Count-1) = 0    ;     
History2.OpenInt(History2.Count-1) = OpenInt ;      
call
History2.SaveData(xinheyue,xinshichang,1);
mxxVolume = 0  ;     
end if           
 call Application.ActivateFrameWithCode("Technic",xinheyue,xinshichang,0);    
call
Technic.Refresh;         
end if               
end if  
end sub
Sub to_0()

Set History = marketdata.GetHistoryData("IF88","ZJ",0);
for i=0 to History.Count-1History
Volume(i) = 0;
next
call
History.SaveData("IF88","ZJ",1);

 

End Sub

 


dim shanchushanchu = 0

dim dangtianshuju

dim bili bili = 0.001  

dim xinheyuexinheyue = "IF88"

dim xinmingchengxinmingcheng = "IF等价K线"

dim xinshichangxinshichang = "ZJ"

dim laoheyuelaoheyue = "IF00"

dim laoshichanglaoshichang = "ZJ"

dim laozhishulaozhishu = "IF13"

Sub lishishuju()

cunzai = marketdata.IsExistStock(xinheyue,xinshichang)   

if cunzai = 0 then      

call

marketdata.AddStock(xinheyue,xinshichang,xinmingcheng)      

 application.MsgOut  

else     

 application.MsgOut

end if

          

set

Report1 = marketdata.GetReportData(laoheyue,laoshichang)       

qj = Report1.Open*bili          

if shanchu = 1

then           

Set

History1 = marketdata.GetHistoryData(xinheyue,xinshichang,0)           

for j = 0 to History1.Count-1      

History1.RemoveAt(j)      

next          

call

History1.InsertAt(0)     

 History1.open(0) = Report1.Open      

History1.close(0) = Report1.Open      

History1.high(0) = Report1.Open      

History1.low(0) = Report1.Open     

History1.Date(0) = Report1.Date      

History1.Volume(0) = Report1.Volume     

History1.OpenInt(0) = Report1.OpenInt     

Call

 History1.SaveData(xinheyue,xinshichang,1)              

application.MsgOut "等价K线【历史数据初始化】成功!"   

end if                 

set

minutedata = marketdata.GetMinuteData(laoheyue,laoshichang)   

Count =  minutedata.Count           

for i = 1 to count-1            

Set

History2 = marketdata.GetHistoryData(xinheyue,xinshichang,0)              

mxopen = History2.open(History2.Count-1)       

mxclose = History2.close(History2.Count-1)       

mxhigh = History2.high(History2.Count-1)       

mxlow = History2.low(History2.Count-1)       

mxDate = History2.Date(History2.Count-1)        

mxVolume = History2.Volume(History2.Count-1)       

mxOpenInt = History2.OpenInt(History2.Count-1)       

close = minutedata.newprice(i)       

fbDate = minutedata.Date(i)             

Volume = minutedata.Volume(i)       

mxVolume = minutedata.Volume(i-1)       

OpenInt = minutedata.OpenInt(i)       

if close > mxhigh

then

mxhigh = close

end if      

if close < mxlow 

then

mxlow = close

end if       

mxdate = fbDate       

mxxVolume = (Volume-mxVolume)+mxxVolume        

mxOpenInt = OpenInt               

History2.close(History2.Count-1) = close       

History2.high(History2.Count-1) = mxhigh       

History2.low(History2.Count-1) = mxlow       

History2.Date(History2.Count-1) = mxdate         

History2.Volume(History2.Count-1) = mxxVolume         

History2.OpenInt(History2.Count-1) = mxOpenInt        

call

History2.SaveData(xinheyue,xinshichang,1)              

if abs(close-mxopen) > qj

then                    

call

History2.InsertAt(History2.Count)       

History2.open(History2.Count-1) = close       

History2.close(History2.Count-1) = close       

History2.high(History2.Count-1) = close       

History2.low(History2.Count-1) = close       

History2.Date(History2.Count-1) = mxdate         

History2.Volume(History2.Count-1) = 0          

History2.OpenInt(History2.Count-1) = OpenInt         

call

History2.SaveData(xinheyue,xinshichang,1)          

mxxVolume = 0       

 end if            

next

End Sub

sub dengjiaK()   

call

lishishuju()

end sub

Sub APPLICATION_VBAStart()   

call

Application.SetTimer(0,1000)

 

Sub APPLICATION_Timer(ID)      

if ID = 0

then   

 if (cdate(time)<=cdate("11:30:00") and cdate(time)>cdate("9:15:00")) or (cdate(time)<=cdate("15:15:00") and cdate(time)>cdate("13:00:00")) then           '等价区间处理         

set

Report1 = marketdata.GetReportData(laoheyue,laoshichang)        

qj = Report1.Open*bili              

set

Report2 = marketdata.GetReportData(laozhishu,laoshichang)                         

Set

History2 = marketdata.GetHistoryData(xinheyue,xinshichang,0)             

mxopen = History2.open(History2.Count-1)       

mxclose = History2.close(History2.Count-1)       

mxhigh = History2.high(History2.Count-1)       

mxlow = History2.low(History2.Count-1)       

mxDate = History2.Date(History2.Count-1)       

mxxVolume = History2.Volume(History2.Count-1)       

mxOpenInt = History2.OpenInt(History2.Count-1)               

set

minutedata = marketdata.GetMinuteData(laoheyue,laoshichang)       

Count =  minutedata.Count                        

close = minutedata.newprice(Count-1)       

fbDate = minutedata.Date(Count-1)        

mxVolume = minutedata.Volume(Count-2)       

Volume = minutedata.Volume(Count-1)        

OpenInt = minutedata.OpenInt(Count-1)       

if close > mxhigh

then

mxhigh = close

end if       

if close < mxlow

then

mxlow = close

end if       

mxdate = fbDate       

mxxVolume = mxxVolume+(Volume-mxVolume)       

mxOpenInt =OpenInt'      

 application.MsgOut mxxVolume&" "&Volume&" "&Volume-mxVolume       

 History2.close(History2.Count-1) = close       

History2.high(History2.Count-1) = mxhigh       

History2.low(History2.Count-1) = mxlow       

History2.Date(History2.Count-1) = mxdate         

History2.Volume(History2.Count-1) = mxxVolume         

History2.OpenInt(History2.Count-1) = mxOpenInt         

call

History2.SaveData(xinheyue,xinshichang,1)              

if abs(close-mxopen) > qj

then                 

call

History2.InsertAt(History2.Count)       

History2.open(History2.Count-1) = close       

History2.close(History2.Count-1) = close       

History2.high(History2.Count-1) = close       

History2.low(History2.Count-1) = close       

History2.Date(History2.Count-1) = mxdate         

History2.Volume(History2.Count-1) = 0         

History2.OpenInt(History2.Count-1) = OpenInt       

call

History2.SaveData(xinheyue,xinshichang,1)

mxxVolume = 0       

end if            

 call Application.ActivateFrameWithCode("Technic",xinheyue,xinshichang,0)    

call

Technic.Refresh         

end if               

end if  

end sub

Sub to_0()

 

Set History = marketdata.GetHistoryData("IF88","ZJ",0)

for i=0 to History.Count-1History

Volume(i) = 0

next

call

History.SaveData("IF88","ZJ",1)

 

 

 

End Sub


 回到顶部
帅哥哟,离线,有人找我吗?
王锋
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2014/9/1 22:17:50 [只看该作者]



金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
yuhongcpa
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:17 积分:0 威望:0 精华:0 注册:2014/8/29 21:16:33
  发帖心情 Post By:2014/9/1 22:40:54 [只看该作者]

主要看哪一部分,我昨天都打印出来了

 回到顶部
帅哥哟,离线,有人找我吗?
yuhongcpa
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:17 积分:0 威望:0 精华:0 注册:2014/8/29 21:16:33
  发帖心情 Post By:2014/9/2 8:51:39 [只看该作者]

这几天都在看,还是不知道怎么转换

 回到顶部