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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔模型>>正文內(nèi)容

金字塔VBA日內(nèi)交易策略源碼[金字塔模型]

 

 

 

dim ss
    ss = 1
''''''''''多頭止損系數(shù)
dim n1
    n1 = 10
''''''''''空頭止損系數(shù)
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.kzuj.com.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
'''''''''''''''''''''日內(nèi)平倉
    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
  
 

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

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

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 亚洲视频久久 | 精品国产成人系列 | 亚洲精品国产成人专区 | 亚洲欧美日韩中文综合v日本 | 久久怡红院亚欧成人影院 | 麻豆回家视频区一区二 | 15yc宅男影院在线观看 | 天天色操 | 国产91精品不卡在线 | 欧美日韩亚洲区久久综合 | 色你懂的 | 日狠狠| 亚洲激情久久 | 午夜伦理网| 色操在线| 99爱在线精品视频免费观看9 | 高清成年美女xx免费网站黄 | 18一20岁一级毛片 | 一个人看的www片免费中文 | 男人天堂网2021 | 亚洲精品第一综合99久久 | 韩国伦理剧在线观看 | 亚洲图片二区 | 最近韩国日本免费观看mv免费版 | 欧美一区二区视频三区 | 黄色片网站在线播放 | 亚洲欧美视频一区二区三区 | 日韩高清伦理片中字在线观看 | 18女人免费毛片a级 18女人毛片水真多免费 | 黄色毛片a| 免费成人激情视频 | 成人日批视频 | 中国一级黄色录像片 | 亚洲成人午夜影院 | 日本免费高清一区 | 中文字幕在线视频一区 | 草逼视频免费观看 | 国产在线观看99 | 黑人videos巨大hd粗暴 | 午夜乩伦| 不卡视频一区二区 |