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),BARSCOUNT((DCLOSE*BG))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))));
中线:1,colorblue,LINETHICK2;
快趋势线:EXPMA((DCLOSE/VB),21),coloryellow,,LINETHICK1;
慢趋势线:EXPMA((DCLOSE/VB),54),colorgreen,LINETHICK1;
DRAWICON(CROSS(快趋势线,中线),快趋势线,1);
DRAWICON(CROSS(慢趋势线,中线) AND (快趋势线>中线),中线-0.002,15);
DRAWTEXT(CROSS(EXPMA((DCLOSE/VB),20),1),快趋势线-0.0025,'涨'),colorred;
DRAWTEXT(CROSS(快趋势线,中线),快趋势线-0.0055,'买进'),coloryellow;
DRAWICON(CROSS(快趋势线,慢趋势线),慢趋势线,13);
STICKLINE(快趋势线>中线 AND 快趋势线>REF(快趋势线,1) AND 快趋势线>慢趋势线,快趋势线,快趋势线+0.0015,1,0),colormagenta;
DRAWTEXT(CROSS(中线,快趋势线),中线,'注意'),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,快趋势线,'补仓'),colorlired;
随意写的一个指标,写的不好大家请见谅。
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),BARSCOUNT((DCLOSE*BG))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))));
中线:1,colorblue,LINETHICK2;
快趋势线:EXPMA((DCLOSE/VB),21),coloryellow,,LINETHICK1;
慢趋势线:EXPMA((DCLOSE/VB),54),colorgreen,LINETHICK1;
DRAWICON(CROSS(快趋势线,中线),快趋势线,1);
DRAWICON(CROSS(慢趋势线,中线) AND (快趋势线>中线),中线-0.002,15);
DRAWTEXT(CROSS(EXPMA((DCLOSE/VB),20),1),快趋势线-0.0025,'涨'),colorred;
DRAWTEXT(CROSS(快趋势线,中线),快趋势线-0.0055,'买进'),coloryellow;
DRAWICON(CROSS(快趋势线,慢趋势线),慢趋势线,13);
STICKLINE(快趋势线>中线 AND 快趋势线>REF(快趋势线,1) AND 快趋势线>慢趋势线,快趋势线,快趋势线+0.0015,1,0),colormagenta;
DRAWTEXT(CROSS(中线,快趋势线),中线,'注意'),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,快趋势线,'补仓'),colorlired;