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

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

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

  • 咨詢(xún)內(nèi)容:

    四周規(guī)則能寫(xiě)成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還要寫(xiě)一遍。

     

  • 用戶(hù)回復(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)容
主站蜘蛛池模板: 日韩精品免费一区二区三区 | 中文字幕在线视频一区 | 亚洲专区中文字幕 | 全部精品孕妇色视频在线 | 俄罗斯一级毛片免费播放 | 精品乱久久 | 国产91在线精品福利 | 免费在线观看黄色的网站 | 久久 精品 一区二区 | 欧美色视频在线观看 | 国产精品午夜高清在线观看 | 一区二区三区免费视频 www | 97在线观免费视频观看 | 亚洲综合精品成人 | 久久成年人视频 | 香蕉视频网站在线播放 | 五月婷婷国产 | 最新国产精品亚洲二区 | 亚洲免费一区 | 嫩模在线| 亚洲黑人巨大videos0 | 四虎视频国产精品免费入口 | 久久久久伊人 | 久久在线视频 | 国产高清美女一级a毛片久久 | 五月花激情网 | 国产一级毛片网站 | 亚洲色图插插插 | 91麻豆精品一二三区在线 | 亚洲人成一区 | 日韩视频一区二区 | 99精品国产久热在线观看66 | 四虎影视免费在线 | 欧美理论片 | 女性毛片 | 婷婷在线观看视频 | 欧美一级片在线免费观看 | 久久99久久99精品免观看动漫 | 国产精品爱久久久久久久三级 | 国产精品九九久久精品女同 | 欧美性天天影院 |