{牛股持股线副源码如下}
{牛股持股线,副图}
MA5:=MA(CLOSE,5);
{持股趋势线1:IF((HHV(MA5,100)=MA5),HHV(MA5,100),DRAWNULL),COLORRED,LINETHICK5;
持股趋势线2:=IF(HHV(MA5,100)=MA5,HHV(MA5,100)*1.15,DRAWNULL),COLORWHITE,LINETHICK5;}
牛股持股线:IF((HHV(MA5,100)=MA5),HHV(MA5,100),DRAWNULL),COLORRED,LINETHICK5;
DRAWTEXT_FIX(C>O,0.01,0.03,0,'红线存在就持股,红线消失就卖出。'),COLORFFFFFF;
{牛股持股线主源码如下}
{牛股持股线,主图}
MA5:MA(CLOSE,5);
{MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA30:MA(CLOSE,30);
MA60:MA(CLOSE,60);
MA120:MA(CLOSE,120);}
趋势线:HHV(MA5,100),COLORGREEN,LINETHICK2;
X_1:=REF(CLOSE,3)/REF(CLOSE,4)>1.09 AND REF(CLOSE,3)=REF(HIGH,3) AND REF(CLOSE,3)>REF(MA(CLOSE,5),3) AND REF(OPEN,3)>REF(MA(CLOSE,10),3) AND NOT(REF(CLOSE,2)/REF(CLOSE,1)>=1.09 AND REF(CLOSE,3)/REF(CLOSE,2)>=1.09);
X_2:=HIGH/REF(CLOSE,1)>=1.041;
X_3:=X_1 AND X_2;
X_4:=REF(CLOSE,4)/REF(CLOSE,5)>1.09 AND REF(CLOSE,4)=REF(HIGH,4) AND REF(CLOSE,4)>REF(MA(CLOSE,5),4) AND REF(OPEN,4)>REF(MA(CLOSE,10),4) AND NOT(REF(CLOSE,2)/REF(CLOSE,1)>=1.09 AND REF(CLOSE,3)/REF(CLOSE,2)>=1.09);
牛股持股线:IF((HHV(MA5,100)=MA5),HHV(MA5,100),DRAWNULL),COLORRED,LINETHICK3;