//止损指标
K:=22;
X1:=5;
Y1:=10;
Z1:=15;
W1:=30;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD1:=(DIF-DEA)*2,COLORSTICK;
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));//{//真实波幅}
ATR1:=MA(TR1,K);//{ //求26个周期内真实波幅的简单移动平均}
MA5:MA(C,5),colorgreen; //{ATR期间最低价}
STP: HHV(C,K) - ATR1 * (W1/10);//{止盈点3}
//{LL:BARSLAST(CROSS(STP,C));}//股民学院
//{P1:=IF(LL=0,C,REF(C,LL));}
D1:=(C-STP)/ma5;//{差价%}
CON1:=D1>=(X1/100);
CON2:=D1>=2*(X1/100);
CX1:=BARSNSINCE(CON1,7)>0;
CX2:=BARSNSINCE(CON2,7)>0;
止盈价:IF(MACD1>0,STP*(1+Y1/100),STP*(1+Z1/100)),colorblue;
DRAWICON(CROSS(C,STP),L,1);
DRAWICON(CROSS(止盈价,C),H,2);
【炒股方法】止损指标(同花顺公式)
特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。