📅 财经日历 📊 实时波动 📈 大盘云图 📶 行情走势 🆚 投机情绪 🚀 今日热点

    用iRSI()给数组赋值,但打印数组显示结果全为0,为什么?

    哟喂 LV4
    2012-12-03 · 4768 阅读
    double RSIBuffer[];
    int RSI_Per=14;
    int start()
      {
      int cnt,counted_bars=IndicatorCounted();
      int limit=Bars-counted_bars;
      if(counted_bars>0) limit++;
      for(cnt=0;cnt<limit;cnt++)
        {
        RSIBuffer[cnt]=iRSI(NULL,0,RSI_Per,PRICE_CLOSE,cnt);Print("RSIBuffer[",cnt,"]=",RSIBuffer[cnt]);
        }
       return(0);
      }
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 14 个

    milkyway LV3

    发表于 2012-12-3 23:45:07 | 显示全部楼层

    你这样定义出的是临时性的数组,每次start运行都会自动全部初始化为0
    如果使用序列数组的方式定义 就可以自动保存历史

    ti操盘 LV3

    发表于 2012-12-3 23:45:31 | 显示全部楼层

    [s:141]

    gp123456789 LV4

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    好啊,,不错、、、、  

    云之端 LV5

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    厉害!强~~~~没的说了!  

    beyond LV4

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    呵呵 哪天得看看 `~~~~  

    fuckoff LV4

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    几头雾水…  

    和其正 LV5

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    谁都不容易啊 ~~  

    耳语 LV5

    发表于 2012-12-4 00:01:46 | 显示全部楼层

    呵呵 都没人想我~~  

    星☆雨 LV3

    发表于 2014-12-2 12:19:47 | 显示全部楼层

    xiexiefenxiang
    12下一页
    您需要登录后才可以回帖 登录 | 注册

    提醒: 禁止引战、谩骂、灌水内容

    微信二维码

    有问题联系客服