希望得到老师指导

楼主  收藏   举报   帖子创建时间:  2019-05-05 05:35 回复:0 关注量:144
版主老师:
  我设计的程序由三条曲线组成,以一定周期的最大值“High[ ]”最小值Low[ ]构成上下两条包络线,另外一条为“close”线。根据之间的上穿、下穿得出报警、但一个方向的报警太多,只想利用首次报警。对程序改了之后,报警信号全消失了,希望得到老师指导
  重复报警的程序
  #property indicator_separate_window
  #property indicator_buffers 5
  #property indicator_color1 White
  #property indicator_color2 Red
  #property indicator_color3 Green
  #property indicator_color4 Yellow
  #property indicator_color5 Yellow
  //---- input parameters
  extern int 是否音乐报警=1;
  
  //---- buffers
  
  double aa1 [ ];
  double aa2[ ];
  double aa3[ ];
  double Up[];
  double Down[];
  
  
  int init()
  {
  SetIndexStyle(0,DRAW_LINE);
  SetIndexStyle(1,DRAW_LINE);
  SetIndexStyle(2,DRAW_LINE);
  SetIndexStyle(3,DRAW_ARROW);
  SetIndexStyle(4,DRAW_ARROW);
  
  SetIndexBuffer(0, aa1);
  SetIndexBuffer(1, aa2);
  SetIndexBuffer(2, aa3);
  SetIndexBuffer(3,Down);
  SetIndexBuffer(4,Up);
  SetIndexArrow(3,234);
  SetIndexArrow(4,233);
  
  IndicatorShortName("新思路");
  return(0);
  }
  int start()
  {
  int limit;
  int counted_bars=IndicatorCounted();
  
  //---- last counted bar will be recounted
  
  //---- initial zero
  if(counted_bars0) counted_bars--;
  limit=Bars-counted_bars;
  //---- macd counted in the 1-st additional buffer
  for(int i=0; i
打赏