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

金字塔VBA日內交易策略源碼[金字塔模型]

 

 

 

dim ss
    ss = 1
''''''''''多頭止損系數
dim n1
    n1 = 10
''''''''''空頭止損系數
dim n2
    n2 = 10
   
'''''''''   
dim n3
    n3 = 4
   
dim LastHigh
dim LastLow
dim LastClose
dim Icode
dim Imarket
sub application_vbastart()
    call MarketData.RegReportNotify("if03","zj")
end sub
// www.tumamayizhan.com
sub MarketData_ReportNotify(ReportData)
    set ReportData = MarketData.GetReportData("if03","zj")
    NewPrice = ReportData.NewPrice
    LastHigh = ReportData.LastHigh
    'call application.MsgOut(LastHigh&" "&NewPrice)
   
    '''''''''''''''''持倉信息
    dim BuyHoding
    dim SellHoding
    dim BuyCost
    'dim SellHoding
    call order.HoldingInfoByCode2("if03","zj", BuyHoding, BuyCost, BuyTodayHoding, SellHoding, SellCost, SellTodayHoding, PNL, UseMargin,Account)
    ''''''''''''''''品種信息
    dim MinTick
    call order.Contract("if03","zj", Multipliter, MinTick, ShortPercent, LongPercent)
'''''''''''''''''''''多頭
'BuyHoding=0 and SellHolding=0 and
    if Hour(Time) >09 and Hour(Time) <14 and    NewPrice>LastHigh and BuyHolding = 0 then
       call application.MsgOut("多頭開!")
       call order.buy(1,ss,0,0,"if03","zj","",0)
    end if
'''''''''''''''''''''空頭
'BuyHoding=0 and SellHolding=0 and
    if  Hour(Time) >09 and Hour(Time) <14 and   NewPrice<LastHigh and SellHolding = 0 then
       // cxh99.com
       call application.MsgOut("空頭開!")
       call order.buyshort(1,ss,0,0,"if03","zj","",0)
    end if
'''''''''''''''''''''多止損
    if BuyHoding>0 and NewPrice<BuyCost-n1*MinTick and Hour(Time) >09 and Hour(Time) <14 then
       call application.MsgOut("多頭止損!")      
       call order.Sell(1,BuyHolding,0,0,"if03","zj","",0)
    end if
'''''''''''''''''''''空止損
    if SellHoding>0 and NewPrice>BuyCost+n2*MinTick and Hour(Time) >09 and Hour(Time) <14 then
       call application.MsgOut("空頭開!")   
       call order.SellShort(1,SellHolding,0,0,"if03","zj","",0)
    end if
'''''''''''''''''''''日內平倉
    if Hour(Time) >= 14 and Hour(Time) <=15 then
       call application.MsgOut("收盤全平!")
       call order.Sell(1,BuyHolding,0,0,Icode,Imarket,"",1)
       call order.SellShort(1,SellHolding,0,0,"if03","zj","",1)
    end if
End Sub

Sub UserForm1_CommandButton1_Click()
    call application.MsgOut(LastHigh&" "&NewPrice)
End Sub
  
 

 

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

可聯系技術人員 QQ: 1145508240  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


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

相關文章

    沒有相關內容
  主站蜘蛛池模板: 一级女性全黄生活片免费看| 国产伦理不卡伦理剧| 亚州无吗黄瓜视频有直播的不| 青青草97国产精品免费观看| 成人3d动漫网址在线观看| 亚洲精品影院久久久久久| 足恋玩丝袜脚视频免费网站| 少妇厨房愉情理9仑片视频| 亚洲AV无码AV制服另类专区| 男人天堂网在线观看| 国产精品久久久久久影视| 亚洲人成自拍网站在线观看| 精品国产夜色在线| 国产麻豆91网在线看| 久久精品免费一区二区三区| 精品国产无限资源免费观看| 国产欧美另类久久精品蜜芽| avtt天堂网手机资源| 果冻传媒91制片厂211| 国产一区二区三区在线观看视频 | 久久福利一区二区| 精品福利视频第一| 国产精品边做奶水狂喷小说| 久久九九久精品国产| 特大巨黑吊av在线播放| 国产成人无码免费看片软件| 一本久久a久久精品亚洲| 日韩中文精品亚洲第三区| 伊人久久久大香线蕉综合直播| 欧美sss视频| 少妇高潮无套内谢麻豆传| 久久夜色精品国产噜噜麻豆 | 蜜桃成熟时2005| 在线综合亚洲欧美网站天堂| 久久精品国产亚洲AV天海翼| 欧美系列第一页| 国产一二三视频| 成人福利在线视频| 天堂资源在线中文| 久久精品免费一区二区| 欧美性猛交xxxx乱大交蜜桃|