通达信傻买傻卖——航母短线主图公式 有了此图,别无他求通达信公式

2017-10-25    来源:原创    编辑:翔博软件
公式源码: ZGD:=HHV(H,60); ZGD2:=CONST(ZGD); ZDD:=LLV(L,60); ZDD2:=CONST(ZDD); GJ:=(C+H+L+O)/4; 明日阻力:=L+(GJ-L)+(C-L); 明日支撑:=L+(C-GJ); KOH:=LREF(H,1); KOL:=H


公式源码:

ZGD:=HHV(H,60);

ZGD2:=CONST(ZGD);

ZDD:=LLV(L,60);

ZDD2:=CONST(ZDD);

GJ:=(C+H+L+O)/4;

明日阻力:=L+(GJ-L)+(C-L);

明日支撑:=L+(C-GJ);

KOH:=L>REF(H,1);

KOL:=H<REF(L,1);

HIF:=L>REF(H,BARSLAST(KOH)+1);

NHIF:=L<=REF(H,BARSLAST(KOH)+1);

LIF:=H<REF(L,BARSLAST(KOL)+1);

NLIF:=H>=REF(L,BARSLAST(KOL)+1);

下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);

RRRSV:=SMA(下档线,3,1);

KKK:=SMA(RRRSV,3,1);

DDDDD:=((3 * RRRSV) - (2 * KKK));

JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);

RSV24:=SMA(JJ12,3,1);

K24:=SMA(RSV24,3,1);

D24:=((3 * RSV24) - (2 * K24));

压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;

底部:=LLV(HIGH,30),COLOR00FF00;

AA:=REF(H,N)=HHV(H,2*N+1); 

AA1:=REF(L,N)=LLV(L,2*N+1);

QY:=BACKSET(AA,N+1); 

QY1:=BACKSET(AA1,N+1);

CC:=FILTER(QY,N) AND H=HHV(H,N+1); 

CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);

DDD:=BARSLAST(CC); 

DD1:=BARSLAST(CC1);

GDTS:=IF(CC,CURRBARSCOUNT,0); DDTS:=IF(CC1,CURRBARSCOUNT,0);

DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);

GDCS1:=CONST(DINGBUTS); DDCS1:=CONST(DDTS1);

GDCS13:=CONST(REF(HIGH,GDCS1-1)); DDCS13:=CONST(REF(L,DDCS1-1));

DINGBUTS1:=REF(DINGBUTS,DDD+1); DDTS2:=REF(DDTS1,DD1+1);

GDCS2:=CONST(DINGBUTS1); DDCS2:=CONST(DDTS2);

GDCS23:=CONST(REF(HIGH,DINGBUTS1-1)); DDCS23:=CONST(REF(L,DDTS2-1));

XG1:=BACKSET(ISLASTBAR,GDCS1); XD1:=BACKSET(ISLASTBAR,DDCS1);

XG2:=BACKSET(ISLASTBAR,DINGBUTS1); XD2:=BACKSET(ISLASTBAR,DDTS2);

XDD:=IF(DDCS13<=DDCS23,XD1,XD2);

M:=INTPART(3*N/5);

AAA:=REF(H,M)=HHV(H,2*M+1);

QYY:=BACKSET(AAA,M+1);

CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);

DDDD:=BARSLAST(CCC),NODRAW;

GDTSS:=IF(CCC,CURRBARSCOUNT,0);

DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);

GDCS11:=CONST(DINGBUTSS);

DINGBUTS11:=REF(DINGBUTSS,DDDD+1);

GDCS22:=CONST(DINGBUTS11);

AA11:=REF(L,M)=LLV(L,2*M+1);

QY11:=BACKSET(AA11,M+1);

CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);

DD11:=BARSLAST(CC11);

DDTSS:=IF(CC11,CURRBARSCOUNT,0);

DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);

DDCS11:=CONST(DDTS11);

DDTS22:=REF(DDTS11,DD11+1);

DDCS22:=CONST(DDTS22);

高点压力M:=DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORYELLOW,LINETHICK2;

低点支撑M:=DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1),COLORYELLOW,LINETHICK2;

BCG:=SUM(XG1,0); BCD:=SUM(XDD,0);

今日阻力:REF(明日阻力 , 1),NODRAW;

今日支撑:REF(明日支撑 , 1),NODRAW;

压力位:IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;

底部位:IF(ISLASTBAR,底部,DRAWNULL),NODRAW;

高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),CROSSDOT,COLORWHITE,LINETHICK2;

低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),CROSSDOT,COLORWHITE,LINETHICK2;

高:=CONST(MAX(MAX(MAX(MAX(MAX(MAX(ZGD2,高点压力),低点支撑),GDCS13),GDCS23),高点压力M)

,低点支撑M));

低:=CONST(MIN(MIN(MIN(MIN(MIN(MIN(ZDD2,DDCS23),DDCS13),低点支撑),高点压力),低点支撑M)

,高点压力M));

{DRAWBAND(高,RGB(100,100,100),低,RGB(100,100,100));}

DRAWBAND(高点压力,RGB(00,00,100),低点支撑,RGB(00,00,100));

点石成金H:=IF(CLOSE>200,SUM(H*VOL,BCG)/SUM(VOL,BCG),SUM(AMOUNT,BCG)/

SUM(V,BCG)/100*SUM(H,BCG)/SUM(C,BCG));

点石成金L:=IF(CLOSE>200,SUM(L*VOL,BCD)/SUM(VOL,BCD),SUM(AMOUNT,BCD)/

SUM(V,BCD)/100*SUM(L,BCD)/SUM(C,BCD));

ZGSTAR:=(高点压力+低点支撑)/2;

ZGEND:=CONST((高点压力+低点支撑)/2);

STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);

中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR555555,LINETHICK1;

上缺口:=P=0 AND HIF AND BARSLAST(KOH)<BARSLAST(NHIF)

AND BARSLAST(HIF)<BARSLAST(NHIF);

HG:=IF(上缺口,REF(H,BARSLAST(KOH)+1),DRAWNULL);

STICKLINE(上缺口,HG,HG*1.001,10,0),COLOR888888;

下缺口:=P=0 AND LIF AND BARSLAST(KOL)<BARSLAST(NLIF) AND BARSLAST(LIF)

<BARSLAST(NLIF);

LG:=IF(下缺口,REF(L,BARSLAST(KOL)+1),DRAWNULL);

STICKLINE(下缺口,LG,LG*0.999,10,0),COLOR888888;

DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORGREEN,LINETHICK3;

DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1),COLORGREEN,LINETHICK3;

STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORWHITE;

STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORYELLOW;

STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA;

STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;

STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;

STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;

STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;

STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;

STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;

STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;

NN:=IF(BARSCOUNT(C)>=10,10,BARSCOUNT(C));

STICKLINE(C>=MA(C,NN),MA(C,NN),MA(C,NN*0.7),3,0),COLORYELLOW;

STICKLINE(C<MA(C,NN),MA(C,NN),MA(C,NN*0.7),4,0),COLORBLUE;

DRAWKLINE(H,O,L,C);

下降压力线:DRAWLINE(HIGH>=HHV(HIGH,12),HIGH,LOW<=LLV(LOW,12),HHV(HIGH,4),1),LINETHICK3,COLORMAGENTA;

上涨支撑线:DRAWLINE(LOW<=LLV(LOW,12),LOW,HIGH>=HHV(HIGH,4),LLV(LOW,4),1),LINETHICK2,COLORWHITE;

 

M10:=EMA(C,10);

融胜:=M10,COLORRED,LINETHICK1;

FF:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);

DD:=DMA(CLOSE,FF);

高抛:(1+14/100)*DD,DOTLINE,COLORGREEN;

压力:(1+7/100)*DD,DOTLINE,COLORFFFF00;

支撑:(1-7/100)*DD,DOTLINE,COLORBLUE;

低吸:(1-14/100)*DD,DOTLINE,COLOR4080FF;

中轨A:(压力+支撑)/2,DOTLINE,COLORMAGENTA;

DRAWTEXT(CURRBARSCOUNT=1,高抛,'高抛'),COLOR00FFFF; 

DRAWTEXT(CURRBARSCOUNT=1,压力,'压力'),COLOR00FFFF; 

DRAWTEXT(CURRBARSCOUNT=1,中轨A,'中轨A'),COLOR00FFFF; 

DRAWTEXT(CURRBARSCOUNT=1,支撑,'支撑'),COLOR00FFFF; 

DRAWTEXT(CURRBARSCOUNT=1,低吸,'低吸'),COLOR00FFFF; 

IF(MA3>=REF(MA3,1) AND MA3>支撑,MA3,DRAWNULL),COLOR00F7F7,LINETHICK4;

CCA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);

DDA:=DMA(CLOSE,CCA);

上轨:(1+7/100)*DDA,COLORGREEN;

下轨:(1-7/100)*DDA,COLORGREEN;

中轨B:(上轨+下轨)/2,COLORGREEN;

疯狂:(1+14/100)*DDA,COLORGRAY,POINTDOT;

抄底:(1-14/100)*DDA,COLORGRAY,POINTDOT;

DRAWNUMBER(ISLASTBAR,上轨,上轨),COLOR00FFFF;

DRAWNUMBER(ISLASTBAR,下轨,下轨),COLORFFFF00;

DRAWNUMBER(ISLASTBAR,中轨B,中轨B),COLOR00FF00;

DRAWNUMBER(ISLASTBAR,疯狂,疯狂),COLOR0000FF;

DRAWNUMBER(ISLASTBAR,抄底,抄底),COLORWHITE;

INLINE:=EMA(C,250);

CHIPS:=INLINE-(EMA(C,3)-INLINE),COLORGRAY;

上轨红:IF(上轨>=REF(上轨,1),上轨,DRAWNULL),COLORRED,LINETHICK2;

中轨红:IF(中轨B>=REF(中轨B,1), 中轨B,DRAWNULL),COLORRED, LINETHICK2;

下轨红:IF(下轨>=REF(下轨,1), 下轨,DRAWNULL),COLORRED,LINETHICK2;

 

中期临界点90:DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),CIRCLEDOT,COLORGRAY;

{年:DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,250),VOL),CIRCLEDOT,COLORGRAY;}

STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;

涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);

STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;

DRAWTEXT(涨停,L-0.1,'涨停'),COLORYELLOW;

C3:=REF(C,1);

跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);

STICKLINE(跌停,OPEN,CLOSE,2.5,0),COLORBLUE;

DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;

净资产:FINANCE(34),NODRAW,COLORFF00FF;

每股收益:FINANCE(33),NODRAW,COLORFF7F50;

市盈率:DYNAINFO(39),NODRAW,COLORFF00FF;

流通市值:(FINANCE(40)/100000000),NODRAW,COLORRED;

STICKLINE((CLOSE>=中轨B) AND (CLOSE>=OPEN),CLOSE,OPEN,3,0),COLORRED;

STICKLINE((CLOSE>=中轨B) AND (CLOSE>=OPEN),HIGH,LOW,0,0),COLORRED;

STICKLINE((CLOSE>=中轨B) AND (CLOSE<OPEN),CLOSE,OPEN,3,1),COLORRED;

STICKLINE((CLOSE>=中轨B) AND (CLOSE<OPEN),OPEN,HIGH,0,0),COLORRED;

STICKLINE((CLOSE>=中轨B) AND (CLOSE<OPEN),CLOSE,LOW,0,0),COLORRED;

STICKLINE((CLOSE<中轨B) AND (CLOSE>OPEN),CLOSE,OPEN,3,1),COLORGREEN;

STICKLINE((CLOSE<中轨B) AND (CLOSE<=OPEN),CLOSE,OPEN,0,1),COLORGREEN;

STICKLINE((CLOSE<中轨B) AND (CLOSE<=OPEN),HIGH,LOW,3,1),COLORGREEN;

STICKLINE((CLOSE<中轨B) AND (CLOSE>OPEN),CLOSE,HIGH,0,1),COLORGREEN;

STICKLINE((CLOSE<中轨B) AND (CLOSE>OPEN),OPEN,LOW,0,1),COLORGREEN;

AA3:="KD.K#WEEK"(9,3,3);

AA4:="KD.D#WEEK"(9,3,3);

周死叉:CROSS(AA4,AA3-L);

周金叉:CROSS(AA3,AA4-H);

DRAWTEXT(周金叉,L-0.10,'▲←周金叉'),COLORRED;

DRAWTEXT(周死叉,H+0.10,'▼←周死叉'),COLORWHITE;

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIFF,9);

LC := REF(CLOSE,1);

RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,COLORWHITE;

RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,COLORYELLOW;

RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100,COLORFF00FF;

RSI:=RSI1-RSI3, COLORSTICK,LINETHICK2;

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);

A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));

B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));

A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));

B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));

C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));

D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);

C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));

D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));

CC3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));

D3:=REF(C,CC3+1)<C AND REF("RSI.RSI1"(6,12,24),CC3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));

DRAWTEXT(B1>0,低吸+0.04,'▲←MACD底背'),COLORRED;

DRAWTEXT(B2>0,低吸+0.01,'▲←KDJ底背'),COLORFF00FF;

DRAWTEXT(B3>0,低吸+0.08,'▲←RSI底背'),COLORYELLOW;

DRAWTEXT(D2>0,高抛-0.01,'▼←KDJ顶背'),COLORFFCC66;

DRAWTEXT(D1>0,高抛-0.04,'▼←MACD顶背'),COLOR00FF00;

DRAWTEXT(D3>0,高抛-0.08,'▼←RSI顶背'),COLORWHITE;

 

特别提示:

选股预警指标编写联系微信:396950280

 
1
3
点击进入翔博软件旗下官方微店--指标超市