通达信:抄底逃顶指标 (副图指标)
{DRAWRECTREL(0,725,130,999,RGB(0,0,1)),NOFRAME;}
底部:1,NODRAW,COLORMAGENTA;
顶部:100,NODRAW,COLORCYAN;
顶部警戒:90,COLOR008000;
强弱分界:50,COLOR00BFBF;
底部警戒:10,COLORRED;
DRAWTEXT(ISLASTBAR,强弱分界,'强弱分界'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,顶部警戒,'顶部警戒'),COLORGREEN;
DRAWTEXT(ISLASTBAR,底部警戒,'底部警戒'),COLORRED;
{DRAWTEXT(ISLASTBAR,顶部,'顶部'),COLORCYAN;
DRAWTEXT(ISLASTBAR,底部,'底部'),COLORMAGENTA;}
V11:=3*SMA((C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100,5,1)-2*SMA(SMA((C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100,5,1),3,1);
趋势线:EMA(V11,3),LINETHICK2,COLORLIMAGENTA;
筹码:=((COST(90)+COST(70)+COST(50)+COST(30)+COST(10))/5);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
主力出货:STICKLINE(趋势线<8,趋势线,10,5,0),COLOR00E3E3;
DRAWTEXT(BARSLASTCOUNT(趋势线<8)=1 AND 筹码>1,13,'主力吸筹'),COLOR00E3E3;
主力吸筹:STICKLINE(趋势线>92,趋势线,90,5,0),COLOR008000;
DRAWTEXT(BARSLASTCOUNT(趋势线>92)=1 AND 筹码>1,84,'主力出货')COLORGREEN;
VAR18:=(HIGH+LOW+CLOSE)/(3);
VAR19:=(VAR18-MA(VAR18,14))/((0.015)*(AVEDEV(VAR18,14)));
VAR1A:=(VAR18-MA(VAR18,70))/((0.015)*(AVEDEV(VAR18,70)));
VAR1B:=IF((VAR19>=150) AND (VAR19<200) AND (VAR1A>=150) AND (VAR1A<200),(-10),0);
VAR1C:=IF((VAR19<=(-150)) AND (VAR19>(-200)) AND (VAR1A<=(-150)) AND (VAR1A>(-200)),10,0);
买:CROSS(趋势线,10),COLORRED,NODRAW;
卖:CROSS(90,趋势线),COLORGREEN,NODRAW;
DRAWTEXT(CROSS(趋势线,10),趋势线,'★买'),COLORRED;
DRAWTEXT(CROSS(90,趋势线),90,'★卖'),COLORGREEN;
逃顶1:=IF((BARSCOUNT(CLOSE)<70),100,IF((VAR1A>=200) AND (VAR19>=150),(-20),VAR1B)+100),COLORCCFF66;
抄底1:=IF((BARSCOUNT(CLOSE)<70),(-100),IF((VAR1A<=(-200)) AND (VAR19<=(-150)),20,VAR1C)-100),COLORBLUE;
逃顶:逃顶1=80,NODRAW;
抄底:抄底1=-80,COLOR0080FF,NODRAW;
DRAWTEXT(BARSLASTCOUNT(逃顶=1)=1,93,'逃顶'),COLORWHITE;
DRAWTEXT(BARSLASTCOUNT(抄底=1)=1,7,'抄底'),COLOR0080FF;
DRAWICON(BARSLASTCOUNT(逃顶=1),99,2);
DRAWICON(BARSLASTCOUNT(抄底=1),1,1);