RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),LINETHICK1,COLORWHITE;
D:SMA(K,3,1),LINETHICK1,COLOR00DDDD;
J:3*K-2*D,LINETHICK1,COLORRED;
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK0,COLOR0099FF;
DEA :EMA(DIFF,9),LINETHICK0,COLORD89837;
MACD:2*(DIFF-DEA),COLORFF9999,LINETHICK0;
YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
今压:REF(阻价,1),LINETHICK0,COLORAA11BB;
今撑:REF(支价,1),LINETHICK0,COLOR009900;
明压:阻价,LINETHICK0;
明撑:支价,LINETHICK0;
RSV1:=(HHV(H,9.8)-C)/(HHV(H,9.8)-LLV(L,9.8))*101;
KK:=SMA(RSV1,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
买卖:=IF(JJ>=100,100,IF(JJ<=0,0,JJ));
明天买:IF(买卖=100,0-10,0),COLOR00CCCC;
明天卖:IF(买卖=0,90,100),COLOR00FF00;
KX:=250;
KH:=HHV(K,KX);
DH:=HHV(D,KX);
JH:=HHV(J,KX);
KL:=LLV(K,KX);
DL:=LLV(D,KX);
JL:=LLV(J,KX);
HKMAX:=MAX(KH,MAX(DH,JH));
LKMIN:=MIN(KL,MIN(DL,JL));
KHLB:=(HKMAX+LKMIN)/2;
KHLC:=HKMAX-LKMIN;
MHF:=HHV(DIFF,KX);
MHD:=HHV(DEA,KX);
MHM:=HHV(MACD,KX);
MLF:=LLV(DIFF,KX);
MLD:=LLV(DEA,KX);
MLM:=LLV(MACD,KX);
HMAX:=MAX(MHF,MAX(MHD,MHM));
LMIN:=MIN(MLF,MIN(MLD,MLM));
FHLB:=(HMAX-LMIN)/100;
FHLC:=HMAX-LMIN;
SH:=(0-FHLB)*(KHLC/FHLC)+KHLB;
DIFFA:(DIFF-FHLB)*(KHLC/FHLC)+KHLB,LINETHICK2;
DEAA:(DEA-FHLB)*(KHLC/FHLC)+KHLB,LINETHICK2;
MACDA:=(MACD-FHLB)*(KHLC/FHLC)+KHLB;
CDA:=MACD<REF(MACD,1) AND MACD>0;
CDB:=MACD>=REF(MACD,1) AND MACD>0;
CDC:=MACD>REF(MACD,1) AND MACD<0;
CDD:=MACD<=REF(MACD,1) AND MACD<0;
STICKLINE(CDA,SH,MACDA,6,0),COLOR00AAFF;{黄s段}
STICKLINE(CDA,SH,MACDA,6.6,0),COLOR0066AA;
STICKLINE(CDA,SH,MACDA,4.4,0),COLOR0099DD;
STICKLINE(CDA,SH,MACDA,3.3,0),COLOR00BBEE;
STICKLINE(CDA,SH,MACDA,2.2,0),COLOR00DDFF;
STICKLINE(CDA,SH,MACDA,1.1,0),COLOR00FFFF;
STICKLINE(CDB,SH,MACDA,6,0),COLOR0000AA; {红色段}
STICKLINE(CDB,SH,MACDA,6.6,0),COLOR0011BB;
STICKLINE(CDB,SH,MACDA,4.4,0),COLOR0022CC;
STICKLINE(CDB,SH,MACDA,3.3,0),COLOR0033DD;
STICKLINE(CDB,SH,MACDA,2.2,0),COLOR0044EE;
STICKLINE(CDB,SH,MACDA,1.1,0),COLOR0055FF;
STICKLINE(CDC,SH,MACDA,6,0),COLORAA00BB;{向上粉红}
STICKLINE(CDC,SH,MACDA,6.6,0),COLORBB1177;
STICKLINE(CDC,SH,MACDA,4.4,0),COLORCC2299;
STICKLINE(CDC,SH,MACDA,3.3,0),COLORDD33AA;
STICKLINE(CDC,SH,MACDA,2.2,0),COLOREE44BB;
STICKLINE(CDC,SH,MACDA,1.1,0),COLORFF55BB;
STICKLINE(CDD,SH,MACDA,6,0),COLORFF7700;
STICKLINE(CDD,SH,MACDA,6.6,0),COLORAA7711;
STICKLINE(CDD,SH,MACDA,4.4,0),COLORCC9922;
STICKLINE(CDD,SH,MACDA,3.3,0),COLOREEBB33;
STICKLINE(CDD,SH,MACDA,2.2,0),COLORFFCC44;
STICKLINE(CDD,SH,MACDA,1.1,0),COLORFFDD55;
DRAWBAND(DEAA,RGB(0,130,50),DIFFA,RGB(250,150,0));
DRAWBAND(K,RGB(65,105,225),D,RGB(47,79,79));
TYP:=(HIGH+LOW+CLOSE)/3;
STICKLINE(DIFF>REF(DIFF,1),20,20,2,0),COLORRED;
STICKLINE(DIFF<REF(DIFF,1),20,20,2,0),COLORGREEN;
STICKLINE(K>=REF(K,1) OR K>D AND DIFF>REF(DIFF,1),80,80,2,1),COLORRED;
STICKLINE(K<REF(K,1),80,80,2,1),COLORGREEN;
|