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

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  點擊在線交流進行 有償 改編!

 


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲视频在线一区二区三区| 日本一品道门免费高清视频| 又大又爽又湿又紧a视频| 2021日产国产麻豆| 最近更新中文字幕影视| 口工全彩无遮挡3d漫画在线| jizz在线免费观看| 日韩精品一区二区三区色欲av| 免费一区二区视频| 18一20岁一级毛片| 性欧美视频在线观看| 乳环贵妇堕落开发调教番号| 玉蒲团之偷情宝典| 国产乱人伦偷精品视频下| 丁香六月久久久| 狂野黑人性猛交xxxxxx| 国产精品JIZZ在线观看无码| 久久久久九九精品影院| 欧美黑人巨大xxxxx| 另类小说亚洲色图| 黑人猛男大战俄罗斯白妞| 日日噜噜噜夜夜爽爽狠狠| 免费成人福利视频| 韩国一大片a毛片女同| 工囗番漫画全彩无遮拦老师| 亚洲欧美日韩高清中文在线| 4虎永免费最新永久免费地址| 天天影视综合色| 五月天婷婷社区| 波多野吉衣一区二区| 国产强被迫伦姧在线观看无码 | 精品一区中文字幕| 国产精品无码专区在线观看| 久久精品亚洲日本佐佐木明希 | 亚洲欧洲久久精品| 调教羞耻超短裙任务| 国产精品成人不卡在线观看| gav男人天堂| 日韩精品无码免费专区网站| 亚洲熟妇丰满xxxxx| 粗大的内捧猛烈进出在线视频 |