【波段抄底幅图源码】
DRAWGBK(C>O,RGB(1,1,1),RGB(1,1,1),1,2,1);
DRAWBAND(MA(C,40),RGB(0,0,0),MA(C,60),RGB(255,0,0));
DRAWBAND(MA(C,40),RGB(0,0,0),MA(C,20),RGB(255,0,0));
DRAWBAND(MA(C,20),RGB(0,0,0),MA(C,60),RGB(0,0,0));
DRAWTEXT_FIX(1,0,0,0,'绿色抄底有未来函数')COLORGREEN;
MA20:MA(C,20)COLORYELLOW ;
MA40:MA(C,40)COLORMAGENTA;
MA60:MA(C,60)COLORLIGREEN ;
VER1:=IF(DATE<=1200823,1,0);
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板') AND DATE>VER1,0.2 ,IF(INBLOCK('ST板块'),0.05,0.1)));
潜伏线:=EMA(C,24)DOTLINE COLORGRAY;
涨停价:ZTPRICE(REF(CLOSE,1),BK)NODRAW COLORRED;
高开涨幅%:(REF(C,1)-O)/REF(C,1)*-100 NODRAW COLORMAGENTA;
股东占流通比:=FINVALUE(244)/FINVALUE(239);{十大流通股东/流通}
筹码数据:1/(1-股东占流通比), COLORRED NODRAW;
实体振幅:(MAX(C,O)-MIN(C,O))/MAX(C,O)*100 NODRAW;
机构家数:FINVALUE(246),NODRAW COLORWHITE;
DRAWKLINE(H,O,L,C);{重绘K线}
涨停:=C>=ZTPRICE(REF(C,1),BK) AND C=H;
跌停:=C<=DTPRICE(REF(C,1),BK) AND C=L;
STICKLINE((C=ZTPRICE(REF(C,1),BK) AND C=H),C,O,2.6,0),COLOR00FFFF;
STICKLINE((C=DTPRICE(REF(C,1),BK) AND C=L),C,O,2.6,0),COLOR80FF00;
RC1:=REF(C,1);
CS:=IF(C>=1,10000,100000);
C涨停10:=1.10*RC1-49/CS;
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
大阳线:=C>O AND (C>=C涨停5 OR C>(1.05*O-51/CS) ) OR (C>1000 AND C>RC1*1.024);
STICKLINE(涨停,O,C,2.6,0),COLORMAGENTA;
STICKLINE(跌停,O,C,2.6,0),COLORBLUE;
{涨停K线变色,科创板20%变色}
BK1:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1));
STICKLINE((C=ZTPRICE(REF(C,1),BK1) AND C=H),C,O,2.5,0),COLORMAGENTA;
STICKLINE((C=DTPRICE(REF(C,1),BK1) AND C=L),C,O,2.5,0),COLORGREEN;
STICKLINE((H=ZTPRICE(REF(C,1),BK1) AND C<H AND C<O),C,O,2.5,0),COLORGREEN;{收阴}
STICKLINE((H=ZTPRICE(REF(C,1),BK1) AND C<H AND C>O),C,O,2.5,0),COLORRED;{收阳};
{抄底}
QQ_1:=C-REF(C,1);
QQ_2:=100*EMA(EMA(QQ_1,6),6)/EMA(EMA(ABS(QQ_1),6),6);
QQ_3:=CROSS(EMA(C,19),EMA(C,7));
QQ_4:=CROSS(EMA(C,7),EMA(C,19));
ZZ1:=L=LLV(L,BARSLAST(QQ_3)+1);
ZZ2:=LLV(L,BARSLAST(QQ_3)+1);
ZZ3:=H=HHV(H,BARSLAST(QQ_4)+1);
ZZ4:=HHV(H,BARSLAST(QQ_4)+1);
QQ_A:=DRAWLINE(ZZ1,ZZ2,ZZ3,ZZ4,0);
YY1:=H=HHV(H,BARSLAST(QQ_4)+1);
YY2:=HHV(H,BARSLAST(QQ_4)+1);
YY3:=L=LLV(L,BARSLAST(QQ_3)+1);
YY4:=LLV(L,BARSLAST(QQ_3)+1);
QQ_B:=DRAWLINE(YY1,YY2,YY3,YY4,0);
TTJ:=IF(QQ_B<REF(QQ_B,1) AND QQ_B=QQ_A,1,0);
一绝:=STICKLINE(REF(TTJ,1)=0 AND TTJ>=1 AND CCI<-40 ,0,90,1,-1),COLORRED;
VAR1A:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2A:=SMA(ABS(LOW-VAR1A),13,1)/SMA(MAX(LOW-VAR1A,0),10,1);
VAR3A:=EMA(VAR2A,10);
DRAWTEXT(一绝,L*0.995,'抄'),COLORGREEN;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2,COLORSTICK;
DRAWTEXT(C>REF(H,1)AND C>REF(H,2)AND V>REF(V,1)AND V>REF(V,2)AND REF(V,1)<MA(V,60)AND
REF(C,1)>MA(C,20)AND REF(C,2)>MA(C,20)AND C>MA(C,60)AND C<MA(C,40)AND LLV(L,3)<=MA(C,60)>=1
AND DEA>=0,L*0.98,'买')COLORWHITE;
DRAWTEXT(C>REF(H,1)AND C>REF(H,2)AND V>REF(V,1)AND V>REF(V,2)AND REF(V,1)<MA(V,60)AND
REF(C,1)>MA(C,20)AND REF(C,2)>MA(C,20)AND C>MA(C,40)AND C<MA(C,20)AND LLV(L,3)<=MA(C,40)>=1
AND DEA>=0,L*0.98,'买')COLORRED;
DRAWTEXT(C>REF(H,1)AND C>REF(H,2)AND V>REF(V,1)AND V>REF(V,2)AND REF(V,1)<MA(V,60)AND
REF(C,1)>MA(C,20)AND REF(C,2)>MA(C,20)AND C>MA(C,20)AND LLV(L,3)<=MA(C,20)>=1
AND DEA>=0,L*0.98,'买')COLOR00FF00,LINETHICK3;
上穿:=CROSS(MA(C,20),MA(C,40));
统计:=COUNT(上穿,8)AND C>MA(C,20)AND O<MA(C,40);
DRAWTEXT(统计,L*0.985,'')COLORBLUE;
MIDA:=MA(C,20);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
A1:=REF(UPPERA,1)COLOR00FFFF;
B1:=REF(LOWERA,1)COLORFF00FF;
DRAWTEXT(( C<B1 AND O<B1),L*0.99,'底')COLORFF00FF;
DRAWTEXT(( C>A1 AND O>A1 AND H<涨停价),H*1.005,'顶')COLORGREEN;
DIFFV:=EMA(DCLOSE,9)-EMA(DCLOSE,27);
DEAV:=EMA(DIFFV,5);
A1V:=CROSS(DIFFV,DEAV);
DB2:=REF(CLOSE,A1V+1)>CLOSE AND DIFFV>REF(DIFFV,A1V+1) AND CROSS(DIFFV,DEAV);
DEA0:=EMA(DIFFV*100,9);
MACD0:=2*(DIFFV*100-DEA0);
HM:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15);
LHT:=DB2 AND HM;
DRAWTEXT(LHT,0.3,'牛
势大涨'),COLORFF22FF;
DRAWICON(LHT,0.1,1);