通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、抄底定式模型
“涨势吞没”是由两根k线组成,也就是说,股价一直处于跌势中,先拉出一根实体较小的阴线,然后在出现一根实体相对较大的阴线,并且阳线将阴线完全裹住,体现的是多空力量的转变,如图,股价在下跌途中,出现“涨势吞没”,也就是“大阳包小阴”,初步确定了此模型。
二、震荡指标模式
从图中可以看到,此模式出现后,相应的它的macd指标也发生变化,形成金叉,弯曲持续向上,表明后市要上涨,行情要看好,但也要仔细观察。
三、定式价量模式
如图所示,看看他的价量关系,我们发现,出现此模式后,相应的它的成交量也出现了地量,这时预示着是一个抄底信号,可以去买入。
公式源码如下:
N:=9;
M:=14;
N1:=6;
TYP:=(HIGH+LOW+CLOSE)/3;
CC1:=(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
K1:(K-50)*5,COLORFFFF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:=RRANDNOT(REF(RR,1))AND(RR1<-100ANDBB1<-100)ANDCB1<-100;
DRAWBAND(CC1,RGB(220,50,100),100,RGB(100,150,72));
DRAWBAND(CC1,RGB(220,50,100),100,RGB(100,80,220));
cci-p-1.html” target=”_self”>CCI:CC1,COLORFF00FF;
RSI:(RSI1-50)*5,LINETHICK2,COLORFFFFFF;
DRAWICON(买入,-200,1);
趋势:5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),2,1),LINETHICK0,COLOR7F52AF;
趋势1:EMA(MA(趋势,5),3),LINETHICK0,COLORA6B8C1;
STICKLINE(趋势>=趋势1,趋势,趋势1,5,0),COLOR7F52AF;
STICKLINE(趋势<趋势1,趋势,趋势1,5,0),COLORA6B8C1;
STICKLINE(趋势>108AND趋势>=趋势1,趋势,108,5,0),COLORFF0000;
STICKLINE(趋势1>108AND趋势<趋势1,趋势1,108,5,0),COLORFFFFFF;
STICKLINE(趋势<0AND趋势<趋势1,趋势,0,5,0),COLORF00FF0;
STICKLINE(趋势1<0AND趋势>趋势1,趋势1,0,5,0),COLORF0F000;
V1:=MA(CLOSE,5)=HHV(MA(CLOSE,5),20);
V2:=MA(CLOSE,5)>MA(CLOSE,20);
V3:=COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;
风险:IF(V1ANDV2ANDV3,30,0),LINETHICK0,STICK,COLOR00FF00;
V11:=MA(CLOSE,5)=HHV(MA(CLOSE,5),120);
V21:=MA(CLOSE,5)>MA(CLOSE,120);
V31:=COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;
风险1:IF(V11ANDV21ANDV31,60,0),LINETHICK0,STICK,COLORF0F000;
底部:5,LINETHICK0,COLOR00FFFF;
抄底:IF(CROSS(趋势,底部),60,0),LINETHICK2,STICK,COLORRED;
DRAWTEXT(抄底,50,'抄底'),COLOR0000FF;
天线:108,LINETHICK0,COLORFF9D00;
涨停:=IF(REF(C,1)*1.1-C<0.2,1,0);
STICKLINE(涨停,OPEN,CLOSE,4,2),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,0.8,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
ZT:=C/REF(C,1)>1.095;
STICKLINE(MA(CLOSE,5)>REF(MA(CLOSE,5),1)ANDZT,O,C,0.6,0),COLORYELLOW;
STICKLINE(MA(CLOSE,5)<=REF(MA(CLOSE,5),1)ANDZT,O,C,0.6,0),COLORRED;
VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100;
DRAWTEXT(CROSS(82,VAR7),H*1.02,'逃顶'),COLORYELLOW;
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,NODRAW;
K:=SMA(RSV,M1,1),NODRAW;
D:=SMA(K,M2,1),NODRAW;
J:=3*K-2*D,NODRAW;
CJ_K:=MA(K,15),LINETHICK2,NODRAW;
CJ_D:=MA(D,15),LINETHICK2,NODRAW;
CJ_J:=MA(J,15),LINETHICK2,NODRAW;
DRAWICON(CROSS(CJ_K,CJ_D)&&CJ_D<30,L*0.92,11);
DRAWICON(CROSS(CJ_D,CJ_K)&&CJ_D>70,H*1.05,12);
DRAWICON(CROSS(CCI,-100),L*0.98,1);
DRAWICON(CROSS(CCI,0),L*0.98,1);
DRAWICON(CROSS(CCI,100),L*0.98,1);
DRAWICON(CROSS(100,CCI),H*1.02,2);
{DRAWICON(CROSS(50,CCI),H*1.02,12);};
PT1:=CONST(HHV(H,20))/1.2;
IF(CURRBARSCOUNT<=10,PT1,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT1,'回马枪观测'),COLORWHITE;
PT2:=CONST(HHV(H,10))/1.2;
IF(CURRBARSCOUNT<=10,PT2,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT2,'回马枪观测'),COLORWHITE;
逃顶:IF(CROSS(天线,趋势),1,0),LINETHICK0,STICK,COLORFF9D00;
STICKLINE(CROSS(天线,趋势),90,108,3,0),COLORFF9D00;
DRAWTEXT(CROSS(天线,趋势),85,'逃顶'),COLORFF9D00;
主力资金:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORRED,LINETHICK2;
即将爆发线:65,color00ff00;
爆发线:80,COLORWHITE,LINETHICK1;
DRAWTEXT(CROSS(主力资金,爆发线),主力资金,'★爆发!'),COLORYELLOW;
爆发警戒线:50,COLOR00FF00;
抄底线:20,COLORWHITE,LINETHICK2;
DRAWTEXT(CROSS(主力资金,抄底线),主力资金,'★抄底'),COLORWHITE;
DRAWTEXT(CROSS(主力资金,爆发警戒线),主力资金,'★加仓'),COLORWHITE;
DRAWTEXT(CROSS(主力资金,即将爆发线),主力资金,'★加仓'),COLORWHITE;
DRAWTEXT(CROSS(爆发线,主力资金),爆发线,'★空仓'),COLORWHITE;
LC:=REF(C,1);
F1:=zig(3,15);
方向:IF((F1>REF(F1,1)),5,105),COLOR00FF00,LINETHICK2;
DRAWTEXT(CROSS(抄底线,方向),抄底线,'★逢低进场!'),colorred;
DRAWTEXT(CROSS(方向,抄底线),方向+20,'★逢高出场!'),COLORWHITE;
[源码注释]通达信公式动态翻译结果
上次"平滑异同平均的DIF"上穿"平滑异同平均的DEA"距今天数<=5 AND "平滑异同平均的DIF"上穿0
评论(0)