P:=13;
LC := REF(CLOSE,1);
RSI:SMA(MAX(CLOSE-LC,0),P,1)/SMA(ABS(CLOSE-LC),P,1)*100,COLOR00FF00,LINETHICK2;
峰顶: HHV(MA(RSI,3),P),COLORFF00FF;
谷底:llV(MA(RSI,3),P),COLORFF8800;
地平:(HHV(MA(RSI,3),P)+llV(MA(RSI,3),P))/2,COLORFFFFFF,LINETHICK2;
RSI2:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;
RSI6:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
FX:=RSI-地平>=15 OR (RSI2>=95 AND RSI6>75);
登山:IF(RSI>地平,1,0),COLOR00FF00,LINETHICK0;
过顶:IF(RSI>35 AND RSI>峰顶,1,0),COLOR0000FF,POINTDOT,LINETHICK0;
太阳:IF(FX AND RSI-峰顶>=2,1,0),COLORFF00FF,POINTDOT,LINETHICK0;
ZQSJ:=BARSLAST(CROSS(RSI,地平));
FXSJ:=BARSLAST(CROSS(0.8,太阳));
快跑:IF(FXSJ=0,1,0),COLORFFFF00,POINTDOT,LINETHICK0;
WK:=C=LLV(C,3) AND COUNT(BETWEEN(RSI,地平,峰顶),2)>=1 AND COUNT(过顶,6)>=1;
林荫:IF(WK AND (COUNT(CROSS(0.8,WK),ZQSJ)=0 OR COUNT(CROSS(0.8,WK),FXSJ)=0),1,0),COLOR00FFFF,POINTDOT,LINETHICK0;
抄底:IF(CROSS(RSI,谷底) AND LLV(RSI,3)<35,1,0),COLORFFFFFF,POINTDOT,LINETHICK0;
{以下设置副图显示方式----大智慧L-2版本}
FILLRGN(RSI,地平,登山,RGB(0,200,0));
FILLRGN(RSI,峰顶,过顶,RGB(255,0,0));
FILLRGN(RSI,峰顶,林荫,RGB(255,255,0));
DRAWICON(太阳,HHV(RSI,3)*1.1,12),ALIGN1;
DRAWTEXT(快跑,HHV(RSI,3)*1.1, '跑'),COLORFFFFFF,ALIGN1;
DRAWTEXT(抄底,谷底, '↑'),COLORFFFFFF;
{以下设置副图显示方式----飞狐版本}
FILLRGN(登山,RSI,地平),COLOR00FF00;
FILLRGN(过顶,RSI,峰顶),COLOR0000FF;
FILLRGN(林荫,RSI,峰顶),COLOR00FFFF;
DRAWICON(太阳,HHV(RSI,3)*1.1,10),ALIGN1;
DRAWTEXT(快跑,HHV(RSI,3)*1.1, '跑'),COLORFFFFFF,ALIGN1;
DRAWTEXT(抄底,谷底, '↑'),COLORFFFFFF;
{以下设置副图显示方式----通用版本}
STICKLINE(登山,RSI,地平,4,0),COLOR00FF00;
STICKLINE(过顶,RSI,峰顶,4,0),COLOR0000FF;
STICKLINE(林荫,RSI,峰顶,4,0),COLOR00FFFF;
DRAWICON(太阳,HHV(RSI,3)*1.1,1);
DRAWTEXT(抄底,谷底, '↑'),COLORFFFFFF; |