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

    请牛大帮忙修改ATR指标,使其能显示3条线

    gold LV6
    2011-10-15 · 7237 阅读
    请牛大帮忙修改ATR指标,使其能显示3条线,5日ATR,10ATR,20ATR
      
      
      //+------------------------------------------------------------------+
      //|                                                          ATR.mq4 |
      //|                      Copyright ?2005, MetaQuotes Software Corp. |
      //|                                       http://www.metaquotes.net/ |
      //+------------------------------------------------------------------+
      #property copyright \"Copyright ?2005, MetaQuotes Software Corp.\"
      #property link      \"http://www.metaquotes.net/\"
      
      #property indicator_separate_window
      #property indicator_buffers 1
      #property indicator_color1 DodgerBlue
      //---- input parameters
      extern int AtrPeriod=14;
      //---- buffers
      double AtrBuffer[];
      double TempBuffer[];
      //+------------------------------------------------------------------+
      //| Custom indicator initialization function                         |
      //+------------------------------------------------------------------+
      int init()
        {
         string short_name;
      //---- 1 additional buffer used for counting.
         IndicatorBuffers(2);
      //---- indicator line
         SetIndexStyle(0,DRAW_LINE);
         SetIndexBuffer(0,AtrBuffer);
         SetIndexBuffer(1,TempBuffer);
      //---- name for DataWindow and indicator subwindow label
         short_name=\"ATR(\"+AtrPeriod+\")\";
         IndicatorShortName(short_name);
         SetIndexLabel(0,short_name);
      //----
         SetIndexDrawBegin(0,AtrPeriod);
      //----
         return(0);
        }
      //+------------------------------------------------------------------+
      //| Average True Range                                               |
      //+------------------------------------------------------------------+
      int start()
        {
         int i,counted_bars=IndicatorCounted();
      //----
         if(Bars
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 18 个

    guiliu LV5

    发表于 2012-11-21 23:00:05 | 显示全部楼层

    回复一下  

    liulinqi05 LV5

    发表于 2012-11-21 23:00:05 | 显示全部楼层

    不错啊! 一个字牛啊!  

    好久不见 LV17

    发表于 2012-11-21 23:00:05 | 显示全部楼层

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

    他们 LV5

    发表于 2012-11-21 23:00:05 | 显示全部楼层

    给推荐一个好的平台,这样EA才能很好的发挥啊  

    tat12345 LV5

    发表于 2012-11-21 23:00:05 | 显示全部楼层

    我来了~~~~~~~~~ 闪人~~~~~~~~~~~~~~~~  

    jamestin LV3

    发表于 2014-11-12 00:30:29 | 显示全部楼层

    感谢分享

    bxss LV7

    发表于 2014-11-13 11:27:04 | 显示全部楼层

    看看是什么东西啊

    分开过奖过 LV3

    发表于 2014-11-15 13:37:33 | 显示全部楼层

    EA真的能赚钱么?

    kLBxEoOC LV3

    发表于 2014-12-20 11:05:15 | 显示全部楼层

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

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

    微信二维码

    有问题联系客服