【通达信免费源码】k线加MAKD指标 主图 资金流向 KDJ指标
{N 1.00 100.00 76.00
M 1.00 100.00 2.00
Q 0.00 1.00 1.00 }
VVAR1:=IF(Q=1,(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,30)+MA(CLOSE,60))/4,DRAWNULL);
DRAWBAND(MA(C,3),RGB(120,120,00),VVAR1,RGB(00,00,200));
L1:=LLV(HIGH,N);
H1:=HHV(L,N);
C1:=(H1+L1)/2;
D1:=LLV(HIGH,M);
主力成本:EMA((2*C+H+L)/4,M),COLOR6633FF,LINETHICK2;
成本线:L1,COLORFF00FF,LINETHICK2;
强弱线:C1,COLOR33FF33,LINETHICK2;
逃命线:H1,COLORFFFF00,LINETHICK2;
RC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
斋主多空线:(MA(CLOSE,3)+MA(CLOSE,7)+MA(CLOSE,13)+MA(CLOSE,26))/4,COLORGREEN,LINETHICK3;
预测量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
放量阴柱:=IF(FROMOPEN<220,预测量,VOL)>2*REF(VOL,1) AND C<O;
放量阳柱:=FILTER(IF(FROMOPEN<220,预测量,VOL)>2*((REF(VOL,1)+REF(VOL,2)+REF(VOL,3)+REF(VOL,4))/4) AND C>O,5);
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 < MA(VAR3,6),LOW,HIGH,0,1),COLORLIBLUE;
STICKLINE(VAR2 > MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2<MA(VAR3,6))),(CLOSE-0.03),OPEN,3.05,0),COLORLIBLUE;
STICKLINE(((OPEN<CLOSE)AND(VAR2<MA(VAR3,6))),CLOSE,OPEN,3.05,1),COLORLIBLUE;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),3.05,0),COLORRED;
STICKLINE(((OPEN<CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,CLOSE,3.05,1),COLORRED;
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH>REF(C,1)1.1,REF(C,1)1.1,AH)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);
撑:=IF(NL<M,CDP-(CDP-M)*0.618,NL)NODRAW;
底:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;
倍量:=VOL>=REF(V,1)*1.91 AND C>O;
缩量:=REF(V,1)>=VOL*1.91 AND C<O;
STICKLINE(倍量,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(缩量,OPEN,CLOSE,2,0),COLORGREEN;
C2:=REF(C,1);
涨停:=IF((C-C2)100/C2>=(10-0.01100/C2),1,0);
跌停:=IF((C2-C)100/C2>=(10-0.01100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
涨家数:INDEXADV,COLOR0066FF,NODRAW;
跌家数:INDEXDEC,COLOR99FF99,NODRAW;
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L)+0.03;
明日支撑:=L+(C-GJ)+0.01;
阻力:REF(明日阻力 , 1),NODRAW;
支撑:REF(明日支撑 , 1),NODRAW;
KLH:=IF( PERIOD=5,0.015,0);
前天均价:=REF(AMOUNT,1)/REF(VOL*100,1),LINETHICK0;
STICKLINE(CURRBARSCOUNT=1,阻力+KLH,阻力,26,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,支撑,支撑-KLH,26,0),COLORRED;
HH0:=CONST(HHV(H,75));
LL0:=CONST(LLV(L,75));
MM0:=CONST((HH0+LL0)/2);
HL0:=CONST(IF(CONST(C)>=MM0,LL0-(HH0-LL0)0.2,HH0+(HH0-LL0)0.2));
HH1:=IF(CONST(C)<MM0,HH0*1.01,HL0);
LL1:=IF(CONST(C)>=MM0,LL0*0.99,HL0);
HL1:=(HH1+LL1)/2,COLORFFFFFF;
STICKLINE("MACD.MACD">0,"MACD.MACD"+HL1,HL1,2.5,1),COLORRED{COLORDD55CC};
STICKLINE("MACD.MACD">0 AND "MACD.MACD">REF("MACD.MACD",1),
"MACD.MACD"+HL1,HL1,2.5,0),COLORRED{COLORDD55CC};
STICKLINE("MACD.MACD"<0,"MACD.MACD"+HL1,HL1,2.5,0),COLORBLUE{COLOR00D080};
STICKLINE("MACD.MACD"<0 AND "MACD.MACD">REF("MACD.MACD",1),
"MACD.MACD"+HL1,HL1,2.5,1),COLORBLUE{COLOR00D080};
IF(斋主多空线>REF(斋主多空线,1),斋主多空线,DRAWNULL)COLORRED,LINETHICK3;
STICKLINE(放量阴柱,CLOSE,OPEN,6,0),COLOR004400;
STICKLINE(放量阴柱,CLOSE,OPEN,4,0),COLOR006600;
STICKLINE(放量阴柱,CLOSE,OPEN,2,0),COLOR008800;
STICKLINE(放量阴柱,CLOSE,OPEN,1,0),COLOR009900;
STICKLINE(放量阴柱,CLOSE,OPEN,0,0),COLOR00FF00;
STICKLINE(放量阳柱,CLOSE,OPEN,6,0),COLOR004444;
STICKLINE(放量阳柱,CLOSE,OPEN,4,0),COLOR006666;
STICKLINE(放量阳柱,CLOSE,OPEN,2,0),COLOR008888;
STICKLINE(放量阳柱,CLOSE,OPEN,1,0),COLOR009999;
STICKLINE(放量阳柱,CLOSE,OPEN,0,0),COLOR00FFFF;
IF("MACD.DIF">0,HL1*0.975,DRAWNULL),COLOR0000FF,LINETHICK1,CIRCLEDOT;
IF("MACD.DIF">0 AND "MACD.MACD"<0,HL1*0.975,DRAWNULL),COLOR00FFFF,CIRCLEDOT;
IF("MACD.DIF"<0 AND "MACD.MACD">0,HL1*0.975,DRAWNULL),COLORFF0080,CIRCLEDOT;
HH0Z:=CONST(HHV(H,120))*1;
LL0Z:=CONST(LLV(L,120))*1;
MM0Z:=CONST((HH0Z+LL0Z)/2);
HH1Z:=IF(CONST(C)<MM0Z,LL0Z-(HH0-LL0Z)0.4,LL0Z-(HH0Z-LL0Z)0.4),COLORRED;
LL1Z:=LL0Z;
HLMAX:=MAX(HH1Z,LL1Z);
HLMIN:=MIN(HH1Z,LL1Z);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=(HLMAX-HLMIN);
HLMN3:=HHV(V,250)/2;
HLMN4:=HHV(V,250);
VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1;
RSVX:=(CLOSE - LLV(LOW,18))/(HHV(HIGH,18) - LLV(LOW,18))*100;
KZ:=EMA(RSVX,3);
DZ:=EMA(KZ,3);
JZ:=(3KZ-2DZ);
{以上标出信号}
K:(KZ-50)*HLMN2/100+HLMN1,COLORFFFFFF;
D:(DZ-50)*HLMN2/100+HLMN1,COLOR00FFFF;
J:(JZ-50)*HLMN2/100+HLMN1,COLOR00FF00;
年:=1+(BARSLAST(YEAR!=REF(YEAR,1) OR DATETODAY(DATE)=1));
天数:=IF(PERIOD=5,年,DRAWNULL);
高1:=HHV(H,天数);
低1:=LLV(L,天数);
天:=CONST(高1),NODRAW,COLORBLUE;
地:=CONST(低1),NODRAW,COLOR00FF00;
RCZ:=地;
{BIAS}
BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
短跌BIAS:=IF(BIAS1<=-6,0.6+RCZ,RCZ),COLORBLACK,LINETHICK1;
中跌BIAS:IF(BIAS2<=-10,0.6+RCZ,RCZ),COLORGREEN,LINETHICK1;
长跌BIAS:IF(BIAS3<=-16,0.6+RCZ,RCZ),COLORBLUE,LINETHICK1;
短涨BIAS:=IF(BIAS1>=6,天,天+0.6),COLORBLACK,LINETHICK2;
中涨BIAS:IF(BIAS2>=10,天,天+0.6),COLORYELLOW,LINETHICK2;
长涨BIAS:IF(BIAS3>=16,天,天+0.6),COLORRED,LINETHICK2;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!