通达信涨停分时主图指标公式
2020/3/7 19:06:24
LONG:=24;SHORT:=13;M:=6;N:=6;
RCC:=DYNAINFO( 3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
KK:=1;
TT:=FROMOPEN;
RC:=DYNAINFO( 3);
SS2:=SMA(C,2,1);
SS6:=SMA(C,6,1);
DK:=2*(S2-S6);
DK1:=CONST(HHV(RC+DK,TT+1));
DK2:=CONST(LLV(RC+DK,TT+1));
DC1:=CONST(HHV(C,TT+1));
DC2:=CONST(LLV(C,TT+1));
MMA:=CONST(MAX(DC1,DK1));
MMB:=CONST(MIN(DC2,DK2));
{时间设置}
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 );
T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)));
TTT:=INTPART(2*T/5);
P:=IF(TT<120,4,10);
P2:=IF(TT<120,20,30);
STICKLINE(C>0,H,L,6,1),COLOR000000;
STICKLINE(CURRBARSCOUNT<TT+1,MMB,MMA,4,1),COLORFF0000;
{CYC}
VAR1:=AMOUNT/VOL/100;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,5)/VAR1/100;
VAR4:=SUM(AMOUNT,13)/VAR1/100;
VAR5:=SUM(AMOUNT,34)/VAR1/100;
CYC5:=DMA(VAR2,VOL/VAR3);
CYC13:=DMA(VAR2,VOL/VAR4);
CYC34:=DMA(VAR2,VOL/VAR5);
{投股票网-股票公式网站 www.tou18.cn}
DRAWBAND(CYC5,RGB(50,120,120),CYC13,DRAWNULL);
DRAWBAND(CYC13,RGB(0,150,150),CYC34,DRAWNULL);
{分时MACD}
昨收:=DYNAINFO( 3);
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
DIF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=(EMA(DIF,M));
MACD:=5*(DIF-DEA);
A4:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A4+1)>C AND REF(DIF,A4+1)<DIF AND CROSS(DIF,DEA);
{DRAWTEXT(FILTER(B1>0,5),RCC*KK-0.03*RCC*KK,'背离'),COLORYELLOW;}
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORFF00FF,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR4ABEFF,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED;
STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN;
分时线:C,COLORFFFFFF,LINETHICK2;
AA1:=REF(分时线,P)=HHV(分时线,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);{高点}
AA2:=REF(分时线,P)=LLV(分时线,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);{低点}
QA1:=REF(分时线,P2)=HHV(分时线,P2+1);
QB1:=FILTER(QA1,P2);
QC1:=BACKSET(QB1,P2+1);
QD1:=FILTER(QC1,P2);{高点2}
QA2:=REF(分时线,P2)=LLV(分时线,2*P2+1);
QB2:=FILTER(QA2,P2);
QC2:=BACKSET(QB2,P+1);
QD2:=FILTER(QC2,P2);{低点};
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11>REF(R11,1);
QR11:=BACKSET(ISLASTBAR,BARSLAST(QD1)+1);
QS11:=QR11>REF(QR11,1);
压力线:=DRAWLINE(DD1,分时线,S11,分时线,1),COLORYELLOW;
压力线2:=DRAWLINE(QD1,分时线,QS11,分时线,1),COLORGREEN;
压力线3:=DRAWLINE(QS11,分时线,DD1,分时线,1),COLORWHITE;
IF(BETWEEN(压力线,MMA,MMB),压力线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(压力线2,MMA,MMB),压力线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(压力线3,MMA,MMB),压力线3,DRAWNULL),COLORWHITE,LINETHICK1;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
QT11:=BACKSET(ISLASTBAR,BARSLAST(QD2)+1);
QU11:=QT11>REF(QT11,1);
支撑线:=DRAWLINE(DD2,分时线,U11,分时线,1),COLORYELLOW;
支撑线2:=DRAWLINE(QD2,分时线,QU11,分时线,1),COLORGREEN;
支撑线3:=DRAWLINE(QU11,分时线,DD2,分时线,1),COLORWHITE;
IF(BETWEEN(支撑线,MMA,MMB),支撑线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(支撑线2,MMA,MMB),支撑线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(支撑线3,MMA,MMB),支撑线3,DRAWNULL),COLORWHITE,LINETHICK1;
DRAWICON(DD1,分时线,2);
DRAWICON(DD2,分时线,1);
HHH:=CONST(HHV(H,160));
LLL:=CONST(LLV(L,160));
MM0:=CONST((HHH+LLL)/2);
HL:=CONST(IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.20,HHH-(HHH-LLL)*0.20));
HH1:=IF(MM0>CONST(REF(C,160)),HHH-(HHH-LLL)*0.1,HL);
LL1:=IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.1,HL);
HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=1;
HLMN4:=2;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10),'换手:')COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10),CONST(DYNAINFO(37))*100)COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*2),'涨幅:');
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),CONST(DYNAINFO(14))*100)COLORFF00FF;
变色用:DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),IF(CONST(DYNAINFO(14)*100)<=0,CONST(DYNAINFO(14)*100),DRAWNULL))COLOR00DD00;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*3),'量比:')COLORFF00FF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*3),CONST(DYNAINFO(17)))COLORFF00FF;
投股票 网 w ww.tou18.cn
股市公式下载推荐