领涨版块部分需要安装千钧老师“涨幅引用”的引用公式,有些部分自行选用。
INPUT:n(21,1,999),n1(8,1,256),n2(64,1,256),k1(3,0,3),线数(3,1,8),nn(3,1,20);
DRAWGBK(1>0,COLORRGB(0,0,0) ,COLORRGB(0,0,0),1);
//DRAWGBK(CLOSE,COLORRGB(36,68,36),COLORRGB(60,80,80),1);
//DRAWGBK(C,COLORRGB(20,1,14),COLORRGB(100,50,60),1);
DRAWTEXTEX(1,1,0,0,'■所属板块:'+BLKNAME),Colorwhite;
DRAWTEXTEX(1,1,680,60,'市盈率:'+NUMTOSTR(DYNAINFO(39),2)+' 净资产: '+NUMTOSTR(FINANCE(34),2)),Color0F7AC5;
DRAWTEXTEX(1,1,680,100,'收 益:'+NUMTOSTR(FINANCE(33),2)+' '+'利 润: '+NUMTOSTR(FINANCE(54),0)+' %'),Color0F7AC5;
星期数字:=WEEKDAY,LINETHICK0;
星期X:=' 星期';
星期j:=IF(星期数字=5 ,星期X+'五',IF(星期数字=4 ,星期X+'四',
IF(星期数字=3 ,星期X+'三',IF(星期数字=2 ,星期X+'二',IF(星期数字=1 ,星期X+'一',星期X)))));
农历月:=LMONTH;
农历日:=LDAY;
农历:=IF( BARSTATUS=2 ,' 农历 '+NUMTOSTR(农历月,0)+'月 '+NUMTOSTR(农历日,0)+'日',' ');
DRAWTEXTEX(1,1,400,40,星期j+农历),LINETHICK3,ColorFFFF80;
eMA5:=EMA(CLOSE,5);
eMA10:=EMA(CLOSE,10);
eMA20:=EMA(CLOSE,20);
eMA30:=EMA(CLOSE,30);
eMA60:=EMA(CLOSE,60);
eMA128:=EMA(CLOSE,128);
eMA256:=EMA(CLOSE,256);
//均线系统解盘
EXPLAIN(1,' '+'均线系统'),colorFFFF;
EXPLAIN(CLOSE>=ema128,'股价在半年线之上'),LINETHICK2,color6633CC;
EXPLAIN(CLOSE>=ema256,'股价在年线之上'),color6633CC;
EXPLAIN(CLOSE<ema128,'股价在半年线之下'),colorCCFF99;
EXPLAIN(CLOSE<ema256,'股价在年线之下'),colorCCFF99;
EXPLAIN(ema128>=REF(ema128,1),'半年线趋势向上'),color6633CC;
EXPLAIN(ema256>=REF(ema256,1),'年线趋势向上'),color6633CC;
EXPLAIN(ema128<REF(ema128,1),'半年线趋势向下'),colorCCFF99;
EXPLAIN(ema256<REF(ema256,1),'年线趋势向下'),colorCCFF99;
EXPLAIN((EMa60>EMa128 and EMa128>EMa256 and EMa60>EMa256),'60日以上均线多头排列'),color6633CC;
EXPLAIN((EMa60<EMa128 and EMa128<EMa256 and EMa60<EMa256),'60日以上均线空头排列'),colorCCFF99;
EXPLAIN((EMa30>EMa60 and EMa30>EMa128 and EMa60>EMa128),'中期均线多头排列'),color6633CC;
EXPLAIN((EMa30<EMa60 and EMa30<EMa128 and EMa60<EMa128),'中期均线空头排列'),colorCCFF99;
EXPLAIN((CROSS(C,ema60) and CROSS(C,ema128) and CROSS(C,ema256)),'股价一阳上穿三线'),color6633CC;
EXPLAIN((EMa30>REF(EMa30,1)),'30日均线向上'),color6633CC;
EXPLAIN((EMa30>REF(EMa30,1) AND EMa30<REF(EMa30,1)*1.001),'30日均线走平');
EXPLAIN((EMa30<REF(EMa30,1)),'30日均线向下'),colorCCFF99;
EXPLAIN((EMa5>REF(EMa5,1)*1.015),'5日均线强劲向上'),color6633CC;
EXPLAIN((EMa5>REF(EMa5,1) AND EMa5<REF(EMa5,1)*1.005),'5日均线方向不明');
EXPLAIN((EMa5<REF(EMa5,1)*0.985),'5日均线快速向下'),colorCCFF99;
EXPLAIN((CROSS(EMa5,EMa10)),'5日10日均线金叉'),color6633CC;
EXPLAIN((CROSS(EMa10,EMa5)),'5日10日均线死叉'),colorCCFF99;
EXPLAIN((EMa5>EMa10 and EMa10>EMa30 and EMa5>EMa30),'30日以下均线多头排列'),color6633CC;
EXPLAIN((EMa5<EMa10 and EMa10<EMa30 and EMa5<EMa30),'30日以下均线空头排列'),colorCCFF99;
//资金动向解盘
HSL:=vol/capital*100;
LD:=MA(VOL/(HIGH-LOW),5);
DMP:=ABS(CLOSE-OPEN);
DMM:=VOL/(HIGH-LOW);
EXPLAIN(1,' '+'资金动向'),colorFFFF;
EXPLAINEX(HSL<=1,'地量/换手率=',HSL,2,2),COLORWHITE;
EXPLAINEX(HSL>=1 AND HSL<2,'无量/换手率=',HSL,2,2),COLORCYAN;
EXPLAINEX(HSL>2 AND HSL<3,'温和/换手率=',HSL,2,2),COLORGRAY;
EXPLAINEX(HSL>3 AND HSL<5,'活跃/换手率=',HSL,2,2),COLORGREEN;
EXPLAINEX(HSL>5 AND HSL<8,'带量/换手率=',HSL,2,2),COLORYELLOW;
EXPLAINEX(HSL>8 AND HSL<15,'放量/换手率=',HSL,2,2),COLORMAGENTA;
EXPLAINEX(HSL>15 AND HSL<25,'巨量/换手率=',HSL,2,2),COLORRED;
EXPLAINEX(HSL>=25,'异常/换手率=',HSL,2,2),COLORBLUE;
EXPLAIN(DMM<LD AND DMP<MA(DMP,5),'资金入场意愿萎缩'), colorFFCC33;
EXPLAIN(DMM<LD AND DMP>MA(DMP,5),'场内资金有运作行为'), colorFFCC33;
EXPLAIN(DMM>LD AND DMP<MA(DMP,5),'多空双方激烈争夺'), colorFFCC33;
EXPLAIN(DMM>LD AND DMP>MA(DMP,5),'场外资金介入(或出局)意愿强烈'), colorFFCC33;
EXPLAIN(CROSS("VOL.MA1","VOL.MA2") AND "VOL.MA2">"VOL.MA3" AND "VOL.MA1">"VOL.MA3",'成交量均线金叉.'), colorCCFF99;
EXPLAIN("VOL.MA1">"VOL.MA2" AND "VOL.MA2">"VOL.MA3" AND "VOL.MA1">"VOL.MA3",'成交量均线多头排列.'), colorCCFF99;
SY:=IF(CLOSE>=OPEN,HIGH-CLOSE,HIGH-OPEN);
XY:=IF(CLOSE>=OPEN,OPEN-LOW,CLOSE-LOW);
CD:=2*(SY+XY)+ABS(CLOSE-OPEN);
SYJ:=IF(CLOSE>=OPEN,(HIGH+CLOSE)/2,(HIGH+OPEN)/2);
XYJ:=IF(CLOSE>=OPEN,(OPEN+LOW)/2,(CLOSE+LOW)/2);
MAJ1:=(SYJ*2*SY/CD+XYJ*2*XY/CD+(CLOSE+OPEN)/2*ABS(CLOSE-OPEN)/CD);
maj:=if(maj1=0,c,maj1);
短趋:=(8*maj+7*ref(maj,1)+6*ref(maj,2)+5*ref(maj,3)+4*ref(maj,4)+3*ref(maj,5)+2*ref(maj,6)+ref(maj,8))/36;
中趋:=(LLV(短趋,2)+LLV(短趋,4)+LLV(短趋,6))/3;
立桩量:=FILTER(VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>短趋,5);
突破:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)))=1;
三天法则:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)))=1;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA120:=SMA(C,120,1);
ZH520:=ABS(MA5-MA20)/MA20*100<=10;
ZH530:=ABS(MA5-MA30)/MA30*100<=10;
QSXS1:=MA5>REF(MA5,1);
QSXS2:=MA20>REF(MA20,1);
QSXS3:=MA30>REF(MA30,1);
DTPL:=MA20>MA30 AND MA30>MA120;
LYHT:=DTPL AND QSXS2 AND QSXS3 AND NOT(QSXS1) AND REF(QSXS1,1);
{三DK线}
TJ:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(TJ,CLOSE,OPEN,7,0),COLOR000045;
STICKLINE(TJ,CLOSE,OPEN,6,0),COLOR000065;
STICKLINE(TJ,CLOSE,OPEN,5,0),COLOR000085;
STICKLINE(TJ,CLOSE,OPEN,4,0),COLOR0000A5;
STICKLINE(TJ,CLOSE,OPEN,3,0),COLOR0000C5;
STICKLINE(TJ,CLOSE,OPEN,2,0),COLOR0000E5;
STICKLINE(TJ,HIGH,LOW,1,0),COLOR0000F5;
STICKLINE(NOT(TJ),CLOSE,OPEN,7,0),COLOR353500;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),COLOR454500;
STICKLINE(NOT(TJ),CLOSE,OPEN,5,0),COLOR555500;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),COLOR656500;
STICKLINE(NOT(TJ),CLOSE,OPEN,3,0),COLOR757500;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),COLOR858500;
STICKLINE(NOT(TJ),HIGH,LOW,1,0),COLOR959500;
TJTS:=BACKSET(ISLASTBAR,5);
早晨之星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏之星:=REF(CLOSE,2)/REF(OPEN,2)>1.03 AND REF(OPEN,1)>REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.02 AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2);
长十字:=CLOSE=OPEN AND HIGH/LOW>1.03;
垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH;
早晨十字星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2)>1.05 AND REF(OPEN,1)>REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2);
射击之星:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW>3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE>MA(C |