1.谁能帮我写个FIR程序 急急急!源码
2.懂牛紫红黄龙头火箭强势启动金钻套装指标公式源码,源码擒牛胜率高
谁能帮我写个FIR程序 急急急!源码
先用窗函数法算出滤波器系数,源码激光竖琴源码然后求输入信号序列和滤波器的源码卷积,求出的源码magenta源码就是输出序列了。窗函数法源代码#include"math.h"
void firwin(n,源码band,fln,fhn,wn,h)
int n,band,wn;
double fln,fhn,h[];
{ int i,n2,mid;
double s,pi,wc1,wc2,beta,delay;
double window();
beta=0.0;
if(wn==7)
{ printf("input beta parameter if kaiser window(2<beta<)\n");
scanf("%lf",&beta);
}
pi=4.0*atan(1.0);
if((n%2)==0)
{ n2=n/2-1;
mid=1;
}
else
{ n2=n/2;
mid=0;
}
delay=n/2.0;
wc1=2.0*pi*fln;
if(band>=3)wc2=2.0*pi*fhn;
switch(band)
{ case 1:
{ for(i=0;i<=n2;i++)
{ s=i-delay;
h[i]=(sin(wc1*s)/(pi*s))*window(wn,n+1,beta);
h[n-i]=h[i];
}
if(mid==1)h[n/2]=wc1/pi;
break;
}
case 2:
{ for(i=0;i<=n2;i++)
{ s=i-delay;
h[i]=(sin(pi*s)-sin(wc1*s))/(pi*s);
h[i]=h[i]*window(wn,n+1,i,beta);
h[n-i]=h[i];
}
if(mid==1)h[n/2]=1.0-wc1/pi;
break;
}
case 3:
{ for(i=0;i<=2;i++)
{ s=i-delay;
h[i]=(sin(wc2*s)-sin(wc1*s))/(pi*s);
h[i]=h[i]*window(wn,n+1,i,beta);
h[n-i]=h[i];
}
if(mid==1)h[n/2]=(wc2-wc1)/pi;
break;
}
case 4:
{ for(i=0;i<=n2;i++)
{ s=i-delay;
h[i]=(sin(wc1*s)+sin(pi*s)-sin(wc2*s))/(pi*s);
h[i]=h[i]*window(wn,n+1,i,beta);
h[n-i]=h[i];
}
if(mid==1)h[n/2]=(wc1+pi-wc2)/pi;
break;
}
}
}
static double window(type,n,i,beta)
int i,n,type;
double beta;
{ int k;
double pi,w;
double kaiser();
pi=4.0*atan(1.0);
w=1.0;
switch(type)
{ case 1:
{ w=1.0;
break;
}
case 2:
{ k=(n-2)/;
if(i<=k)
w=0.5*(1.0-cos(i*pi/(k+1)));
if(i>n-k-2)
w=0.5*(1.0-cos((n-i-1)*pi/(k+1)));
break;
}
case 3:
{ w=1.0-fabs(1.0-2*i/(n-1.0));
break;
}
case 4:
{ w=0.5*(1.0-cos(2*i*pi/(n-1)));
break;
}
case 5:
{ w=0.-0.*cos(2*i*pi/(n-1));
break;
}
case 6:
{ w=0.-0.5*cos(2*i*pi/(n-1))+0.*cos(4*i*pi/(n-1));
break;
}
case 7:
{ w=kaiser(i,n,beta);
break;
}
}
return(w);
}
static double kaiser(i,n,beta)
int i,n;
double beta;
{ double a,w,a2,b1,b2,beta1;
double bessel0();
b1=bessel0(beta);
a=2.0*i/(double)(n-1)-1.0;
a2=a*a;
beta1=beta*sqrt(1.0-a2);
b2=bessel0(beta1);
w=b2/b1;
return(w);
}
static double bessel0(x)
double x;
{ int i;
double d,y,d2,sum;
y=x/2.0;
d=1.0;
sum=1.0;
for(i=1;i<=;i++)
{ d=d*y/i;
d2=d*d;
sum=sum+d2;
if(d2<sum*(1.0e-8))break;
}
return(sum);
}
滤波:length为有效数据格数
for(g=0;g<length;g++)
{ int k;
int min=g-;
int max=g;
if(min>0)
{ for(k=min;k<=max;k++)
{ j[g]+=f[k]*h[g-k];
}
}
else
{ for(k=0;k<=max;k++)
{ j[g]+=f[k]*h[g-k];
}
}
}//求卷积
for(g=0;g<length;g++)
{ l[g]=j[length-g];}
//时间反转
for(g=0;g<length;g++)
{ int k2;
int min2=g-;
int max2=g;
if(min2>0)
{ for(k2=min2;k2<=max2;k2++)
{ p[g]+=l[k2]*h[g-k2];
}
}
else
{ for(k2=0;k2<=max2;k2++)
{ p[g]+=l[k2]*h[g-k2];
}
}
}//再一次求卷积
for(g=0;g<length;g++)
{ q[g]=p[length-g];}
//再一次时间反转
懂牛紫红黄龙头火箭强势启动金钻套装指标公式源码,擒牛胜率高
通达信懂牛紫红黄龙头主升主图指标公式,源码擒牛胜率高
N:=6;总收入同比:FINANCE(),源码NODRAW;净利润同比:FINANCE(),NODRAW;主力攻击线:EMA(CLOSE,7),COLORWHITE;主力控盘线:EMA(CLOSE, ),COLORYELLOW,LINETHICK2;LF:=IF(主力攻击线>REF(主力攻击线,1),主力攻击线,DRAWNULL),COLORLIRED;涨停:=C>=ZTPRICE(REF(C,1),IF((FINANCE(3)=4 OR (DATE>&&FINANCE(3)=3)),0.2,0.1));首涨停:=涨停 AND REF(涨停,1)<>1;擒牛信号1:BARSLASTCOUNT(涨停)=2 OR BARSLASTCOUNT(涨停)=3 ,NODRAW; DRAWICON(擒牛信号1,L*0.,9);擒牛信号2:BARSLASTCOUNT(涨停)=1 OR BARSLASTCOUNT(涨停)=2;DRAWICON(擒牛信号2,L*0.,1);牛股强势1:=涨停;STICKLINE(牛股强势1,H,L,0,0),COLORFFFF;STICKLINE(牛股强势1,C,O,3,0),COLOR;STICKLINE(牛股强势1,C,O,2,0),COLORBBBB;STICKLINE(牛股强势1,C,O,1,0),COLORDDDD;STICKLINE(牛股强势1,C,O,0.2,0),COLORWHITE;STICKLINE(首涨停,O,C,3,0),COLORYELLOW;STICKLINE(首涨停,H,L,0,0),COLORYELLOW;昨日最低:=REF(L,1);现价:DYNAINFO(7),COLORYELLOW,DOTLINE;DRAWTEXT_FIX(1,0,0,0, STRCAT(HYBLOCK,STRCAT(' + ', STRCAT(GNBLOCK,STRCAT('+ ', EXTERNSTR(0,1)))))),COLORWHITE;牛股:=2*(CLOSE+OPEN+HIGH+LOW)*;主导动能:=牛股/EMA(牛股,4)-1,COLORRED ;指标:=主导动能*,COLORRED ;
懂牛紫红黄龙头主升龙头模型副图指标公式,擒牛捉妖1:=(3*CLOSE+HIGH+LOW+OPEN)/6;擒牛捉妖2:=EMA(擒牛捉妖1,源码);擒牛捉妖3:=(HHV(擒牛捉妖2,)+HHV(擒牛捉妖2,)+HHV(擒牛捉妖2,))/3;擒牛捉妖4:=(LLV(擒牛捉妖2,)+LLV(擒牛捉妖2,)+LLV(擒牛捉妖2,))/3;擒牛捉妖5:=(HHV(擒牛捉妖3,5)+HHV(擒牛捉妖3,)+HHV(擒牛捉妖3,))/3;擒牛捉妖6:=(LLV(擒牛捉妖4,5)+LLV(擒牛捉妖4,)+LLV(擒牛捉妖4,))/3;擒牛捉妖7:=EXPMA(CLOSE,6);擒牛捉妖8:=EXPMA(CLOSE,);M1:=*(擒牛捉妖7-擒牛捉妖8)/擒牛捉妖8+2,COLORYELLOW,LINETHICK2; ZZ:=M1>2 AND EMA(EMA(擒牛捉妖1,2),2)>擒牛捉妖6;共振追涨紫:ZZ AND ZZ>=REF(ZZ,1),NODRAW,COLORMAGENTA ;STICKLINE(共振追涨紫,4,8,1,0),COLORMAGENTA ;DRAWTEXT(共振追涨紫,7.7,'紫'),COLORYELLOW;
通过指标公式,用户可以快速识别出强势牛股,源码擒获高胜率的源码交易机会。指标包括了主力攻击线、源码底价源码主力控盘线、源码涨停判断、源码擒牛信号等关键因素,easytouch 源码为投资者提供了精准的买入与卖出信号。通过指标的使用,用户可以有效提高股票交易的psdqq源码成功率,实现稳健的收益增长。
2024-11-23 07:28
2024-11-23 06:54
2024-11-23 06:24
2024-11-23 06:15
2024-11-23 05:47
2024-11-23 05:32