第一个:不必DLL的缠画笔目标,主张作为主图
CLG:=MA(C,5);
CLD:=MA(C,10);
CLHH:=REF(H,5)=HHV(H,11);
CLLL:=REF(L,5)=LLV(L,11);
CLFG01:=BACKSET(CLHH,6)>BACKSET(CLHH,5) ;
CLFD01:=BACKSET(CLLL,6)>BACKSET(CLLL,5) ;
CLFG02:=IF(BARSLAST(CLFG01)=BARSLAST(CLFD01) AND CLG>CLD,CLFG01,
IF(BARSLAST(CLFD01)>BARSLAST(CLFG01),CLFG01,0));
CLFD02:=IF(BARSLAST(CLFG01)=BARSLAST(CLFD01) AND CLD>CLG,CLFD01,
IF(BARSLAST(CLFG01)>BARSLAST(CLFD01),CLFD01,0));
CLFG0:=CLFG02 AND H=HHV(H,BARSLAST(CLFD02));
CLFD0:=CLFD02 AND L=LLV(L,BARSLAST(CLFG02));
CLGP:=IF(CLFG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;
CLDP:=IF(CLFD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;
CLGQ:=L>REF(H,1) AND DAY!=REF(DAY,1);
CLDQ:=H<REF(L,1) AND DAY!=REF(DAY,1);
CLGQL:=REF(L,BARSLAST(CLGQ));
CLDQH:=REF(H,BARSLAST(CLDQ));
CLFGH:=REF(H,BARSLAST(CLFG0));
CLFGL:=REF(L,BARSLAST(CLFG0));
CLFGH1:=REF(H,BARSLAST(CLFG0)+1);
CLFGL1:=REF(L,BARSLAST(CLFG0)+1);
CLFGH2:=REF(H,BARSLAST(CLFG0)+2);
CLFGL2:=REF(L,BARSLAST(CLFG0)+2);
CLFDH:=REF(H,BARSLAST(CLFD0));
CLFDL:=REF(L,BARSLAST(CLFD0));
CLFDH1:=REF(H,BARSLAST(CLFD0)+1);
CLFDL1:=REF(L,BARSLAST(CLFD0)+1);
CLFDH2:=REF(H,BARSLAST(CLFD0)+2);
CLFDL2:=REF(L,BARSLAST(CLFD0)+2);
CLFGZH:=IF(CLFGL<=CLFGL1,CLFGH2,CLFGH1);
CLFGZL:=IF(CLFGH1<CLFGL,CLFGL,IF(CLFGL<=CLFGL1,CLFGL2,CLFGL1));
CLFDZH:=IF(CLFDL1>CLFDH,CLFDH,IF(CLFDH>=CLFDH1,CLFDH2,CLFDH1));
CLFDZL:=IF(CLFDH>=CLFDH1,CLFDL2,CLFDL1);
CLFG1:=CLFGH>CLFDZH AND CLFG0;{好股票WWW.GOODGUPIAO.COM}
CLFD1:=CLFDL<CLFGZL AND CLFD0;
CLFG:=CLFG1 AND CLFGH>CLFDH AND CLFGL>CLFDL AND CLFGL1>CLFDL;
CLFD:=CLFD1 AND CLFDL<CLFGL AND CLFDH<CLFGH AND CLFDH1<CLFGH;
CLBH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));
CLBHG:=COUNT(CLBH0,BARSLAST(CLFD0));
CLBHD:=COUNT(CLBH0,BARSLAST(CLFG0));
CLBGQ:=COUNT(CLGQ,BARSLAST(CLFD0));
CLBDQ:=COUNT(CLDQ,BARSLAST(CLFG0));
CLBK0:=IF(CLBHG>0,CLBHG+2+1,IF(CLBHD,CLBHD+2+1,3));
CLBK:=IF(CLBGQ,CLBK0-CLBGQ,IF(CLBDQ,CLBK0-CLBDQ,CLBK0));
CLG1X:=(CLFG AND BARSLAST(CLFD)>CLBK);
CLD1X:=(CLFD AND BARSLAST(CLFG)>CLBK);
CLG1:=(CLFG0 AND REF(H,BARSLAST(CLFG0))>=REF(H,BARSLAST(CLG1X)) AND BARSLAST(CLD1X)>BARSLAST(CLG1X)) OR (CLFG1 AND COUNT(CLGQ,BARSLAST(CLFD1))>0 AND REF(H,BARSLAST(CLFG1))>REF(H,BARSLAST(CLG1X)));
CLD1:=(CLFD0 AND REF(L,BARSLAST(CLFD0))<=REF(L,BARSLAST(CLD1X)) AND BARSLAST(CLG1X)>BARSLAST(CLD1X)) OR (CLFD1 AND COUNT(CLDQ,BARSLAST(CLFG1))>0 AND REF(L,BARSLAST(CLFD1))<REF(H,BARSLAST(CLD1X)));
CLG1H:=IF(BARSLAST(CLD1)>BARSLAST(CLG1),REF(H,BARSLAST(CLG1)),REF(H,BARSLAST(CLD1))),;
CLD1L:=IF(BARSLAST(CLG1)>BARSLAST(CLD1),REF(L,BARSLAST(CLD1)),REF(L,BARSLAST(CLG1)));
CLG2:=CLG1 AND H=HHV(CLG1H,BARSLAST(CLD1)+1) AND H>REF(H,1) AND BARSLAST(CLD1)>BARSLAST(CLG1);
CLD2:=CLD1 AND L=LLV(CLD1L,BARSLAST(CLG1)+1) AND L<REF(L,1) AND BARSLAST(CLG1)>BARSLAST(CLD1);
CLG3:=CLG2 OR (CLFG0 AND REF(H,BARSLAST(CLFG0))>REF(H,BARSLAST(CLG2)) AND BARSLAST(CLD2)>BARSLAST(CLG2));
CLD3:=CLD2 OR (CLFD0 AND REF(L,BARSLAST(CLFD0))<REF(L,BARSLAST(CLD2)) AND BARSLAST(CLG2)>BARSLAST(CLD2));
CLGPB:=IF(CLG1X,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;
CLDPB:=IF(CLD1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;
{画线}
CLNN:=CLG3;
CLUU:=CLD3;
DRAWLINE(CLUU,L,CLNN, H,0),COLORYELLOW,DOTLINE;
DRAWLINE(CLNN,H,CLUU, L,0),COLORWHITE,DOTLINE;
第二个主张作为附图,MACD背驰
参数: 最小 最大 默许
笔参数 1 999 3
段参数 1 999 3
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;DEA:EMA(DIF,9);
IF(DIF<DEA,DIF,DRAWNULL),COLORBLACK,LINETHICK2;
MACD:(DIF-DEA)*2,COLORSTICK;
笔低A:=LOW<=LLV(LOW,笔参数),NODRAW;
笔高A:=HIGH>=HHV(HIGH,笔参数),NODRAW;
笔低:=笔低A AND 笔高A=0,NODRAW;
笔高:=笔高A AND 笔低A=0,NODRAW;
上笔:=DRAWLINE(笔低,LOW,笔高,HIGH,0)COLOR0000FF;
着笔:=DRAWLINE(笔高,HIGH,笔低,LOW,0),COLOR00FF00;
拐下:=上笔>REF(上笔,1) AND 着笔>REFX(着笔,1),NODRAW;
拐上:=着笔<REF(着笔,1) AND 上笔<REFX(上笔,1),NODRAW;
段低A:=LOW<=LLV(LOW,段参数*笔参数),NODRAW;
段高A:=HIGH>=HHV(HIGH,段参数*笔参数),NODRAW;
段低:=段低A AND 段高A=0,NODRAW;
段高:=段高A AND 段低A=0,NODRAW;
上段:=DRAWLINE(段低,LOW,段高,HIGH,0),LINETHICK2,COLORMAGENTA;
下段:=DRAWLINE(段高,HIGH,段低,LOW,0),LINETHICK2,COLORFF8000;
特别底:=下段=上段 AND 段低 AND MACD<0,NODRAW;
TTT:=REF(BARSLAST(特别底),1)+1;
底违背1:=特别底 AND LOW<REF(LOW,TTT) AND DIF>REF(DIF,TTT) AND LLV(DIF,BARSLASTCOUNT(MACD<0))>REF(DIF,TTT),NODRAW;
底背左点1:=BACKSET(底违背1,TTT+1) AND REF(BACKSET(底违背1,TTT+1),1)=0 AND 特别底;
DRAWLINE(底背左点1,DIF,底违背1,DIF,0),COLORFF00FF,LINETHICK2;
底违背2:=特别底 AND LOW<REF(LOW,TTT) AND MACD>REF(MACD,TTT) AND LLV(MACD,BARSLASTCOUNT(MACD<0))>REF(MACD,TTT),NODRAW;
底背左点2:=BACKSET(底违背2,TTT+1) AND REF(BACKSET(底违背2,TTT+1),1)=0 AND 特别底;
DRAWLINE(底背左点2,MACD,底违背2,MACD,0),COLORFF00FF,LINETHICK1;
特别顶:=下段=上段 AND 段高 AND MACD>0,NODRAW;
TTTG:=REF(BARSLAST(特别顶),1)+1;
顶违背1:=特别顶 AND HIGH>REF(HIGH,TTTG) AND DIF<REF(DIF,TTTG) AND HHV(DIF,BARSLASTCOUNT(MACD>0))<REF(DIF,TTTG),NODRAW;
顶背左点1:=BACKSET(顶违背1,TTTG+1) AND REF(BACKSET(顶违背1,TTTG+1),1)=0 AND 特别顶;
DRAWLINE(顶背左点1,DIF,顶违背1,DIF,0),COLORGREEN,LINETHICK2;
顶违背2:=特别顶 AND HIGH>REF(HIGH,TTTG) AND MACD<REF(MACD,TTTG) AND HHV(MACD,BARSLASTCOUNT(MACD>0))<REF(MACD,TTTG),NODRAW;
顶背左点2:=BACKSET(顶违背2,TTTG+1) AND REF(BACKSET(顶违背2,TTTG+1),1)=0 AND 特别顶;
DRAWLINE(顶背左点2,MACD,顶违背2,MACD,0),COLORGREEN,LINETHICK1;
DRAWTEXT(底违背2=1,MACD,'柱违背'),COLORFF00FF;
DRAWTEXT(底违背1=1,DIF,'线违背'),COLORFF00FF;
DRAWTEXT(顶违背2=1,MACD,'←柱违背'),COLORGREEN;
DRAWTEXT(顶违背1=1,DIF,'←线违背'),COLORGREEN;
DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;
DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
XA_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
XA_3:=LLVBARS(MACD,XA_2+20);
XA_4:=IF(XA_3>XA_2,REF(MACD,XA_3),0);
XA_5:=MACD<0 AND MACD>XA_4 AND LOW=LLV(LOW,XA_2+20) AND XA_4<0;
柱违背1:=(REF(XA_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,XA_3)<0 AND MACD<0),NODRAW;
DRAWLINE(XA_4=XA_3,MACD,柱违背1,MACD,0),COLORRED,LINETHICK1;
DRAWICON(柱违背1,0,26);
柱违背A:BARSLAST(柱违背1>0)+1,NODRAW;
柱违背:BARSLAST(底违背2>0)+1,NODRAW;
线违背:BARSLAST(底违背1>0)+1,NODRAW;
DRAWRECTREL(0,965,130,999,RGB(0,0,1)),NOFRAME;
以上便是共享的两个目标,我们别忘了点个赞哈

