通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
RSV:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
短多:SMA(RSV,3,1),colorred,LINETHICK1;
短空:SMA(短多,3,1),coloryellow,LINETHICK1;
RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100;
中多:SMA(RSV1,5,1),COLORFF00FF,LINETHICK1;
中空:SMA(中多,10,1),colorgreen,LINETHICK1;
多方风险线:85,colorblue;
空方风险线:18,colorwhite;
STICKLINE(短多 短空,短多,短空,6,0),colorred;
STICKLINE(短多 =短空,短多,短空,6,0),coloryellow;
STICKLINE(中多 中空,中多,中空,6,0),COLORFF00FF;
STICKLINE(中多 =中空,中多,中空,6,0),colorgreen;
MA1:MA(C,5),colorred,LINETHICK1;
MA2:MA(C,10),coloryellow,LINETHICK1;
MA3:MA(C,30),COLOR9933CC,LINETHICK1;
MA4:MA(C,60),colorgreen,LINETHICK1;
K1:=BACKSET(MA1 REF(MA1,1),2);
IF(K1,MA1,DRAWNULL),COLOR00CC33,LINETHICK1;
K2:=BACKSET(MA2 REF(MA2,1),2);
IF(K2,MA2,DRAWNULL),COLORFFCC66,LINETHICK1;
K3:=BACKSET(MA3 REF(MA3,1),2);
IF(K3,MA3,DRAWNULL),colorblue,LINETHICK1;
阻力价:HHV(HIGH,19),LINETHICK1,NODRAW;
Y:=(MA(C,5)-MA(C,30))/MA(C,5)*100;
YY1:=C MA(C,5)ANDOPEN MA(C,5);
YY3:=C MA(C,10)ANDOPEN MA(C,10);
YY5:=C MA(C,30)ANDOPEN MA(C,30);
DRAWTEXT(YY1ANDYY5ANDYY3,LOW*0.97, 双龙出海 ),colorred;
VAR1:=HHV(HIGH,25);
VAR2:=LLV(LOW,25);
VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);
VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
VAR5:=CROSS(VAR4,VAR3);
DRAWICON(CROSS(VAR4,VAR3),LOW*0.97,11);
X3:DRAWICON(CROSS(MA1,MA2),MA2,1);
X4:DRAWICON(CROSS(MA1,MA3),MA3,1);
X5:DRAWICON(CROSS(MA2,MA3),MA3,1);HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6; HHJSJDB:(20*HHJsjda+19*REF(HHJsjda,1)+18*REF(HHJsjda,2)+17*REF(HHJsjda,3)+16*REF(HHJsjda,4)+15*REF(HHJsjda,5)+14*REF(HHJsjda,6) +13*REF(HHJsjda,7)+12*REF(HHJsjda,8)+11*REF(HHJsjda,9)+10*REF(HHJsjda,10)+9*REF(HHJsjda,11)+8*REF(HHJsjda,12) +7*REF(HHJsjda,13)+6*REF(HHJsjda,14)+5*REF(HHJsjda,15)+4*REF(HHJsjda,16)+3*REF(HHJsjda,17)+2*REF(HHJsjda,18)+ REF(HHJsjda,20))/210,coloryellow; HHJSJDC:MA(HHJSJDB,5),colorred;
ZX:IF(ISNULL(NEW),PRE,NEW);
byx:=MA(ZX,10);
xxx:=MA(ZX,20);
yyy:=MA(ZX,40);
k:=SLOPE(byx,3);
K7:=SLOPE(byx,7);
m_k=MA(k,2);
aa=SLOPE(m_k,1);
FILLRGN(byx,REF(byx,2),byx REF(byx,2),RGB(255,0,0),byx REF(byx,2),RGB(0,0,255));
zlcc:=EMA(100*(NEW-LLV(NEW,34))/(HHV(NEW,34)-LLV(NEW,34)),3);
xd:HHV(MA((NEW),5),30),colorbrown;
xd:LLV(MA((NEW),5),30),colormagenta;
cd:LLV(MA((NEW),5),120),colorgray;
JJ:=(NEW+HHV(MA((NEW),5),2)+LLV(MA((NEW),5),2))/3;
AA:=EMA(JJ,3);
BB:=REF(AA,1);
STICKLINE(AA BB,AA,BB,3,0),coloryellow;
V1:=LLV(NEW,10);
V2:=HHV(NEW,25);
价位线:=EMA((NEW-V1)/(V2-V1)*4,4);
DRAWTEXT(CROSS(价位线,0.3),NEW, ★ ),colorred;
IF(MARKETTYPE==176ORMARKETTYPE==64)
{
b=SUBSAMEDAY( amp;VOL);
m=SUM(b*ZX,0);
均价:IF(m 0,m/VOL,PRE);
}
ELSEIF(CODETYPE!=0)
{
IF(ISNULL(MONEY)ORISNULL(VOL)ORVOL==0ORMONEY==0)
均价:PRE;
ELSEIF(VOL==VOL[1]ORMONEY==MONEY[1])
均价:均价[1];
ELSE
均价:MONEY/VOL;
}
DRAWGBK(FORMATTIME(1) 10ANDTRADETIME 242),RGB(0,0,128);
jun_k=SLOPE(均价,1);
PARTLINE(ZX,k =0ANDK7 =0 ANDjun_k =0,RGB(255,0,0),k =0ANDK7 =0 ANDjun_k =0,RGB(0,255,0));
RETURN;
hx_star;
hx_star_p;
XA_1:=ABS(((3.48*CLOSE+HIGH+LOW+OPEN)/5-EMA(CLOSE,20))/EMA(CLOSE,20));
XA_2:=DMA((2.15*CLOSE+LOW+HIGH+OPEN)/5,XA_1);
XA_3:=EMA(XA_2,200)*1.26;
XA_4:=EMA(XA_2,200)*1.18;
XA_5:=MA((LOW+HIGH+CLOSE)/3,5);
XA_6:=HHV(XA_5,60);
XA_7:=IF(XA_6 REF(XA_6,1),XA_6,DRAWNULL);
XA_8:=CLOSE*VOL;
XA_9:=EMA((EXPMA(XA_8,3)/EXPMA(VOL,3)+EXPMA(XA_8,6)/EXPMA(VOL,6)+EXPMA(XA_8,12)/EXPMA(VOL,12)+EXPMA(XA_8,24)/EXPMA(VOL,24))/4,13);
XA_10:=1.03*XA_9;
XA_11:=1.13*XA_9;
XA_12:=MIN(XA_7,XA_3);
XA_13:=MIN(XA_10,XA_3);
XA_14:=MIN(XA_7,XA_4);
XA_15:=MIN(XA_10,XA_4);
XA_16:=CLOSE/REF(CLOSE,1) 1.03ANDCLOSE=HIGH;
XG:CROSS(CLOSE,XA_11)ANDXA_16;
VAR1:=(C-MA(C,6))/MA(C,6)*100;
VAR2:=(C-MA(C,24))/MA(C,24)*100;
VAR3:=(C-MA(C,32))/MA(C,32)*100;
VAR4:=(VAR1+VAR2+VAR3)/3;
VAR5:=EMA(VAR4,5);
VAR6:=MA(100*(C-LLV(C,34))/(HHV(H,34)-LLV(L,34)),5)-20;
VAR7:=SMA(SMA(100-3*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1)+SMA(2*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1),15,1);
VAR8:=VAR7 REF(VAR7,1)ANDV REF(V,1)ANDC REF(C,1);
K:=EMA(VAR5,5)*4,NODRAW;
D:EMA(K,5),NODRAW,COLOR38B0DE;
J:K*3-D*2,NODRAW,COLORCC66FF;
MACD:EMA(EMA(VAR1,5),5)*6,NODRAW,COLORWHITE;
STICKLINE(J,J,K,4,0),COLORCC66FF;
STICKLINE(D,D,K,4,0),COLOR38B0DE;
STICKLINE(MACD 0,0,MACD,1,0),COLORRED;
STICKLINE(MACD 0,0,MACD,1,0),COLORFF9900;
看多:IF(LLV(VAR6,3) VAR6,-60,DRAWNULL),LINETHICK7,COLORRED;
看空:IF(VAR6=LLV(VAR6,3),-60,DRAWNULL),LINETHICK7,COLORGREEN;
中:IF(J D,-50,DRAWNULL),LINETHICK7,COLORCC66FF;
超短线:IF(VAR8 0,-40,DRAWNULL),LINETHICK7,COLORYELLOW;
不定区:IF(J D,-50,DRAWNULL),LINETHICK5,COLORFF9900;
龙虎战区:IF(VAR8=0,-40,DRAWNULL),LINETHICK5,COLOR6B8E23;
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通道1:=AA*102/100;
通道2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
通道3:=(1+7/100)*DD;
通道4:=(1-7/100)*DD;
股价:=(H+L+C)/3;
股价运动:=股价,LINETHICK2,COLORBLUE;
运动:LINETHICK2,COLORRED;
高风险区1:运动趋势*1.1,COLORLICYAN;
高风险区2:运动趋势*1.125,COLORLICYAN;
高风险区3:运动趋势*1.15,COLORLICYAN;
良机区1:运动趋势*0.9,COLORLIBLUE;
良机区2:运动趋势*0.875,COLORLIBLUE;
良机区3:运动趋势*0.85,COLORLIBLUE;
T:=CLOSE/REF(CLOSE,1)*1000-1000;
QS2:=XMA(XMA(XMA(T,2),2),2);
QS4:=XMA(XMA(XMA(T,4),4),4);
QS6:=XMA(XMA(XMA(T,6),6),6);
{DRAWICON(CROSS(QS2,QS4),L,1);
DRAWICON(QS2 QS4ANDREF(QS2,1) REF(QS4,1),H,2);}
高风险:=((C-运动趋势)/运动趋势*100 10ANDC 通道3)OR((H-运动趋势)/运动趋势*100 10ANDH 通道3)OR((O-运动趋势)/运动趋势*100 10ANDO 通道3);
DRAWICON(高风险ANDFILTER(高风险,3),H+0.01,6);
良机:=((C-运动趋势)/运动趋势*100 -10ANDC 通道4)OR((O-运动趋势)/运动趋势*100 -10ANDO 通道4)OR((L-运动趋势)/运动趋势*100 -10ANDL 通道4);
QW1:=运动趋势 REF(运动趋势,1);
DRAWICON(良机ANDQW1ANDFILTER(良机,3),L-0.01,5);
QW2:=O 良机区3;
DRAWICON(QW2ANDFILTER(QW2,3),L-0.01,9);
公式解读:
[源码注释]通达信公式动态公式解读AAA赋值:(收盘价的13日简单移动平均+收盘价的17日简单移动平均)/2
CCC赋值:(收盘价的13日估算标准差+收盘价的17日估算标准差)/2
BBB赋值:AAA+2.1*CCC
DDD赋值:AAA+0.72*CCC
ZZZ赋值:如果CCC 1.88,返回DDD的3日简单移动平均,否则返回DDD
输出平衡:ZZZ
输出止赢:ZZZ*1.1
输出了结:ZZZ*1.05
输出回档:ZZZ*0.95
输出反弹:ZZZ*0.9
当满足条件平衡 1日前的平衡ANDREF(平衡,1) 2日前的平衡时,在平衡*1.005和平衡*0.995位置之间画柱状线,宽度为9,0不为0则画空心柱.,画蓝色
公式解读:
编写条件:
昨日阴线今日反包的选股公式。
编写方法:
XG:REF(C O,1)ANDC =ZTPRICE(REF(C,1),0.1);