1. 首页 > 金融

通达信 均线 多次交叉 横盘选股公式能编写吗? 股票冲高回落均线下横盘

通达信 均线 多次交叉 横盘选股公式能编写吗?股票冲高回落均线下横盘

几条均线交叉在一起的条件选股公式 ,通达信用的,如何编写?

不知道回答的满意不满意,副图公式+选股公式,图片演示在下面网址里.

n1:=5;n2:=10;

stickline(c>0,0,10,15,0),color781816;

lc:=ref(close,1);

rsi5:sma(max(close-lc,0),n1,1)/sma(abs(close-lc),n1,1)*10,colorff00ff,linethick1;

rsi10:sma(max(close-lc,0),n2,1)/sma(abs(close-lc),n2,1)*10,color00ffff;

var1:=c-ref(c,1);

var2:=100*ema(ema(var1,6),6)/ema(ema(abs(var1),6),6);

ma5:=ema(c,5);

ma13:=ema(c,13);

up:=drawline(l=llv(l,barslast(cross(ma13,ma5))+1),llv(l,barslast(cross

(ma13,ma5))+1),h=hhv(h,barslast(cross(ma5,ma13))+1),hhv(h,barslast(cross

(ma5,ma13))+1),0),color0000ff;

down:=drawline(h=hhv(h,barslast(cross(ma5,ma13))+1),hhv(h,barslast(cross

(ma5,ma13))+1),l=llv(l,barslast(cross(ma13,ma5))+1),llv(l,barslast(cross

(ma13,ma5))+1),0),color00ff00;

bt:(llv(var2,2)=llv(var2,7) and count(var2<0,2) and cross(var2,ma(var2,2))) and

ref(down,1)<ref(down,2) and up>ref(down,1);

0,colorff00ff;

10,colorff0000;

stickline(up,0,0.2,3,0),color0000ff;

stickline(down,0,0.2,3,0),color00ff00;

stickline(bt,0,3,2,0),color000088;

stickline(bt,0,3,1,0),color0000cc;

stickline(bt,0,3,0.22,0),color0000ff;

drawtext(bt,3,'短牛'),color0000ff;

tj1:=ref(down,1)<ref(down,2) and up>ref(down,1) and c<hhv(h,21)*0.82;

stickline(tj1,0,2,3,0),color880088;

stickline(tj1,0,2,1.5,0),coloraa00aa;

stickline(tj1,0,2,0.8,0),colorcc00cc;

stickline(tj1,0,2,0.2,0),colorff00ff;

drawtext(tj1,2,'中牛'),colorff00ff;

hr:=hhv(high,55);

hry:=llv(low,55);

hry11:=hr*hry;

hry33:=sqrt(hry11);

tj2:=ref(down,1)<ref(down,2) and up>ref(down,1) and c<hry33;

stickline(tj2,0,1,5,0),color008888;

stickline(tj2,0,1,2,0),color00aaaa;

stickline(tj2,0,1,1,0),color00cccc;

stickline(tj2,0,1,0.2,0),color00ffff;

drawtext(tj2,1,'大牛'),color00ffff;

st:=ref(up,1)>ref(up,2) and down<ref(up,1);

stickline(st,10,9,5,0),color008800;

stickline(st,10,9,2,0),color00aa00;

stickline(st,10,9,1,0),color00cc00;

stickline(st,10,9,0.2,0),color00ff00;

drawtext(st,9,'卖'),color00ff00;

drawtext(currbarscount=89,9.5,'★本指标适合抄底及波段特征明显个股,暴跌

途中慎用!!'),color0000ff;

drawtext(currbarscount=89,8.7,'★大牛:长线大牛股,目标翻倍;

中短牛:15天目标10%-20%!!'),color0078ff;

drawtext(currbarscount=89,8.0,'★以上信号结合rsi低位时用更加可靠,盘整市中信号偏多!!'),color00ff00;

drawtext(currbarscount=89,7.3,'★当大牛\中牛\短牛同一天出现时,

果断买入!!'),color00ffff;

选股原码:

1、灯塔(大牛)

a7:=c-ref(c,1);

a8:=100*ema(ema(a7,6),6)/ema(ema(abs(a7),6),6);

rma:=ema(close,7);

nma:=ema(close,19);

up:=drawline(l=llv(l,barslast(cross(nma,rma))+1),llv(l,barslast(cross

(nma,rma))+1),h=hhv(h,barslast(cross(rma,nma))+1),hhv(h,barslast(cross

(rma,nma))+1),0),color0000ff;

down:=drawline(h=hhv(h,barslast(cross(rma,nma))+1),hhv(h,barslast(cross

(rma,nma))+1),l=llv(l,barslast(cross(nma,rma))+1),llv(l,barslast(cross

(nma,rma))+1),0),color00ff00;

{bt:=(llv(a8,2)=llv(a8,7) and count(a8<0,2) and cross(a8,ma(a8,2))) and

ref(down,1)<ref(down,2) and up>ref(down,1);}

hr:=hhv(high,55);

hry:=llv(low,55);

hry11:=hr*hry;

hry33:=sqrt(hry11);

tj:=ref(down,1)<ref(down,2) and up>ref(down,1) and c<hry33;

xg:tj;

2、灯塔:短线牛

a7:=c-ref(c,1);

a8:=100*ema(ema(a7,6),6)/ema(ema(abs(a7),6),6);

rma:=ema(close,7);

nma:=ema(close,19);

up:=drawline(l=llv(l,barslast(cross(nma,rma))+1),llv(l,barslast(cross

(nma,rma))+1),h=hhv(h,barslast(cross(rma,nma))+1),hhv(h,barslast(cross

(rma,nma))+1),0),color0000ff;

down:=drawline(h=hhv(h,barslast(cross(rma,nma))+1),hhv(h,barslast(cross

(rma,nma))+1),l=llv(l,barslast(cross(nma,rma))+1),llv(l,barslast(cross

(nma,rma))+1),0),color00ff00;

bt:=(llv(a8,2)=llv(a8,7) and count(a8<0,2) and cross(a8,ma(a8,2))) and

ref(down,1)<ref(down,2) and up>ref(down,1);

xg:bt;

请老师帮编写均线连续多日粘合,股价横盘的选股公式

N:=5;

M:=2;

MA1:=MA(C,5);

MA2:=MA(C,10);

MA3:=MA(C,20);

HH:=MAX(MA1,MAX(MA2,MA3));

LL:=MIN(MA1,MIN(MA2,MA3));

CC:=(HHV(CLOSE,N)-LLV(CLOSE,N))/CLOSE<0.02;

XG:EVERY((HH-LL)/LL*100

(N为天数,M为粘连度,可自己修改)

两条均线不断地交叉,向上横盘时间很久。这个公式怎么写。感激不尽!

A1:=MA(C,5);

A2:=MA(C,10);

A3:=MA(C,60);

COUNT(CROSS(A1,A2),60)&gt;5 AND COUNT(A3&gt;REF(A3,1),30)&gt;25 AND C&gt;A3;

如何编写 均线交叉或者是粘合 的公式?用在通达信中

MA10:=MA(CLOSE,10);

MA20:=MA(CLOSE,20);

MA30:=MA(CLOSE,30);

MA60:=MA(CLOSE,60);

CROSS(MA10,MA20) OR RANGE(MA10/MA20,0.995,1.005)...

(按上面的方法,补充你其他线条的组合就可以了,如果觉得粘合条件过于苛刻,调整后面的常数0.995和1.005就可以)

如楼上的跟你说的,粘合只是股价面临向上或向下突破的临界点,要做出进一步判断,但靠均线粘合是远远不够的。