本帖最后由 sedofx 于 2014-4-16 22:24 编辑
一个非常好的C语言指标,请路过的朋友们改为MT4指标:
/*--------------------------------------------------------------*
To modify generated output
*--------------------------------------------------------------*/
#include
#include
#include
double eqn6850;
void main
{
double x,y;
char str[80];
while{
printf;
gets;
if break;
sscanf;
y=eqn6850;
printf;
}
}
/*--------------------------------------------------------------*/
double evalfpoly
/*--------------------------------------------------------------*/
{
int i,j;
double y=c[0];
x=)/;
for
y += c[j]*cos+c[j+1]*sin;
return y;
}
/*--------------------------------------------------------------*/
double eqn6850
/*--------------------------------------------------------------*
a= -1988.532414673345
b= -3116.002162637732
c= 3644.662403802266
d= 2784.33539011638
e= 5149.024722269687
f= 5589.036234895881
g= -1740.995541288461
h= -852.5205018672013
i= -4685.18583825292
j= -3157.372613975506
k= 291.0488944901461
l= 38.19166147677898
m= 1716.365402621813
n= 738.0280483169678
o= 26.91111687090461
p= 21.09628861488089
q= -239.3793336551126
r= -52.8543381119665
s= -7.07871238136268
t= -1.0580188789772
u= 6.013791704694437
*--------------------------------------------------------------*/
{
double y;
static double c[]= {
-1988.532414673345,
-3116.002162637732,
3644.662403802266,
2784.335390116380,
5149.024722269687,
5589.036234895881,
-1740.995541288461,
-852.5205018672013,
-4685.185838252920,
-3157.372613975506,
291.0488944901461,
38.19166147677898,
1716.365402621813,
738.0280483169678,
26.91111687090461,
21.09628861488089,
-239.3793336551126,
-52.85433811196650,
-7.078712381362680,
-1.058018878977200,
6.013791704694437,
};
y=evalfpoly;
return;
} |