BG:=IF(DATE<=1150530,1,0);
GH:=BETWEEN((DCLOSE*BG)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))),1.05,0.95);
VB:=IF(GH=0,MA((DCLOSE*BG),BARSCOUT((DCLOSE*BG))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))));
中线:1,COLORBLUE,LINETHICK1.5;
快趋势线:EXPMA((DCLOSE/VB),21),COLORRED,,LINETHICK1;
慢趋势线:EXPMA((DCLOSE/VB),54),COLORGREEN,LINETHICK1;
DRAWICON(CROSS(快趋势线,中线),快趋势线,1);
DRAWICON(CROSS(慢趋势线,中线) AND (快趋势线>中线),中线-0.002,15);
DRAWTEXT(CROSS(EXPMA((DCLOSE/VB),20),1),快趋势线-0.0045,'涨'),COLORRED;
DRAWTEXT(CROSS(快趋势线,中线),快趋势线-0.0095,'买进'),COLORYELLOW;
DRAWICON(CROSS(快趋势线,慢趋势线),慢趋势线,13);
STICKLINE(快趋势线>中线 AND 快趋势线>REF(快趋势线,1) AND 快趋势线>慢趋势线,快趋势线,快趋势线+0.0015,1,0),COLORMAGENTA;
DRAWTEXT(CROSS(中线,快趋势线),中线+0.005,'注意'),COLORWHITE;
DRAWICON(CROSS(慢趋势线,快趋势线),慢趋势线,2);
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:= EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
BB:= (趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10);
CCC:=(趋势线>=90 AND V12) AND FILTER((趋势线>=90 AND V12),10);
见顶清仓:= STICKLINE(趋势线>=90 AND V12,中线,快趋势线,2,0),COLORCYAN;
DRAWICON(CCC,快趋势线,12);
DRAWICON(BB,快趋势线,23);
DRAWTEXT (BB,快趋势线-0.003,'补仓'),COLORLIRED; |