大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频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
// m.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  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


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

相關文章

    沒有相關內容
  主站蜘蛛池模板: 天天干天天上 | 免费污视频在线观看 | 久久精品精品 | 亚洲一区二区三区免费在线观看 | 久久免费视频在线观看30 | 97在线资源| 欧美视频在线一区 | 亚洲免费在线视频播放 | 老司机福利深夜亚洲入口 | 久久国产加勒比精品无码 | 性做爰片视频毛片 | 久久88| 亚洲精品国产自在久久出水 | 国产中文字幕第一页 | 成 人 黄 片 大全 | 精品欧美一区二区三区在线 | 国产成 人 综合 亚洲网 | 国产一区二区三区免费视频 | 国产精品热久久毛片 | 奇米麻豆| 99九九成人免费视频精品 | 亚洲国产精品婷婷久久 | 夜夜橹 | 色伊伊| 国产对白有声小说 | 中文字幕精品在线 | 国内精品视频一区二区三区八戒 | 欧美一级毛片久久精品 | 国产精品成人一区二区 | a毛片久久免费观看 | 国产精品久久久久这里只有精品 | 久久夜色精品 | 色综合天天射 | 最近更新在线中文字幕一页 | 人人天天夜夜 | 成人午夜久久精品 | 天天射天天色天天干 | 日韩在线视精品在亚洲 | 色www国产阿娇 | 色噜噜五月综合激情久久爱 | 久久黄色免费 |