N:=20;M:=50;
DP:=(H+L+2*C)/4;
MID:= MA(DP,N);
20中轨:MID,COLORWHITE,POINTDOT,LINETHICK2;
{以下为通达信、同花顺均可用的变色k线
STICKLINE(MID>REF(MID,1),MID*1.01,REF(MID,1),4,1),COLORRED;
STICKLINE(MID<=REF(MID,1),MID,REF(MID,1),4,0),COLOR00FF00;}
DRAWBAND(MID,RGB(225,0,0),REF(MID,2),RGB(00,255,00));
20上轨:MID +1.96*STD(DP,N),COLORYELLOW;
20下轨:MID-1.96*STD(DP,N),COLORFF0000;
M2:=MA(DP,M);
50中轨:IF(M2>=REF(M2,1),M2,DRAWNULL),COLORFF00FF,CIRCLEDOT;
IF(M2<REF(M2,1),M2,DRAWNULL),COLORFFB560,POINTDOT,LINETHICK4;
50上轨:M2+2.1*STD(DP,M),LINETHICK2,COLORRED;
50下轨:M2-2.1* STD(DP,M),LINETHICK2,COLOR00FF00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,3,0),COLORRED;
STICKLINE(ZDF<-9.8,O,C,3,0),COLORBLUE;
DIF:=EMA(DP,12);
DEA:=EMA(DP,26);
macd:=(DIF-DEA);
XH:=EMA(MacD,9);
AC:=2*(MACD-XH);
ao1:=REF(MACD,1);
AC1:=REF(AC,1);
KK:=IF(AC>AC1 AND MACD>AO1,5,IF(AC<AC1 AND MACD<AO1,-5,0));
STICKLINE(KK=5,H,L,0.1,0),COLORRED;
STICKLINE(KK=5 AND C>O,C,O,4,1),COLORRED;
STICKLINE(KK=5 AND C<O,C,O,4,0),COLORRED;
STICKLINE(KK=0,H,L,0.1,0),COLORFFFF00;
STICKLINE(KK=0 AND C<O,C,O,4,0),COLORFFFF00;
STICKLINE(KK=0 AND C>O,C,O,4,1),COLORFFFF00;
STICKLINE(KK=-5,H,L,0.1,0),,COLORFF0000;
STICKLINE(KK=-5 AND C>O,C,O,4,1),COLORFF0000;
STICKLINE(KK=-5 AND C<O,C,O,4,0),COLORFF0000;
DRAWTEXT_FIX(1,0.5,0,0,’红色K线为多头区域’),COLORRED;
DRAWTEXT_FIX(1,0.5,0.04,0,’青色K线为混沌区域’),COLORFFFF00;
DRAWTEXT_FIX(1,0.5,0.08,0,’蓝色K线为空头区域’),COLORFF0000;
DRAWTEXT_FIX(1,0.5,0.12,0,’红色建仓,青色减仓!’),COLORFF00FF;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。