以下是通达信宝塔线(指标主图贴图)(无源码的请下载附件导入)
宝塔线指标前面发的附图指标也说了,出现三平顶翻红、三平顶翻绿,结合5日线指标操作。
MA5:MA(C,5),LINETHICK1,COLORGREEN;
EMA14:EMA(C,14),LINETHICK1,COLORGREEN;
EMA21:EMA(C,21),LINETHICK1,COLORGREEN;
EMA55:EMA(C,55),LINETHICK1,COLORGREEN;
EMA89:EMA(C,89),LINETHICK1,COLORGREEN;
IF(MA5>REF(MA5,1),MA5,DRAWNULL),LINETHICK1,COLORRED;
IF(EMA14>REF(EMA14,1),EMA14,DRAWNULL),LINETHICK1,COLORRED;
IF(EMA21>REF(EMA21,1),EMA21,DRAWNULL),LINETHICK1,COLORRED;
IF(EMA55>REF(EMA55,1),EMA55,DRAWNULL),LINETHICK1,COLORRED;
IF(EMA89>REF(EMA89,1),EMA89,DRAWNULL),LINETHICK2,COLORRED;
B1:=REF(C,1);B2:=REF(C,2);
SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));
SM:=IF(REF(SS,1)!=0,REF(SS,1),IF(REF(SS,2)!=0,REF(SS,2),IF(REF(SS,3)!=0,REF(SS,3),IF(REF(SS,5)!=0,REF(SS,5),IF(REF(SS,6)!=0,REF(SS,6),IF(REF(SS,7)!=0,REF(SS,7),0))))));
STICKLINE(SS=1 OR SM>=1 AND SS=0,B1,C,3,0),COLORRED;
STICKLINE(SS=-1 OR SM<=-1 AND SS=0,B1,C,3,0),COLORFFCC66;
STICKLINE(SS=2,B2,C,3,0),COLORRED;
STICKLINE(SS=-2,B2,C,3,0),COLORFFCC66;
STICKLINE((SS=-1 OR SS=-2) AND SM>0,B2,B1,3,0),COLORRED;
STICKLINE((SS=1 OR SS=2) AND SM<0,B2,B1,3,0),COLORFFCC66;
AA:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) AND IF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5),REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) AND REF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1,REF(CLOSE,6)<REF(CLOSE,7))));
BB:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) AND IF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5),REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) AND REF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7))));
DRAWICON(AA AND CLOSE>REF(OPEN,2),0.99*LOW,1);
DRAWICON(BB AND CLOSE<REF(CLOSE,2),HIGH*1.01,2);
DRAWTEXT(AA AND CLOSE>REF(OPEN,2),LOW*0.98,'三平底翻红'),COLORYELLOW;
DRAWTEXT(BB AND CLOSE<REF(CLOSE,2),HIGH*1.02,'三平顶翻绿'),COLOR00FF00;
618377625.png
|