首页 > 股票公式 > 通达信买后止损指标公式

通达信买后止损指标公式

A1:=REF(CLOSE,1);
A2:=((SMA((MAX((CLOSE – A1),0)),5,1)) / (SMA(ABS((CLOSE – A1)),5,1))) * 100;
A3:=SUM((MAX((MAX((HIGH – LOW),ABS((HIGH – A1)))),ABS((LOW – A1)))),10);
A4:=HIGH – (REF(HIGH,1));
A5:=(REF(LOW,1)) – LOW;
A6:=SUM((IF(((A4 > 0) AND (A4 > A5)),A4,0)),10);
A7:=SUM((IF(((A5 > 0) AND (A5 > A4)),A5,0)),10);
A8:=(A6 * 100) / A3;
A9:=(A7 * 100) / A3;
A10:=MA(((ABS((A9 – A8)) / (A9 + A8)) * 100),5);
A11:=A2 + A10;
A12:=((A10 + (REF(A10,5))) / 2) + A2;
A13:=(100 * ((HHV(HIGH,10)) – CLOSE)) / ((HHV(HIGH,10)) – (LLV(LOW,10)));
A14:=A2 – A13;
A15:=A11 + A14;
A:=LLV(A15,1);
B:=IF((A < 0),0,A);
STICKLINE(A>IF(CAPITAL=0,1,5),15,15+A,3,0),COLOR004444;
STICKLINE(A>IF(CAPITAL=0,1,5),15,15+A,1,0),COLOR00FFFF;
STICKLINE(A<IF(CAPITAL=0,1,5),15,15+A,3,0),COLOR444400;
STICKLINE(A<IF(CAPITAL=0,1,5),15,15+A,1,0),COLORFFCC00;
STICKLINE(B>0,0,0+B,2,0),COLOR000044;
STICKLINE(B>0,0,0+B,1,0),COLOR0000FF;
STICKLINE(B<0,0,0+B,2,0),COLOR004400;
STICKLINE(B<0,0,0+B,1,0),COLOR00FF00;
M:=REF(B,1);
DRAWTEXT((M=0 AND B>M),-5,’买’),COLOR7F52AF;
DRAWTEXT(REF((M=0 AND B>M),1) AND A<REF(A,1),200,’买后止损’),COLORLIGREEN;

推荐阅读