通達信漲停分時主圖指標公式
- 指標類別: 通達信指標公式
- 授權(quán)方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 副圖
- 日期:2022-09-22 來源:互聯(lián)網(wǎng)
通達信漲停分時主圖指標公式:
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));
{時間設(shè)置}
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);
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;
通達信漲停分時主圖指標公式實例圖解:
通達信漲停分時主圖指標公式