一致性获利法,来自网上,不知结果司法准确。
Y:=(H+L)/2;
AA:=REF((SMA(Y,5,1)),3);
BB:=REF((SMA(Y,8,1)),5);
CC:=REF((SMA(Y,13,1)),8);
鳄:CC,COLORFF6600;
齿:BB,colorred;
唇:AA,colorgreen;
R2:=REF(齿,5);
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
上分形:IF(HIGH>=R2,UL,REF(UL,BARSLAST(HIGH>R2))),POINTDOT,LINETHICK3,,colormagenta;
下分形:IF(LOW<=R2,DL,REF(DL,BARSLAST(LOW<=R2))),POINTDOT,LINETHICK3,coloryellow;
DRAWICON(CLOSE>上分形 AND REF(CLOSE,1)<REF(上分形,1),HIGH*1.03,1);
DRAWICON(CLOSE<下分形 AND REF(CLOSE,1)>REF(下分形,1),LOW*0.99,2);
AO:=MA(Y,5)-MA(Y,34);
MAO:=MA(AO,5);
AC:=AO-MAO;
AC1:=REF(AC,1);
AO1:=REF(AO,1);
KAC:=IF(AC>AC1 AND AO>AO1,1,0);
KAO:=IF(AC<AC1 AND AO<AO1,-1,0);
STICKLINE(KAC=1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),colorred;
STICKLINE(KAO=-1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),colorgreen;
STICKLINE(KAO=0 AND KAC=0 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORDDDDDD;
STICKLINE(CLOSE>=OPEN,HIGH,CLOSE,0.1,0),colorred;
STICKLINE(CLOSE>=OPEN,OPEN,LOW,0.1,0),colorred;
STICKLINE(KAC=1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),colorred;
STICKLINE(KAO=-1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),colorgreen;
STICKLINE(KAO=0 AND KAC=0 AND CLOSE<OPEN,OPEN,CLOSE,3,0),COLORDDDDDD;
VAR1:=(HIGH+LOW)/2;
AO:MA(VAR1,5)-MA(VAR1,34),LINETHICK0;
STICKLINE(AO>=REF(AO,1),0,AO,2.2,1),colorred;
STICKLINE(AO<REF(AO,1),0,AO,2.2,1),colorgreen;
AO5:MA(AO,5),COLORFF6600;
S1:=CROSS(0,AO);
DRAWTEXT(S1,AO,'S'),colorwhite;
DRAWICON(S1,AO,2);
S2:=AO<0 AND REF(AO,1)>REF(AO,2) AND AO<REF(AO,1);
DRAWTEXT(S2,AO,'S'),colorwhite;
DRAWICON(S2,AO,2);
SCOUNT:=BARSLAST(AO<0);
SD:=HHV(AO,SCOUNT);
SCOUNTD:=HHVBARS(AO,SCOUNT);
S3:=AO>0 AND REF(AO,1)>REF(AO,2) AND AO<REF(AO,1);
S31:=COUNT(S3,SCOUNTD);
DRAWTEXT(S31>=2 AND S3,AO,'S'),colorwhite;
DRAWICON(S31>=2 AND S3,AO,2);
B1:=CROSS(AO,0);
DRAWTEXT(B1,AO,'B'),colorwhite;
DRAWICON(B1,AO,1);
B2:=AO>0 AND REF(AO,1)<REF(AO,2) AND AO>REF(AO,1) ;
DRAWTEXT(B2,AO,'B'),colorwhite;
DRAWICON(B2,AO,1);
BCOUNT:=BARSLAST(AO>0);
BD:=LLV(AO,BCOUNT);
BCOUNTD:=LLVBARS(AO,BCOUNT);
B3:=AO<0 AND REF(AO,1)<REF(AO,2) AND AO>REF(AO,1);
B31:=COUNT(B3,BCOUNTD);
DRAWTEXT(B31>=2 AND B3,AO,'B'),colorwhite;
DRAWICON(B31>=2 AND B3,AO,1);
AO:=MA((HIGH+LOW)/2,5)-MA((HIGH+LOW)/2,34);
AO5:=MA(AO,5);
AC:AO-AO5,LINETHICK0;
STICKLINE(AC>=REF(AC,1),0,AC,2.2,1),colorred;
STICKLINE(AC< REF(AC,1),0,AC,2.2,1),colorgreen;
AC1:=REF(AC,1);
BUY1:=REF(AC,3)<REF(AC1,3) AND REF(AC,2)<REF(AC1,2) AND REF(AC,2)<REF(AC,3) AND REF(AC,1)>REF(AC1,1) AND AC>AC1 AND COUNT(AC>0,4)=4;
DRAWTEXT(BUY1,AC,'B'),colorwhite;
DRAWICON(BUY1,AC,1);
BUY2:=COUNT(AC<0,4)=4 AND REF(AC,3)<REF(AC1,3) AND COUNT(AC>AC1,3)=3;
DRAWTEXT(BUY2,AC, 'B'),colorwhite;
DRAWICON(BUY2,AC,1);
BUY3:=REF(AC,3)<REF(AC1,3) AND REF(AC,2)<REF(AC1,2) AND REF(AC,2)<REF(AC,3) AND COUNT(AC>AC1,2)=2 AND REF(AC,1)<0 AND AC>0;
DRAWTEXT(BUY3,AC, 'B'),colorwhite;
DRAWICON(BUY3,AC,1);
BUY4:=REF(AC,4)<REF(AC1,4) AND REF(AC,3)<REF(AC1,3) AND REF(AC,3)<REF(AC,4) AND COUNT(AC>AC1,3)=3 AND REF(AC,1)<0 AND AC>0;
DRAWTEXT(BUY4,AC, 'B'),colorwhite;
DRAWICON(BUY4,AC,1);
S1:=REF(AC,3)>REF(AC1,3) AND REF(AC,2)>REF(AC1,2) AND REF(AC,2)>REF(AC,3) AND REF(AC,1)<REF(AC1,1) AND AC<AC1 AND COUNT(AC<0,4)=4;
DRAWTEXT(S1,AC,'S'),colorwhite;
DRAWICON(S1,AC,2);
S2:=COUNT(AC>0,4)=4 AND REF(AC,3)>REF(AC1,3) AND COUNT(AC<AC1,3)=3;
DRAWTEXT(S2,AC,'S'),colorwhite;
DRAWICON(S2,AC,2);
S3:=REF(AC,3)>REF(AC1,3) AND REF(AC,2)>REF(AC1,2) AND REF(AC,2)>REF(AC,3) AND COUNT(AC<AC1,2)=2 AND REF(AC,1)>0 AND AC<0;
DRAWICON(S3,AC,2);
MFI:(H-L)*1000000/V,STICK;
A1:=MFI>=REF(MFI,1)*1.1 AND V>=REF(V,1)*1.1;
A2:=MFI<=REF(MFI,1)*0.9 AND V<=REF(V,1)*0.9;
A3:=MFI>=REF(MFI,1)*1.1 AND V<=REF(V,1)*0.9;
A4:=MFI<=REF(MFI,1)*0.9 AND V>=REF(V,1)*1.1;
STICKLINE(A1,0,MFI,0.1,1),colorgreen;
STICKLINE(A2,0,MFI,0.1,1),colorblue;
STICKLINE(A3,0,MFI,0.1,1),colorbrown;
STICKLINE(A4,0,MFI,0.1,1),colormagenta;
MA5:MA(MFI,5);
绿灯:IF(A1,MFI,DRAWNULL),STICK,colorgreen;
衰退:IF(A2,MFI,DRAWNULL),STICK,colorblue;
伪装:IF(A3,MFI,DRAWNULL),STICK,colorbrown;
蛰伏:IF(A4,MFI,DRAWNULL),STICK,colormagenta;
|