人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識>>正文內容

這個程序編譯的時候通不過,不知道怎么轉換,請教了 [金字塔]

  • 咨詢內容:

    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

     

  • 金字塔客服: http://www.weistock.com/bbs/dispbbs.asp?boardid=5&Id=69458 5樓

     

  • 用戶回復: 主要看哪一部分,我昨天都打印出來了

     

  • 網友回復: 這幾天都在看,還是不知道怎么轉換

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 1145508240  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 日韩亚洲欧美综合一区二区三区 | a级大片免费看 | 日本三级香港三级人妇99视 | 国产全黄一级毛片 | 欧美精品亚洲精品日韩 | 综合网激情五月 | a一级免费 | 亚洲最大激情网 | aⅴ免费视频 | 777成了人乱视频 | 国产一区曰韩二区欧美三区 | 色喔喔 | 91看片淫黄大片在看 | 欧美高清无砖专区欧美精品 | 国产午夜精品福利 | 亚洲国产第一页 | 天天干狠狠干 | 成人午夜免费在线观看 | 国产制服丝袜视频 | 好吊色这里只有精品 | 精品亚洲综合在线第一区 | 最近新中文字幕大全高清 | 亚洲一区有码 | 亚洲无线一二三四区手机 | 成人影视免费观看 | 国产一二三区视频 | 日韩中文在线播放 | 日本三级免费网站 | 成人影院在线观看免费 | 亚洲免费在线观看 | 亚洲国产亚洲综合在线尤物 | 2017天天爽夜夜爽精品视频 | 午夜私人福利影院 | 韩日色 | 亚洲国产午夜精品理论片的软件 | 日本道在线播放 | 欧美色成人tv在线播放 | 亚洲欧美人成人综合在线50p | v天堂中文在线 | 激情婷婷成人亚洲综合 | 女性爽爽影院免费观看麻豆 |