20评论

0收藏

指标紧急求助

avatar ppgtyrg4v | 4579 人阅读 | 20 人评论 | 2011-10-30

这个指标的目的是:当前k线的收盘价高于前一k线的最高价时,则标示箭头1(jiantou1);如果当前k线的收盘价低于前一k线的最低价时,则标示箭头2(jiantou2);如果前一个是箭头1则下一个只能显示箭头2,如果前一个是箭头2则下一个只能显示箭头1,这样是为了显示一次进场信号,下一次显示的是出场信号,而不是连续的进入,或连续的出场信号。
  问题:1.部分符合定义的k线没有被标示箭头;2实时使用(非使用历史数据)时,出现两个箭头。<div class=\"blockcode\"><div id=\"code_HAz\"><ol>#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
double jiantou1[];
double jiantou2[];
extern int juli=1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
   {
     IndicatorBuffers(2);
     SetIndexBuffer(0,jiantou1);
     SetIndexBuffer(1,jiantou2);
     SetIndexStyle(0,3,0,EMPTY,Red);
     SetIndexStyle(1,3,0,EMPTY,Blue);
     SetIndexArrow(0,241);
     SetIndexArrow(1,242);
     return(0);
   }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
   {
     int counted_bars=IndicatorCounted();
     if (counted_bars0) counted_bars--;
     int limit=Bars-counted_bars;
     int temp=0;
     for (int i=0;iHigh[i+1])&&temp!=1)
       {
         jiantou1[i]=Low[i]-juli*Point;
         temp=1;
       }
       if ((Close[i]
""
还没有人打赏,支持一下

评论|共 20 个

lzjiang

发表于 2012-11-22 00:28:10 | 显示全部楼层

不错,支持下  

qinkui007

发表于 2012-11-22 00:28:10 | 显示全部楼层

我的啦嘿嘿  

印度阿三

发表于 2012-11-22 00:28:10 | 显示全部楼层

唉,悲催的外汇。。  

一壶乡愁

发表于 2012-11-22 00:28:10 | 显示全部楼层

真的有么  

珊瑚

发表于 2012-11-22 00:28:10 | 显示全部楼层

好人一个  

2364383259

发表于 2012-11-22 00:28:10 | 显示全部楼层

#无语  

知足常乐

发表于 2012-11-22 00:28:10 | 显示全部楼层

做一个,做好了,请看  

mt5mt5

发表于 2012-11-22 00:28:10 | 显示全部楼层

我帮你 喝喝  

spybot

发表于 2015-1-24 23:35:26 | 显示全部楼层

亏损中……………………

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

EA之家评论守则