大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

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

金字塔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.weiqiv.net.cn
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  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


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

相關文章

    沒有相關內容
  主站蜘蛛池模板: 九九这里只有精品 | 欧美精品免费在线 | 欧美色婷婷 | 天天干天天干天天色 | 国产精品久久久久久一区二区三区 | 奇米777四色影视在线看 | 国产亚洲自在精品久久 | 久久久夜色精品国产噜噜 | 日韩成人三级 | 国内精品久久久久久久 | 亚洲欧美网站 | 狠狠r| 四虎精品成人a在线观看 | 久久久久久999 | 国产精品香蕉成人网在线观看 | 欧美一级大片在线观看 | av亚洲男人天堂 | 国产精品欧美亚洲韩国日本 | 国产永久精品 | 久爱午夜精品免费视频 | 亚洲精品另类 | 国产高清精品久久久久久久 | 免费看一毛一级毛片视频 | 韩国一级特黄毛片大 | 九色精品视频在线观看 | 精品91精品91精品国产片 | 暗香影院午夜国产精品 | 久热只有精品 | 亚洲一区视频 | 看全色黄大色大片免费视频 | 久久精品免费视频6 | 国产成人精品第一区二区 | 精品国产一区二区麻豆 | 日韩视频区| 波多野结衣亚洲一区 | 中文字幕在线精品视频入口一区 | 久操香蕉 | 欧洲成人在线视频 | 蜜桃破解版免费看nba | 在线观看中文字幕 | 一级毛片不卡免费看老司机 |