[MT4指标]代友发个指标 有会编程的哥们帮忙
#property copyright "Copyright ?2006dsfqwery"
#property link "[email protected]"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_style2 STYLE_SOLID
#property indicator_style3 STYLE_SOLID
#property indicator_width2 2
#property indicator_width3 2
extern int period=80;
double ExtBuffer0;
double ExtBuffer1;
double ExtBuffer2;
int init()
{
SetIndexStyle(0,DRAW_NONE);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(2,DRAW_HISTOGRAM);
IndicatorDigits(Digits+1);
SetIndexBuffer(0,ExtBuffer0);
SetIndexBuffer(1,ExtBuffer1);
SetIndexBuffer(2,ExtBuffer2);
IndicatorShortName("Fisher_Yur4ik");
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
return(0);
}
int start()
{
//int period=10;
int limit;
int counted_bars=IndicatorCounted();
double prev,current,old;
double Value=0,Value1=0,Value2=0,Fish=0,Fish1=0,Fish2=0;
double price;
double MinL=0;
double MaxH=0;
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i=0; i--)
{
current=ExtBuffer0;
prev=ExtBuffer0[i+1];
if (((current<0)&&(prev>0))||(current<0)) up= false;
if (((current>0)&&(prev<0))||(current>0)) up= true;
if(!up)
{
ExtBuffer2=current;
ExtBuffer1=0.0;
}
else
{
ExtBuffer1=current;
ExtBuffer2=0.0;
}
}
return(0);
}
遇到矛盾 先站在对方的立场上想想问题,先试着去理解别人
● 如何使用WinMTR查询平台连接流畅度
2楼
就是在变颜色的时候,能加上报警和发EMAIL功能就行了
:lol
遇到矛盾 先站在对方的立场上想想问题,先试着去理解别人
● 如何使用WinMTR查询平台连接流畅度
发表于:2007-04-12 01:28只看该作者
3楼
顶,希望朋友们帮忙
发表于:2007-04-24 12:51只看该作者
4楼
试试看,不知道这样行不行
#property copyright "Copyright ?2006dsfqwery"
#property link "[email protected]"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_style2 STYLE_SOLID
#property indicator_style3 STYLE_SOLID
#property indicator_width2 2
#property indicator_width3 2
extern int period=80;
extern bool SoundON=true;
extern bool EmailON=false;
double ExtBuffer0;
double ExtBuffer1;
double ExtBuffer2;
int init()
{
SetIndexStyle(0,DRAW_NONE);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(2,DRAW_HISTOGRAM);
IndicatorDigits(Digits+1);
SetIndexBuffer(0,ExtBuffer0);
SetIndexBuffer(1,ExtBuffer1);
SetIndexBuffer(2,ExtBuffer2);
IndicatorShortName("Fisher_Yur4ik");
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
return(0);
}
int start()
{
//int period=10;
int limit;
int counted_bars=IndicatorCounted();
double prev,current,old;
double Value=0,Value1=0,Value2=0,Fish=0,Fish1=0,Fish2=0;
double price;
double MinL=0;
double MaxH=0;
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i=0; i--)
{
current=ExtBuffer0;
prev=ExtBuffer0[i+1];
if (((current<0)&&(prev>0))||(current<0)) up= false;
if (((current>0)&&(prev<0))||(current>0)) up= true;
if(!up)
{
ExtBuffer2=current;
ExtBuffer1=0.0;
}
else
{
ExtBuffer1=current;
ExtBuffer2=0.0;
}
}
if((ExtBuffer1[0]+ExtBuffer2[0])*(ExtBuffer1[1]+ExtBuffer2[1])<0)
if((ExtBuffer1[0]+ExtBuffer2[0])>0)
{
if (SoundON) Alert( Symbol()+Period()+"Fisher_Yur4ik Crossed up");
if (EmailON) SendMail( Symbol()+Period()+"Fisher_Yur4ik Crossed up","");
}
else
{
if (SoundON) Alert( Symbol()+Period()+"Fisher_Yur4ik Crossed down");
if (EmailON) SendMail( Symbol()+Period()+"Fisher_Yur4ik Crossed down","");
}
return(0);
}
www.talkforex.com/blog//index.php?action/space/uid/39428
发表于:2007-04-29 14:57只看该作者
5楼
好指标!
达则兼济天下
穷则独善其身