板块RPS强度曲线(20200520)+通达信公式源码

MA5:MA(CLOSE,5);

MA10:MA(CLOSE,10);

MA50:MA(CLOSE,50);

MA250:MA(CLOSE,250);

{月线反转板块}

QSHY:=EXTDATA_USER(4,0);

QSRPS20:=QSHY/10;

QSD11:=IF(QSRPS20<=85,0,1);

QSA11:=C/MA(C,250)>1;

QSNH11:=IF(H

QSB11:=COUNT(QSNH11,30);

QSNN11:=IF(C>MA(C,250),1,0);

QSAA11:=COUNT(QSNN11,30);

QSAB11:=HIGH/HHV(HIGH,120)>0.9;

DRAWICON(BARSSINCEN((QSA11 AND QSB11 AND QSD11 AND QSAA11>2 AND QSAA11<30 AND QSAB11),30)=0,

LOW*1,34);

{划记号}

GGXG:=HHV(C,1)=HHV(C,0);

DRAWICON(BARSSINCEN(GGXG,20)=0,LOW*1,41);

{偏移值}

偏10%:(C-MA(C,10))/MA(C,10)*100,NODRAW,COLORWHITE;

偏20%:(C-MA(C,20))/MA(C,20)*100,NODRAW,COLORWHITE;

偏50%:(C-MA(C,50))/MA(C,50)*100,NODRAW,COLORWHITE;

{一年新高}

一年新高价:HHV(H,250),NODRAW,COLORWHITE;

STICKLINE(ISLASTBAR,一年新高价,一年新高价,10,1),COLORRED;

距离:(一年新高价-CLOSE)/CLOSE*100,NODRAW;

{中期调整}

X:=CONST(HHV(HIGH,120));

X2:=HHVBARS(H,120)+1;

X3:=CONST(LLV(LOW,X2));

X4:=X3/X;X5:=X4*100-100;DRAWNUMBER(L=X3,X3,X5);

中期调整:X5,NODRAW;IF(X5<=-30,X5,DRAWNULL),NODRAW,COLORRED;

{AMA20}

N:=20;

DIR:=ABS(CLOSE-REF(CLOSE,N));

VIR:=SUM(ABS(CLOSE-REF(CLOSE,1)),N);

ER:=DIR/VIR;

CS:=ER*(2/3-2/31)+2/31;

CQ:=CS*CS;

AMA1:DMA(CLOSE,CQ),COLORGREEN,LINETHICK2;

AMA2:IF(AMA1>REF(AMA1,1),AMA1,DRAWNULL),COLORRED,LINETHICK2;

{AMA乖离位}

AMA值:=DMA(CLOSE,CQ);

乖离位1:AMA值*1.08,NODRAW,COLORFFFF00;

STICKLINE(ISLASTBAR,乖离位1,乖离位1,10,1),COLORFFFF00;

{小黄人}

K120:=EXTDATA_USER(5,0);{50天的RPS}

RPSK120:=K120/10;

K01:=IF(RPSK120<=85,0,1);{RPS50大于90};

K250:=EXTDATA_USER(7,0);{120天的RPS}

RPSK250:=K250/10;

K02:=IF(RPSK250<=85,0,1);{RPS120大于90};

K50:=EXTDATA_USER(4,0);{20天的RPS}

RPSK50:=K50/10;

K03:=IF(RPSK50<=85,0,1);{RPS50大于90};

DRAWICON(BARSSINCEN((K01 AND K02 AND K03),20)=0,LOW*1,15);

{涨停跌停标示}

{涨停红色}

ZDF:=(C-REF(C,1))/REF(C,1)*100;

STICKLINE(ZDF>9.5,C,O,3.1,0),COLORYELLOW;

STICKLINE(ZDF>9.5,C,O,2.1,0),COLORYELLOW;

STICKLINE(ZDF>9.5,C,O,1.2,0),COLORYELLOW;

STICKLINE(ZDF>9.5,C,O,0.2,0),COLORYELLOW;

STICKLINE(ZDF>9.5,H,L,0,0),COLORYELLOW;

{跌停绿色}

STICKLINE(ZDF<-9.5,O,C,3.1,0),COLORGREEN;

STICKLINE(ZDF<-9.5,O,C,2.1,0),COLORGREEN;

STICKLINE(ZDF<-9.5,O,C,1.2,0),COLORGREEN;

STICKLINE(ZDF<-9.5,O,C,0.2,0),COLORGREEN;

STICKLINE(ZDF<-9.5,H,L,0,0),COLORGREEN;

{第五步}

BKM1:=MA(C,10);BKM2:=MA(C,50);BKM3:=MA(C,120);BKM4:=REF(BKM3,1);BKM5:=MA(C,20);BKM6:=REF(BKM5,1);

BKM7:=(H+L)/2;BKM8:=MA(C,200);BKM9:=REF(BKM2,1);BKL250:=LLV(LOW,250);BKH120:=HHV(HIGH,120);

BKX11:=IF(C

{标准口袋支点板块}

BKY4:=EXTDATA_USER(4,0)/10;{20天的}BKY5:=EXTDATA_USER(5,0)/10;{50天的}

BKY6:=EXTDATA_USER(7,0)/10;{120天的}

DRAWICON((C-REF(C,1))/REF(C,1)>=0.01 AND VOL>=REF(HHV(BKX11,10),1)

AND (BKX12<=1 OR BKX13<=1)  AND C>BKM5 AND C>BKM1 AND C>BKM2 AND C>BKM3  AND C>BKM7

AND BKM5>=BKM6 AND (BKY4>=85 OR BKY5>=85),L*1.01,9);

{延伸口袋支点板块}

DRAWICON((C-REF(C,1))/REF(C,1)>=0.01 AND VOL>=REF(HHV(BKX11,10),1) AND BKX12>1

AND C>BKM5 AND C>BKM1 AND C>BKM2 AND C>BKM3  AND C>BKM7 AND C>=BKL250*1.1

AND BKM5>=BKM6 AND (BKY4>=85 OR BKY5>=85),H*1.02,37);

你可能感兴趣的:(板块RPS强度曲线(20200520)+通达信公式源码)