通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信短线抓涨停指标公式
N:=3;M1:=15;A:=REF(CLOSE,1);A1:=SMA(MAX(CLOSE-A,0),N,1)/SMA(ABS(CLOSE-A),N,1)*2;A2:=POW(A1,M1),COLORGREEN;平安:A2>130ANDREF(A2,1)<130;
W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));TJ1:=W4ANDCOUNT(W4,5)=1;TJ2:=(REF(C,1)/REF(C,2)>1.0991ANDREF(C=H,1));MA111:=MA(CLOSE,20);MA112:=MA(CLOSE,40);MA113:=MA(CLOSE,60);A11:=OPEN<MA111OROPEN<MA112OROPEN<MA113,COLORRED;A12:=C>MAX(MA111,MAX(MA112,MA113)),COLORRED;A13:=V/MA(V,30)>1.2,COLORRED;A14:=C/REF(C,1)>1.049,COLORRED;TJ31:=C/REF(C,1)>1.09;TJ3:=TJ31ANDA11ANDA12ANDA13ANDA14,COLORRED;次日涨停:TJ1ANDTJ2ORTJ3;
短线看K,D线,中线看红绿方形指标。
短线可参考中线指标来做,红色持股、绿色卖出。
试试,你还会被套住吗?
对了,千万不要说FINANCE这个函数会下你一跳,知道它的作用你就安心了!(写给不懂未来函数的人!因为我以前经常看到有人在惊呼!)
{最佳设定P1:1,30,5P2:1,30,4N:1,100,38M:1,100,2}
VAR1:=LLV(LOW,P1);
VAR2:=HHV(HIGH,P1);
AA03:MA(C,3),LINETHICK3,COLOR0099CC;
五日乖离率:=(C-AA03)/AA03*100;
BB03:=ATAN((AA03/REF(AA03,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA03-REF(AA03,1))/REF(AA03,1),3)*100,3,1);
加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB03>30ANDAA03>REF(AA03,1),AA03,DRAWNULL),LINETHICK3,COLORCYAN;
AA10:MA(C,10);AA20:=MA(C,20);
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
IF(BB03<0ANDAA03<REF(AA03,1),AA03,DRAWNULL),LINETHICK3,COLORYELLOW;
AA30:MA(C,30);
三拾日乖离率:(C-AA30)/AA30*100,NODRAW;
VAR1:=(AA20-AA30)>REF((AA20-AA30),1)ANDAA20>REF(AA20,1)ANDAA30>REF(AA30,1);
VAR2:=(AA30-AA20)<REF((AA30-AA20),1)ANDAA20<REF(AA20,1)ANDAA30<REF(AA30,1);
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
IF(BB30>15ANDAA30>REF(AA30,1),AA30,DRAWNULL),LINETHICK3,COLORFF00FF;
强势狙击:=FILTER(BB30>30ANDBB10>45ANDCROSS(BB03,60),10);
加仓:=FILTER(COUNT(CROSS(BB03,30),5)>=1ANDAA03>REF(AA03,1)AND三拾日乖离率>REF(三拾日乖离率,1)ANDAA10>REF(AA10,1)
AND加速度5>REF(加速度5,1)AND速度5>REF(速度5,1),10);
清仓:=FILTER(COUNT(CROSS(30,BB03),5)>=1AND(C>AA30ORO>AA30)ANDAA03<REF(AA03,1)AND三拾日乖离率<REF(三拾日乖离率,1)ANDAA10<REF(AA10,1),10);
DRAWTEXT(加仓,LOW*0.98,'←加仓'),COLORRED;
JC:=CROSS(0,五日乖离率)AND三拾日乖离率<REF(三拾日乖离率,1)ANDAA10>REF(AA10,1);
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3)>=1AND三拾日乖离率>REF(三拾日乖离率,1)ANDAA03>REF(AA03,1)AND(C/REF(C,1)-1)*100>5ANDREF(C,1)<AA30;
买入:=FILTER(MR,10);
DRAWTEXT(减仓,HIGH*1.02,'←减仓'),COLORCYAN;
DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;
DRAWTEXT(清仓,HIGH*1.02,'←清仓'),COLORGREEN;
DRAWTEXT(强势狙击,LOW*0.98,'←强势狙击'),COLORYELLOW;
VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));
VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);
MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;
DRAWTEXT(MV>6ANDL<=LLV(L,10),L*0.95,'←异动'),COLORCYAN;
RS:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K1:=RS>=100;K2:=RS<100;XG:CROSS(K1,K2);
MA30:=MA(C,30);E:=(MA30-REF(MA30,5))*100>=1;F:=REF(C,1)<MA30ANDC>MA30ANDC/REF(C,1)>1.099;G:=V>MA(V,5)*2;CYFLZT:EANDFANDG;
M3:MA(CLOSE,3);M13:MA(CLOSE,13);M34:MA(CLOSE,34),COLORRED,LINETHICK2;
X:=BARSLAST(REF(CROSS(C,MA(C,120)),1))ANDCROSS(MA(C,20),MA(C,120));
IF(M34<REF(M34,1),M34,DRAWNULL),COLORGREEN,LINETHICK2;
STICKLINE(M3>=M13ANDM34>=REF(M34,1),H,L,0.1,0),COLOR0000DD;
STICKLINE(M3>=M13ANDM34>=REF(M34,1)ANDC>=O,O,C,3,1),COLOR0000DD;
STICKLINE(M3>=M13ANDM34>=REF(M34,1)ANDC<O,O,C,3,0),COLOR0000DD;
STICKLINE(M3<M13ANDM34>=REF(M34,1),H,L,0.1,0),COLORFFBB00;
STICKLINE(M3<M13ANDM34>=REF(M34,1)ANDC>=O,O,C,3,1),COLORFFBB00;
STICKLINE(M3<M13ANDM34>=REF(M34,1)ANDC<O,O,C,3,0),COLORFFBB00;
STICKLINE(M3<M13ANDM34<REF(M34,1),H,L,0.1,0),COLORFF0000;
STICKLINE(M3<M13ANDM34<REF(M34,1)ANDC>=O,O,C,3,1),COLORFF0000;
STICKLINE(M3<M13ANDM34<REF(M34,1)ANDC<O,O,C,3,0),COLORFF0000;
STICKLINE(M3>=M13ANDM34<REF(M34,1),H,L,0.1,0),COLORFF00FF;
STICKLINE(M3>=M13ANDM34<REF(M34,1)ANDC>=O,O,C,3,1),COLORFF00FF;
DRAWTEXT(X,MA(C,120)-0.13,'牛股'),LINETHICK3,COLORWHITE;
[源码注释]通达信公式动态翻译结果
输出XG:平滑异同平均的DIF上穿平滑异同平均的DEA AND 平滑异同平均的DEA位于0.997和1.003之间
每日通达信公式解答:
连续2个十字星的选股公式。
解答:
十字星:=CLOSE=OPEN&&HIGH>LOW;
COUNT(十字星,2)=2;
评论(0)