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

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

四周規則能寫成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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 一级毛片免费网站 | 中国美女挠脚心丝袜vk | 日韩高清的天堂在线观看免费 | 日本人真淫视频一区二区三区 | 中文欧美一级强 | 2021最新国产精品一区 | 中文字幕亚洲无线码在线一区 | 黄色 男女 | 不卡福利视频 | 色哟哟www网站入口成人学校 | 一级特黄aaa大片 | 国产伦理在线播放 | 2020久久精品国产免费 | 亚洲国产日韩欧美在线as乱码 | 丁香五月缴情综合网 | 手机在线 | 午夜小视频在线播放 | 欧美特黄一免在线观看 | sss亚洲国产欧美一区二区 | 欧美日韩一区视频 | 欧美黑人巨大日本人又爽又色 | 成人满18在线观看网站免费 | 免费香蕉一区二区在线观看 | 精品欧美一区二区在线看片 | 一个人免费观看视频www | 最近更新中文字幕影视 | 婷婷桃色网 | 免费观看黄色的网站 | 在线播放另类 | xx网址| 日韩 视频在线播放 | 黄网在线免费观看 | 国产午夜视频在线观看第四页 | 欧美大黄 | 亚洲欧美综合一区二区三区四区 | 欧美成人免费sss | 亚洲经典在线中文字幕 | 成人男女网18免费看 | 天天操天天干天天操 | 六月丁香在线视频 | 成人精品亚洲 |