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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 金字塔等>> 其他期貨軟件知識(shí)>>正文內(nèi)容

四周規(guī)則能寫成VBA模板嗎,方便大家學(xué)習(xí) [金字塔]

  • 咨詢內(nèi)容:

    四周規(guī)則能寫成VBA模板嗎,方便大家學(xué)習(xí)

    HHN:=ref(HHV(HIGH,20),1);
    HLN:=ref(LLV(LOW,20),1);

    IF H>=HHN then
    begin
    sellshort(holding<0,0,thisclose);
    buy(holding=0,1,thisclose);
    end

    IF L<=HLN then
    begin
    sell(holding>0,0,thisclose);
    buyshort(holding=0,1,thisclose);
    end

     

  • 金字塔客服:

    有必要嗎

    圖表可以實(shí)現(xiàn) VBA還要寫一遍。

     

  • 用戶回復(fù):

    任何策略都可以用VBA來(lái)實(shí)現(xiàn),只是代碼量比后臺(tái)或圖表策略大的多,調(diào)試也需要較長(zhǎng)的時(shí)間。

    如果只是單純的實(shí)現(xiàn)開(kāi)平倉(cāng)的目的,沒(méi)有必要使用VBa來(lái)做的。

     

     

  • 網(wǎng)友回復(fù): Sub ForWeekRule
     dim code
     dim market
     dim cyctype
     dim highest
     dim lowest
     
     code="RU00"
     market="SQ"
     cyctype=5
     
     set historydata =marketdata.GetHistoryData(code,market,cyctype)
     for i=historydata.count-22 to historydata-2
      if historydata.high(i)>highest then
       highest=historydata.high(i)
      end if
      
      if historydata.low(i)<lowest then
       lowest=historydata.low(i)
      end if
     next
     
     if historydata(historydata.count-1)>highest then
      order.buyshort 1,1,0,0,code,market,0,0
      order.buy 1,1,0,0,code,market,0,0
     end if
     
     if historydata(historydata.count-2)<lowest then
      order.SellShort 1,1,0,0,code,market,0,0
      order.sell 1,1,0,0,code,market,0,0
     end if
    end sub

     

  • 網(wǎng)友回復(fù):

    強(qiáng)Sub ForWeekRule
     dim code
     dim market
     dim cyctype
     dim highest
     dim lowest
     
     code="RU00"
     market="SQ"
     cyctype=5
     
     set historydata =marketdata.GetHistoryData(code,market,cyctype)
     for i=historydata.count-22 to historydata-2
      if historydata.high(i)>highest then
       highest=historydata.high(i)
      end if
      
      if historydata.low(i)<lowest then
       lowest=historydata.low(i)
      end if
     next
     
     if historydata(historydata.count-1)>highest then
      order.buyshort 1,1,0,0,code,market,0,0
      order.buy 1,1,0,0,code,market,0,0
     end if
     
     if historydata(historydata.count-2)<lowest then
      order.SellShort 1,1,0,0,code,market,0,0
      order.sell 1,1,0,0,code,market,0,0
     end if
    end sub


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒(méi)有相關(guān)內(nèi)容
主站蜘蛛池模板: 国产欧美精品一区二区三区–老狼 | 尹人在线视频 | 激情综合网婷婷 | 黄色三级日韩 | 免费观看性欧美一级 | 人人澡人人透人人爽 | 一个人视频资源在线观看www | 国产成人爱情动作片在线观看 | 午夜a视频 | 小黄漫画激情四射在线观看 | 成年人视频在线 | 最新精品亚洲成a人在线观看 | 欧美成人鲁丝片在线观看 | 久久国产免费观看精品 | 免费韩国理伦片在线观看 | 亚洲欧美成aⅴ人在线观看 亚洲欧美成人 | 国产精品久久精品视 | 3344a毛片在线看 | 2015xxx小明永久免费 | 成年女人毛片免费观看不卡 | 亚洲色大成网站www 亚洲色图天堂 | 成年人在线视频观看 | 日韩欧美亚洲精品 | 亚洲欧美日韩在线2020 | 国产精品综合 | 五月激情六月婷婷 | 婷婷免费高清视频在线观看 | 免费精品一区二区三区在线观看 | 五月天激情婷婷婷久久 | 中文国产欧美在线观看 | 91精品免费视频 | 一区在线观看视频 | 两性色午夜视频免费播放 | 日韩免费三级 | 黄色影片观看 | 欧美成人免费全部观看天天性色 | dy888午夜国产午夜精品 | xxxxwww一片| 日本精品久久 | 国产成人一区二区三区在线播放 | 男女www视频在线看网站 |