通达信空调主图公式 趋势一目了然
{五线同上}
DRAWBAND(MA(CLOSE,60),RGB(200,80,80),MA(CLOSE,120),RGB(0,0,115));
MA5:=MA(CLOSE,5),COLORFFFFFF;
MA10:=MA(CLOSE,10),COLOR00FFFF;
MA20:=MA(C,20),COLORFF00FF;
MA60:=MA(CLOSE,60),COLORFF9988;
MA120:=MA(CLOSE,120),COLOR0000FF;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
BDGD:=C=HHV(C,13);
GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1;
高点:REF(C,GDSJ),COLORFF00FF,POINTDOT;
突破:CROSS(C,REF(高点,1)),COLOR00FFFF,POINTDOT,NODRAW;
STICKLINE(GDSJ<=6,高点,高点,3,0),COLORFF00FF;
DRAWTEXT(突破,LOW,'↑'),COLOR00FFFF;
BDDD:=C=LLV(C,13);
DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;
低点:REF(C,DDSJ),COLOR00FF00,POINTDOT;
STICKLINE(DDSJ<=6,低点,低点,3,0),COLOR00FF00;
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);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
回调买:=(AV + NEWVOL);
DRAWTEXT(CROSS(回调买,0),L*0.95,'←回调买'),COLORYELLOW;
DRAWICON(CROSS(回调买,-5),L*0.98,1);
{色带}
{DRAWBAND(MA(CLOSE,60),RGB(55,0,0),MA(CLOSE,120),RGB(0,91,0));}
{DRAWBAND(MA(CLOSE,5),RGB(155,50,50),MA(CLOSE,10),RGB(83,123,68));}
DRAWKLINE(H,O,L,C);
MA240:=MA(CLOSE,240),COLORBLUE;
DRAWICON(CROSS(MA10,MA20),MA20,1); {10日上穿20日做记号}
DRAWICON(CROSS(MA20,MA60),MA60,1); {20日上穿60日做记号}
DRAWICON(CROSS(MA20,MA120),MA120,1); {20日上穿60日做记号}
DRAWICON(CROSS(MA20,MA240),MA240,1);{20日上穿120日做记号}
DRAWICON(CROSS(MA60,MA120),MA60,23); {60日上穿120日做记号}
DRAWICON(CROSS(MA60,MA240),MA240,23); {60日上穿240日做记号}
DRAWICON(CROSS(MA120,MA240),MA240,23);{120日上穿240日做记号}
DRAWICON(CROSS(MA10,MA5),MA10,2); {5日下穿10日做记号}
DRAWICON(CROSS(MA20,MA10),MA20,2); {10日下穿20日做记号}
DRAWICON(CROSS(MA60,MA20),MA60,2); {20日下穿60日做记号}
DRAWICON(CROSS(MA120,MA60),MA60,2); {60日下穿120日做记号}
半年托:=MA60>MA120 AND MA60>MA120 AND CROSS(MA60,MA120);
熊来:=MA60<MA120 AND MA60<MA120 AND CROSS(MA120,MA60);
年托:=MA120>MA240 AND MA120>MA240 AND CROSS(MA120,MA240);
DRAWTEXT(半年托,MA120-0.08,'牛市来'),COLORYELLOW;
DRAWTEXT(熊来,MA60+0.08,'熊上岗'),COLORGREEN;
{兄弟逃顶}
VAR2A:=IF(MONTH<12,1,1);
VAR3A:=(2*CLOSE+HIGH+LOW)/4;
VAR4A:=LLV(LOW,34);
VAR5A:=HHV(HIGH,34);
ZL:=EMA((VAR3A-VAR4A)/(VAR5A-VAR4A)*100,13)*VAR2A;
SH:=EMA(0.667*REF(ZL,1)+0.333*ZL,2);
DRAWTEXT(CROSS(ZL,75) AND SH<ZL,H*0.99,'小心被套'),COLORGREEN;
{高山流水};
N:=8;
高山:HHV(MA(H,N),N),COLORRED,LINETHICK2;
流水:MA(H,N),COLORFF0000,LINETHICK2;
LLV(高山,2),COLORFFFFFF;
LLV(高山,3),COLORFFFFFF;
LLV(高山,4),COLORFFFFFF;
LLV(高山,5),COLORFFFFFF;
LLV(高山,6),COLORFFFFFF;
LLV(高山,7),COLORFFFFFF;
低谷:LLV(高山,8),COLOR00FFFF,LINETHICK2;
HHV(流水,2),COLOR00FF00;
HHV(流水,3),COLOR00FF00;
HHV(流水,4),COLOR00FF00;
HHV(流水,5),COLOR00FF00;
HHV(流水,6),COLOR00FF00;
HHV(流水,7),COLOR00FF00;
HHV(流水,8),COLOR00FF00;
高山,COLORRED,LINETHICK2;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
出水:=IF(C>HHV(MA(H,N),8) AND HHV(MA(H,N),8)>MA(H,N),1,0),COLORFF00FF,POINTDOT,LINETHICK0;
回踩:=IF((CROSS(MA(H,N),L) OR CROSS(MA(H,N)*1.01,C))AND BARSLAST(出水)<=5,1,0),COLOR00FFFF,POINTDOT,LINETHICK0;
STICKLINE(出水,(C+O)/2,(C+O)/2,8,0),COLORFF00FF;
STICKLINE(出水,H,L,0,0),COLORFF00FF;
DRAWTEXT(回踩,L*0.95, '↑'),COLORFFFFFF;
XG:=高山=流水 AND 高山=低谷 AND 高山=HHV(流水,2) AND 高山=HHV(流水,3)
AND 高山=HHV(流水,3) AND C>高山 AND 高山*1.1>(C+O)/2;
DRAWICON(XG,高山*0.97,3);
上成立:=IF(REF(L,1)=LLV(L,30) AND REF(L,3)>REF(L,2) AND O<C
AND ABS(C-MA(C,89))/MA(C,89)<1.2 AND MA(C,89)>REF(MA(C,89),1),85,100);
DRAWICON(上成立=85,L*0.97,26);
651388697.jpg
|