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

您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 其他期貨軟件知識>>正文內容

四周規則能寫成VBA模板嗎,方便大家學習 [金字塔]

  • 咨詢內容:

    四周規則能寫成VBA模板嗎,方便大家學習

    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

     

  • 金字塔客服:

    有必要嗎

    圖表可以實現 VBA還要寫一遍。

     

  • 用戶回復:

    任何策略都可以用VBA來實現,只是代碼量比后臺或圖表策略大的多,調試也需要較長的時間。

    如果只是單純的實現開平倉的目的,沒有必要使用VBa來做的。

     

     

  • 網友回復: 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

     

  • 網友回復:

    強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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 在线成人tv天堂中文字幕 | 色涩视频 | 99久久日本一区二区波多野结衣 | 欧美视频在线一区 | 欧美一级毛片免费播放器 | 奇米影视亚洲春色77777 | 国内精品久久久久尤物 | 99热国产这里只有精品 | 欧美高清性刺激毛片 | 久久免费看 | 欧美精品九九99久久在观看 | 久久九九99 | 在线视频日韩 | 天天躁日日躁狠狠躁黑人躁 | 天天干天天干天天天天天天爽 | 久久99精品这里精品动漫6 | 五月婷婷综合激情 | 精品一区中文字幕 | 91精品国产乱码久久久久久 | 日韩精品一区在线观看 | 日本三级中文 | 91精品全国免费观看 | 成人性生交大片免费看午夜a | 欧美亚洲精品一区 | 在线视频欧美精品 | 亚洲视频在线一区二区三区 | 手机在线观看亚洲国产精品 | 日韩成人免费在线视频 | 欧美激情高清免费不卡 | 夜夜嗨影院 | 日本一区中文字幕 | 久操网在线 | 伊人中文字幕在线观看 | 国产一级毛片大陆 | 99久久国产综合色 | 九热视频在线观看 | 成人欧美一区二区三区黑人 | 亚洲一级成人 | 国内精品久久久久久中文字幕 | 成人午夜爱爱爱爱爱 | 一区二区三区视频网站 |