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

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

vbs如何向公式系統傳遞數組 [金字塔]

  • 咨詢內容:

    vbs中有如下類型數據,如何向金字塔公式系統傳遞?

    dc := 1000;
    VARIABLE:openPrice2[dc]=0;
    <%

    vOpenPrice2 = ffl.vardata("openPrice2")


    '對vOpenPrice2數組中每個元素進行計算處理并賦值

    '......

     

    ffl.vardata("openPrice2") = vOpenPrice2

    %>

     

    請問以上寫法正確嗎?

     

  • 金字塔客服: 測試一下不就知道了,用MSGBOX打印看看傳遞過去的數據是否是數組

     

  • 用戶回復:

    openPrice := open;
    highPrice := high;
    lowPrice := low;
    closePrice := close;
    dc := 1000;
    VARIABLE:openPrice2[dc]=0,highPrice2[dc]=0,lowPrice2[dc]=0,closePrice2[dc]=0;
    <%
    vOpenPrice = ffl.vardata("openPrice")
    vHighPrice = ffl.vardata("highPrice")
    vLowPrice = ffl.vardata("lowPrice")
    vClosePrice = ffl.vardata("closePrice")
    last = ubound(vOpenPrice)
    vo = 0
    vh = 0
    vl = 0
    vc = 0
    i = 1
    j = 0
    dim openPriceArray(1000)
    dim highPriceArray(1000)
    dim lowPriceArray(1000)
    dim closePriceArray(1000)
    do while(i <= last)
      if ((vOpenPrice(i) > vClosePrice(i)) and (vOpenPrice(i-1) < vClosePrice(i-1))) then '前面一根是陽線,后面連續陰線 
      vo = vOpenPrice(i)
      vh = vHighPrice(i)
      vl = vLowPrice(i)
      vc = vClosePrice(i) 
      i = i + 1 
      do until ((vOpenPrice(i+1) < vClosePrice(i+1)) or (i > 1000)) '連續陰線直到遇到陽線為止
        vc = vClosePrice(i)   
        if (vHighPrice(i) > vh) then
          vh = vHighPrice(i)
        end if   
        if (vLowPrice(i) < vl) then
          vl = vLowPrice(i)
        end if   
        i = i + 1 
      loop 
      openPriceArray(j) = vo
      highPriceArray(j) = vh
      lowPriceArray(j) = vl
      closePriceArray(j) = vc 
      j = j + 1       
      end if
      if ((vOpenPrice(i) < vClosePrice(i)) and (vOpenPrice(i-1) > vClosePrice(i-1))) then '前面一根是陰線,后面連續陽線 
      vo = vOpenPrice(i)
      vh = vHighPrice(i)
      vl = vLowPrice(i)
      vc = vClosePrice(i) 
      i = i + 1 
      do until ((vOpenPrice(i+1) > vClosePrice(i+1)) or (i > 1000)) '連續陽線直到遇到陰線為止
        vc = vClosePrice(i)   
        if (vHighPrice(i) > vh) then
          vh = vHighPrice(i)
        end if   
        if (vLowPrice(i) < vl) then
          vl = vLowPrice(i)
        end if   
        i = i + 1 
      loop 
      openPriceArray(j) = vo
      highPriceArray(j) = vh
      lowPriceArray(j) = vl
      closePriceArray(j) = vc 
      j = j + 1       
      end if 
    loop
    ffl.vardata("openPrice2") = openPriceArray
    ffl.vardata("highPrice2") = highPriceArray
    ffl.vardata("lowPrice2") = lowPriceArray
    ffl.vardata("closePrice2") = closePriceArray
    %>
    //KLINE(openPrice,highPrice,lowPrice,closePrice,1);
    KLINE(openPrice2,highPrice2,lowPrice2,closePrice2,1);

    采用這種方式,編譯通不過,提示“未定義的變量:OPENPRICE2”!請問問題出在哪兒了?

     

     

  • 網友回復:

    你的數組用法是有問題的,因為定義的數組與序列變量還是有些區別

     

    openPrice2:=c;
    highPrice2:=c;
    lowPrice2:=c;
    closePrice2:=c;

     

    你這樣定義這4個變量為序列變量酒可以解決了

 

如果以上指標公式不適用于您常用的行情軟件

或者您想改編成選股公式,以便快速選出某種形態個股的話,

可以聯系我們相關技術人員 QQ: 262069696  點擊在線交流進行 有償 改編!

 


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 成人在线不卡视频 | 狠狠欧美 | 欧美乱子伦xxxx12在线 | 日韩欧美精品在线 | 国产尤物视频在线 | 国产日韩精品欧美一区色 | 伊人网综合 | 18性夜影院午夜寂寞影院免费 | 狠狠综合久久久久综合 | 亚洲激情专区 | 欧美精品伊人久久 | 日韩中文字幕久久精品 | 国产精品久久久久久久久鸭 | 七色永久性tv网站免费看 | 国产第一草草影院 | 2017天天操| 中文字幕一二区 | 一级裸片 | 妞干网欧美 | 高清色黄毛片一级毛片 | 免费人成网站免费看视频 | 狠狠综合久久综合88亚洲日本 | 91在线公开视频 | 国产一级特黄aa大片免费 | 欧美在线视频观看 | 5x性区m免费毛片视频看看 | 福利片在线播放 | 色综合久久综合网 | 免费观看18视频网站 | 精品一区二区三区在线播放 | 免费看黄无遮挡滚床单视频 | 日本在线国产 | 男女午夜性爽快免费视频不卡 | 午夜大片免费完整在线看 | 中文字幕丝袜 | 韩国午夜tv免费影院 | 午夜国产羞羞视频免费网站 | 深夜免费福利视频 | 一级看片| 国产黄色a | 日韩在线精品视频 |