关于均线选股指标源码的问题,我们总结了以下几点,给你解答:
均线选股指标源码是什么
||M30:=ROUND(MA(C,30)*100)/100;
M35:=ROUND(MA(C,35)*100)/100;
M40:=ROUND(MA(C,40)*100)/100;
M45:=ROUND(MA(C,45)*100)/100;
M50:=ROUND(MA(C,50)*100)/100;
M60:=ROUND(MA(C,60)*100)/100;
TJ1:=
IF(M30=M35,1,
IF(M30=M40,1,
IF(M30=M45,1,
IF(M30=M50,1,
IF(M30=M60,1,0)))));
TJ2:=
IF(M35=M40,1,
IF(M35=M45,1,
IF(M35=M50,1,
IF(M30=M60,1,0))));
TJ3:=
IF(M40=M45,1,
IF(M40=M50,1,
IF(M40=M60,1,0)));
TJ4:=
IF(M45=M50,1,
IF(M45=M60,1,0));
TJ5:=
IF(M50=M60,1,0);
COUNT(TJ1||权 TJ2|| TJ3|| TJ4|| TJ5,N)>=1;
N:=2;
M30:=MA(C,30);
M35:=MA(C,35);
M40:=MA(C,40);
M45:=MA(C,45);
M50:=MA(C,50);
M60:=MA(C,60);
COUNT(M30=M35 OR M35=M40 OR M40=M45 OR M45=M50 OR M50=M60,N)>=1;
你好!请看下面公式是否符合你要求:
1、十日均线在三十日均线上多头排列,k线碰到三十日均线
m10:=ma(c,10);m30:=ma(c,30);
t1:=m10>m30 and m10>ref(m10,1) and m30>ref(m30,1);
t2:=l<=m30 and c>=m30;
x1:exist(t1,5) and t2;
------------------------------
2、十日均线是最近十天内上穿三十日均线
m10:=ma(c,10);m30:=ma(c,30);
x2:longcross(m10,m30,10);
均线选股指标源码
#include
#include
#include
#include
#include
#define N 30
//计算移动平均线
float MA(float *price, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += price[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Close(float *close, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += close[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Open(float *open, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += open[i];
}
return sum / n;
}
//计算最高价的移动平均线
float MA_High(float *high, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += high[i];
}
return sum / n;
}
//计算最低价的移动平均线
float MA_Low(float *low, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += low[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Volume(float *volume, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += volume[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Amount(float *amount, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += amount[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Turnover(float *turnover, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += turnover[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Change(float *change, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += change[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_ChangeRate(float *changeRate, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += changeRate[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Swing(float *swing, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += swing[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_TurnoverRate(float *turnoverRate, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += turnoverRate[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_Amplitude(float *amplitude, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += amplitude[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_PE(float *pe, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += pe[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_PB(float *pb, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += pb[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_PS(float *ps, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += ps[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_PCF(float *pcf, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += pcf[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_MarketValue(float *marketValue, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += marketValue[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_CirculationMarketValue(float *circulationMarketValue, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += circulationMarketValue[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_TotalShare(float *totalShare, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += totalShare[i];
}
return sum / n;
}
//计算收盘价的移动平均线
float MA_CirculationShare(float *circulationShare, int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++)
{
sum += circulationShare[i];
}
return sum / n;
均线选股指标源码公式
您好,指标均线粘和选股公式如下:
M:=已错古胞冷就1;
M5:=MA来自(CLOSE,5);
M10:=MA(CLOSE,10);
M20:=MA(CLOSE讨东型钱星关,20);
K1:=MAX(MAX(M5,M1处握掌离房境民呼毛余东0),侍亏MAX(M10,M20));
K2:=MIN(酒扬话美底块金似说厚MIN(M5,M10),MIN(M10,M20));
A:=MA诉哥溶名常补X(M5,MAX(M10,M20))/MIN(M5,MIN(M10,M20))<1+0.03*M;
A1:=(K1/K2-1)<0.005; A2:=(K1/K2-1)<0.005; A3:=V>REF(V,1)*1.5 AND V>MA(V,5);
XG:A A量聚金京微超极年通从宪ND A1 AND A2 AND A3 AND C>O AND V> REF(V,1) AND 厂传候CAPITAL<=3析画衣呀00000000
值夫兰当面正另大并伤自手机系列移动终端为iPhone或Android智能手机,iOS系统版本需4空.0 以上,Android操系统版本需2.0以上,通信达版并简停亮本为V5.27。
均线粘合选股指标公式
MA10:=MA(C,10);
MA21:=MA(C,21);
MA30:=MA(C,30);
MA60:=MA(C,60);
MA90:=MA(C,90);
CONDTION_A:=MAX(MAX(MAX(MA21,MA30),MA60),MA90);
CONDTION_B:=MIN(MIN(MIN那代伯(MA21,MA30),MA60),MA90);
CONDTION_C:=(C旧五续连讲ONDTION_A-CONDTION_B)/CONDTION_B*100<=1;{这里工织然最田伟的数值1可以修改为你的经验值,表示最大和最小两条线的距离}
CONDTI矛训句安兴ON:BARSL龙站仍升液势什罪希AST(CONDTION_C)<=5 AND
CROSS(MA10,CONDTION_A钱显前上强);
{这里的数值5可以修改为你的经验值,表示粘合条件满足距离现在的周期数,因为粘合和金叉很少同时出现、大多数会有一个间隔期}
均线
移动平均线,M胜附著指阶茶水战坐oving Average,简称MA,MA是用统计分析的方缺绝法,将一定时期内的证券价格(指数)加以平均,并把不同时间的平均值连接起来,形成一根MA,用以观察证券价格变动趋势的一种技术指标。
移动平均线是由著名的美国投资专家Joseph E.Granville(葛兰碧,又译为格兰威尔)于20世纪中期提出来的。均线理论是当今应用最普遍的技术指标之一,它帮助交易者确认现有趋势、判断将出现的趋势、发现过度延生即将反转老扮神的趋势。