通达信量价时空附图指标 贴图 源码
大家都知道股票涨跌是量价时空共同作用的结果,先分享一个量价时空指标,自己把握。
K线个数:=60;J1:=-49;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D,COLORFF00FF,NODRAW;
K1:=1/3*RSV+REF(K,1)/3*2;
D1:=1/3*K+REF(D,1)/3*2;
JJ:=3*K1-2*D1;
J11:=J;
J昨:=REF(JJ,1);
JX:=IF(J1=-50,J11,IF(J1=-49,J昨,J1));
J拐头价验证:=((9/7*JX-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9);
J底部上穿此价买:=IF(J拐头价验证<REF(J拐头价验证,1),J拐头价验证,DRAWNULL),COLOR80FFFF,NODRAW;
J从顶下穿此价卖:=IF(J拐头价验证>REF(J拐头价验证,1),J拐头价验证,DRAWNULL),COLORFFFF00,NODRAW;
J100%价:=CONST(((9/7*100-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));
J80%价:=CONST(((9/7*80-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));
J50%价:=CONST(((9/7*50-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));
J20%价:=CONST(((9/7*20-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));
J0%价:=CONST(((9/7*0-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));
STICKLINE(1,J0%价,J0%价,80,-1),COLOR606060;
今日拐头价:CONST(J拐头价验证),COLOR80FFFF;
J%:J,COLORFF00FF,NODRAW;
对应股价:((9/7*J-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9),COLORFF0080,NODRAW;
RSVD:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*(J100%价-J0%价)+J0%价;
KK:=SMA(RSVD,3,1),COLORCC9999;
DD:=SMA(KK,3,1),COLOR0080FF;
股价反推J值:=3*KK-2*DD,COLORFF0080;
TMP:=LARGEINTRDVOL-LARGEOUTTRDVOL;
DDY动因:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);
L2有效显示数据:=IF(DDY动因>0 OR DDY动因<0 OR TMP>0 OR TMP<0,DDY动因,DRAWNULL),NODRAW;
涨跌动因%:IF(L2有效显示数据=DRAWNULL,DRAWNULL,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM),COLOR0080FF,NODRAW;
买卖力度%:IF(L2有效显示数据=DRAWNULL,DRAWNULL,(LARGEINTRDVOL-LARGEOUTTRDVOL)*100/VOL),COLOR0000FF,NODRAW;
动因柱:=IF(L2有效显示数据=DRAWNULL,DRAWNULL,(TRADEOUTNUM-TRADEINNUM)*(J100%价-J0%价)/TRADENUM),COLOR00CCFF,NODRAW;
力度柱:=IF(L2有效显示数据=DRAWNULL,DRAWNULL,(LARGEINTRDVOL-LARGEOUTTRDVOL)*(J100%价-J0%价)/VOL),COLOR0000FF,NODRAW;
RSVM:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*(J100%价-J0%价)+J0%价;
%K:=MA(RSVM,3);
%D:=MA(%K,3),COLORAA00DD;
GG:=DRAWBAND(%K,RGB(102,32,51),%D,RGB(0,64,16));
{VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(VAR3*10,3);
VAR5:=LLV(LOW,13);
VAR6:=HHV(VAR4,13);
VAR7:=IF( BARSSINCE(C)>34,1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);}
{吸筹:VAR9,LINETHICK0,COLOREE00EE;}
{STICKLINE(VAR9>-120,J0%价,VAR9,3,1);
STICKLINE(VAR9>1 AND 'KDJ.J'>REF('KDJ.J',1) AND REF('KDJ.J',1)<REF('KDJ.J',2),J0%价,VAR9,3,0),COLORRED;
STICKLINE(VAR9>0.1 AND VAR9<1 AND 'KDJ.J'>REF('KDJ.J',1) AND REF('KDJ.J',1)<REF('KDJ.J',2),J0%价,VAR9,3,0),COLOR00FFFF;}
STICKLINE(1,J100%价,J100%价,80,-1),COLOR606060;
STICKLINE(1,J80%价,J80%价,80,-1),COLOR606060;
STICKLINE(1,J50%价,J50%价,80,-1),COLOR606060;
STICKLINE(1,J20%价,J20%价,80,-1),COLOR606060;
{涨跌动因柱}
STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,2.3,0),COLOR005A66;
STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,1.7,0),COLOR006A88;
STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,1.0,0),COLOR007AAA;
STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,0.33,0),COLOR008ACC;
STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,2.3,0),COLOR003300;
STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,1.7,0),COLOR004400;
STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,1.0,0),COLOR005500;
STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,0.33,0),COLOR006000;
DRAWTEXT(CURRBARSCOUNT=K线个数,J100%价,'↖100%'),COLORA0A0A0;
DRAWTEXT(CURRBARSCOUNT=K线个数,J80%价,' ↖80%'),COLORA0A0A0;
DRAWTEXT(CURRBARSCOUNT=K线个数,J50%价,' ↖50%'),COLORA0A0A0;
DRAWTEXT(CURRBARSCOUNT=K线个数,J20%价,' ↖20%'),COLORA0A0A0;
DRAWTEXT(CURRBARSCOUNT=K线个数,J0%价,' ↖0%'),COLORA0A0A0;
{--价量乃为指标之母,亦即先有股价、成交量,始有指标的产生,成反向推算KDJ价--}
DRAWBAND(股价反推J值,RGB(204,0,255),股价反推J值,RGB(255,255,255));
DRAWBAND(KK,RGB(153,153,204),KK,RGB(255,255,255));
DRAWBAND(DD,RGB(128,128,0),DD,RGB(255,255,255));
{通达信主力雷达公式}
B1:=REF(C,1);B2:=REF(C,2);
SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));
SM:=IF(REF(SS,1)!=0,REF(SS,1),IF(REF(SS,2)!=0,REF(SS,2),IF(REF(SS,3)!=0,REF(SS,3),IF(REF(SS,5)!=0,REF(SS,5),IF(REF(SS,6)!=0,REF(SS,6),IF(REF(SS,7)!=0,REF(SS,7),0))))));
金底:=(SS=1 OR SS=2) AND SM<0;
绿顶:=(SS=-1 OR SS=-2) AND SM>0;
- 上一篇公式:通达信绝低买入副图 选股源码贴图
- 下一篇公式:通达信超级选股器源码 贴图