[MT4指标]请懂程序的高手帮忙改一下这个超强指标的一个小问提,先谢!
谢谢!能不能把显示的两条线改成细线.第二能不能改两条线的颜色?谢谢!!指标见下面
//+------------------------------------------------------------------+
//|                                                 SilverTrend .mq4 |
//|                             SilverTrend  rewritten by CrazyChart |
//|                                                 http://viac.ru/  |
//+------------------------------------------------------------------+
#property copyright "SilverTrend  rewritten by CrazyChart"
#property link      "http://viac.ru/ "
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- input parameters
extern int       CountBars=300;
extern int       SSP=7;
extern double    Kmin=1.6;
extern double    Kmax=50.6; //24 21.6 21.6 
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,0,2,Red);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,2,Blue);
   SetIndexBuffer(1,ExtMapBuffer2);
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
 
  if (CountBars>=Bars) CountBars=Bars;
   SetIndexDrawBegin(0,Bars-CountBars+SSP);
   SetIndexDrawBegin(1,Bars-CountBars+SSP);
  int i, i2,loopbegin,counted_bars=IndicatorCounted();
  double SsMax, SsMin, K, val1, val2, smin, smax, price; 
  
  if(Bars<=SSP+1) return(0);
  //---- initial zero
//K=33-RISK; 
/*
if (firstTime==true)   { 
   loopbegin = CountBars; 
   if (loopbegin>(Bars-2*SSP+1)) loopbegin=Bars-2*SSP+1; 
   firstTime=False; 
}; 痼滂戾眚 耱囵铋 镳钽疣祆?
*/
  if(Bars<=SSP+1) return(0);
//---- initial zero
//+++++++
if(counted_bars=0;i--) { 
  SsMax = High[Highest(NULL,0,MODE_HIGH,SSP,i-SSP+1)]; 
  SsMin = Low[Lowest(NULL,0,MODE_LOW,SSP,i-SSP+1)]; 
   smin = SsMin-(SsMax-SsMin)*Kmin/100; 
   smax = SsMax-(SsMax-SsMin)*Kmax/100;  
   ExtMapBuffer1[i-SSP+6]=smax; 
   ExtMapBuffer2[i-SSP-1]=smax; 
   val1 = ExtMapBuffer1[0]; 
   val2 = ExtMapBuffer2[0]; 
if (val1 > val2) Comment("镱牦镪?buy ",val1); 
if (val1 < val2) Comment("镳钿噫?sell ",val2); 
 
}
  
  
   
//----
   return(0);
  }
//+------------------------------------------------------------------+ 
发表于:2006-05-13 07:00只看该作者
2楼 
//+------------------------------------------------------------------+
//|                                                 SilverTrend .mq4 |
//|                             SilverTrend  rewritten by CrazyChart |
//|                                                 http://viac.ru/  |
//+------------------------------------------------------------------+
#property copyright "SilverTrend  rewritten by CrazyChart"
#property link      "http://viac.ru/ "
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- input parameters
extern int       CountBars=300;
extern int       SSP=7;
extern double    Kmin=1.6;
extern double    Kmax=50.6; //24 21.6 21.6 
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,0,1,Red);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,1,Blue);
   SetIndexBuffer(1,ExtMapBuffer2);
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  if (CountBars>=Bars) CountBars=Bars;
   SetIndexDrawBegin(0,Bars-CountBars+SSP);
   SetIndexDrawBegin(1,Bars-CountBars+SSP);
  int i, i2,loopbegin,counted_bars=IndicatorCounted();
  double SsMax, SsMin, K, val1, val2, smin, smax, price; 
  
  if(Bars<=SSP+1) return(0);
  //---- initial zero
//K=33-RISK; 
/*
if (firstTime==true)   { 
   loopbegin = CountBars; 
   if (loopbegin>(Bars-2*SSP+1)) loopbegin=Bars-2*SSP+1; 
   firstTime=False; 
}; 
*/
  if(Bars<=SSP+1) return(0);
//---- initial zero
//+++++++
if(counted_bars=0;i--) { 
  SsMax = High[Highest(NULL,0,MODE_HIGH,SSP,i-SSP+1)]; 
  SsMin = Low[Lowest(NULL,0,MODE_LOW,SSP,i-SSP+1)]; 
   smin = SsMin-(SsMax-SsMin)*Kmin/100; 
   smax = SsMax-(SsMax-SsMin)*Kmax/100;  
   ExtMapBuffer1[i-SSP+6]=smax; 
   ExtMapBuffer2[i-SSP-1]=smax; 
   val1 = ExtMapBuffer1[0]; 
   val2 = ExtMapBuffer2[0]; 
if (val1 > val2) Comment("ggg?buy ",val1); 
if (val1 < val2) Comment("htyu?sell ",val2); 
}
  
  
   
//----
   return(0);
  }
//+------------------------------------------------------------------+ 
这 样行了吗? 
韬客社区www.talkfx.co
发表于:2006-05-13 07:07只看该作者
3楼 
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,0,1,Red);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,1,Blue);
   SetIndexBuffer(1,ExtMapBuffer2);
只要改这一点,你看看吗?
另外还有简单的方法,点击右键,设置颜色菜单中有线宽,改改就行
韬客社区www.talkfx.co
4楼 
啊,你太强了行知合一.非常谢谢!
我试了2楼的,已成功改成细线了.
你说的"另外还有简单的方法,点击右键,设置颜色菜单中有线宽,改改就行 "这种改法我早试过,改完一切换周期就又还原了.不信你试试
再次感谢你高手!佩服
5楼 
大侠啊.俺比了3遍,楞没看出你改了哪里...下面没改过呀!
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,0,1,Red);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,1,Blue);
   SetIndexBuffer(1,ExtMapBuffer2);
只要改这一点,你看看吗?
韬客社区www.talkfx.co
发表于:2006-05-13 07:49只看该作者
6楼 
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,0,        1           ,Red);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,        1               ,Blue);
   SetIndexBuffer(1,ExtMapBuffer2);
函数有五个参数,第四位参数代表的是线型宽度。你看看。刚才你的程序是 2。第五位代表的是颜色。
韬客社区www.talkfx.co
7楼 
啊,明白了俺太粗心了.
谢谢您教我,
您很厉害啊,佩服.
谢谢!!!!!!!!!!!!!!!!!!!!
韬客社区www.talkfx.co
9楼 
原帖由 行知合一 于 2006-5-13 16:04 发表 我只是懂的一点点,可不是高手哦。
韬客社区www.talkfx.co
发表于:2006-05-15 03:12只看该作者
10楼 
各位高手,这个指标是什么,怎么用!!!是mt4的吗?谢谢·1
韬客社区www.talkfx.co























