这是我一直自用的指标,新年分享给大家!
n 1 777 80
m 1 777 3
MA5:MA(C,5);
MA13:MA(C,13);
高:=REF(HHV(H,N),M);
低:=REF(LLV(L,N),M);
H19:=高-(高-低)*0.191;
H38:=高-(高-低)*0.382;
H中:=高-(高-低)*0.5;
H61:=高-(高-低)*0.618;
H80:=高-(高-低)*0.809;
顶点:REFDATE(高,DATE),COLORWHITE;
%19.8:REFDATE(H19,DATE),COLORYELLOW;
%38.2:REFDATE(H38,DATE),COLORMAGENTA;
%50:REFDATE(H中,DATE),COLORRED;
%61.8:REFDATE(H61,DATE),COLORMAGENTA;
%80.9:REFDATE(H80,DATE),COLORYELLOW;
低点:REFDATE(低,DATE),COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORWHITE;
DRAWTEXT(ISLASTBAR,%19.8,' %19.8'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,%38.2,' %38.2'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%50,' %50'),COLORRED;
DRAWTEXT(ISLASTBAR,%61.8,' %61.8'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%80.9,' %80.9'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORWHITE;
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR1);
MDI:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
准备赚钱:=(AV + NEWVOL);
DRAWTEXT(CROSS(准备赚钱,0),L,'准备赚钱'),COLORFF00FF;
{注意}
WLT1:=EMA(C,3);
TEND:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42),POINTDOT,COLORFF00FF,LINETHICK4;
STICKLINE(C<TEND AND C<WLT1 AND C>O,C,O,3,1),COLORFFFF00;
STICKLINE(C<TEND AND C<WLT1 AND C>O,C,O,1.7,0),COLOR6800FD;
STICKLINE(C<TEND AND C<WLT1 AND C>O,L,H,0,0),COLOR0000FF;
{VAR1:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR22:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR1,MA(VAR22,6)),(LOW * 0.984),'B '),COLORRED; }
EE:=CLOSE/REF(CLOSE,1)>=1.099;
FF:=VOL/REF(VOL,1);
DRAWTEXT(EE AND FF<1,(HIGH * 1.02),'追涨停'),COLORYELLOW;
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,O,C,1.6,0),COLORRED;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,O,C,2,0),COLORBLUE;
阴线买入法:=C>O && MA(C,5)<MA(C,10) && REF(C<O,1) && REF(C<O,2)&&REF(C<O,3)&&(REF(C,1)<REF(C,4)*0.88 OR REF(C,1)<REF(O,4)*0.88);
DRAWTEXT(阴线买入法,L*0.99,'阴线买入'),COLORLIMAGENTA;
短买:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-
EMA(DCLOSE,26)),9)))*2),4)<0) AND ((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-
(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12)-
EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND
(REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),
9)))*2),1)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-
EMA(DCLOSE,26)),9)))*2),2))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-
(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)<REF((((EMA(DCLOSE,12)-
EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),3)));
DRAWTEXT(短买,L*0.99,'短买'),COLORFFFFFF;
加仓:=CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O;
DRAWTEXT(加仓,L*0.99,'加仓'),COLORFFFF00 ;
B:-1*(HHV(H,6)-C)/(HHV(HIGH,6)-LLV(L,6))+1,COLOR999999,NODRAW;
买:=IF(CROSS(B,0.01),0.9,0),COLORFF00FF;
卖:=IF(CROSS(0.99,B),0.5,1),COLORFFCC00;
DRAWTEXT(CROSS(B,0.01),L,'买'),COLORRED;
DRAWTEXT(CROSS(0.99,B),H,'卖'),COLORFFCC00;
{YM:=(H+O+L+3*C)/6;
XM:=EMA(100-(100/(1+SUM(IF(YM>REF(YM,1),YM*VOL,0),14)/SUM
(IF(YM<REF(YM,1),YM*VOL,0),14))),5);
ZM:=DRAWLINE(XM>=HHV(XM,4),XM,XM<=LLV(XM,4),XM,1);
TJ1:=XM=ZM;
TJ2:=XM<REF(XM,1);
DRAWTEXT(TJ1 AND TJ2,LOW*0.95,'买进'),COLORYELLOW; }
JH9:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
DRAWTEXT(CROSS(84,JH9),H*1.02,'★S'),COLORGREEN;
{立桩量}
AAA:=(3*C+H+L+O)/6;
VAR11:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
TJ11:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR11;
立桩量:=FILTER(TJ11,5);
TJ22:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
突破:=TJ22=1;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;
STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;
TJ33:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)));
三天法则:=TJ33=1;
成立:=三天法则 AND 突破;
条件成立:=FILTER(成立,3);
DRAWTEXT(条件成立,L*0.99,'▲成立'),COLORLIMAGENTA;
逆势英雄:=CROSS(MA(C,20),MA(C,5)) AND C>MA(C,60) AND MA(C,60)>REF(MA(C,60),1);
STICKLINE(逆势英雄,O,C,0.5,0),COLORYELLOW;
VAR2:=EMA(C,5);
VAR3:=EMA(C,10);
VAR4:=EMA(C,20);
VAR5:=2*(VAR2-VAR4);
VAR6:=2*(VAR2-VAR3);
VAR7:=2*(VAR6+VAR5);
STICKLINE(CROSS(VAR7,0),O,C,0.1,0),COLORWHITE;
|