公式来源于网络,用于飞狐软件,主图,本人略作了些改动,公式中有许多的未来函数,比如之字函数ZIG;BACKSET向前赋值函数;PEAK;PEAKBARS;TROUGHA;等,所以要结合其它公式看。但是有许多可用之处,比如解盘等,总之人者见仁,智者见智吧!
DRAWGBK(CLOSE,COLORRGB(10,200,200),COLORRGB(10,10,100),1);
DRAWTEXTEX(CLOSE,1,600,80,'★发现价值专用指标★'),COLORFF00FF;
{主图F10资料}
VAR0:=1;
上市日期年:REF(YEAR,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFF;
月:REF(MONTH,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFF00FF;
日:REF(DAY,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS,CLOSE,'证券代码:'+STKLABEL),ALIGN4,colorFF;
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 所属板块:'+BLKNAME+' 发行价'
+NUMTOSTR(FINANCE(51),2)+'元'+' 发行量'+NUMTOSTR(FINANCE(52),2)+'万股'+'\n'+'
总股本'+NUMTOSTR(FINANCE(1),0)+'万股'+' 流通A股'+NUMTOSTR(FINANCE(7),0)+'万股'+' 净资产'+
NUMTOSTR(FINANCE(35),2)+'亿元'+' 每股收益'+NUMTOSTR(FINANCE(33),2)+'元'+' 每股未分配'+
NUMTOSTR(FINANCE(32),2)+'元'+' 市盈率'+NUMTOSTR(DYNAINFO(39),2)+'%'+' 投资收益'+
NUMTOSTR(FINANCE(24),2)+'元'+' 股东总数'+NUMTOSTR(FINANCE(50),0)+'户'),ALIGN4,colorFFFFFF;
{区间彩带}
a:=MA(CLOSE,5);
b:=MA(CLOSE,24);
FILLRGN(a>b,a,b),ColorC0C0C0;
FILLRGN(a<b,a,b),Color363636;
{蓝黄通道}
v0:=VOL*(OPEN+CLOSE+HIGH+LOW)/4;
A:=EMA(v0,21)/EMA(VOL,21),linethick2,coloryellow;
STICKLINE(A>=REF(A,1),A,REF(A,1),6,1),linethick3,coloryellow;
STICKLINE(A<REF(A,1),A,REF(A,1),6,1),linethick3,colorff0099;
{猎人柱--红黄柱}
猎人1:=3;
猎人2:=6;
猎人3:=13;
猎人4:=18;
猎人5:=60;
VAR1:=IF(DATE<1500830 AND DATE>900101,1,0);
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
K1:=猎人3/10*VAR1*100;
K2:=猎人4/10*VAR1*100;
K3:=猎人5/10*VAR1*100;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
主力:=EMA((CLOSE-MA(CLOSE,猎人1))/MA(CLOSE,猎人1)*4800,2);
散户:=EMA((CLOSE-MA(CLOSE,猎人2))/MA(CLOSE,猎人2)*4800,7);
猎人见底:IF(CROSS(主力,散户) AND 主力<0 AND 散户<0,1,0),LINETHICK0,colorFF;
猎人短进:IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,1,0),LINETHICK0,colorFF00FF;
猎人均线6:MA(CLOSE,6),LINETHICK0,colorFF;
VAR1:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);
VAR2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
STICKLINE(VAR1,CLOSE,OPEN,10,1),LINETHICK2,colorFFFF;
{画柱线(VAR1,收盘价,开盘价,3,0),LINETHICK2,colorFFFF;
画柱线(VAR1,最高价,最低价,1,0),LINETHICK2,colorFFFF;}
STICKLINE(VAR2,CLOSE,OPEN,10,1),LINETHICK2,colorFF00FF;
{画柱线(VAR2,收盘价,开盘价,3,0),LINETHICK2,colorFF00FF;
画柱线(VAR2,最高价,最低价,1,0),LINETHICK2,colorFF00FF;}
{之字线}
{GET:之字转向(3,5)COLORWHITE,LINETHICK2;}
{盖世波段王-白色方块柱}
{N:=6;M:=81;}
A1:=1;
TR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0 AND HD>LD,HD,0),N);
DMM:=SUM(IF(LD>0 AND LD>HD,LD,0),N);
PDI:=DMP*100/TR1;
X:=37;
Y:=49.99;
DIFF:=EMA(CLOSE,34)-EMA(CLOSE,5);
DEA:=EMA(DIFF,5);
A:=CROSS(DIFF,0);
B:=CROSS(0,DIFF);
STICKLINE(B AND (CROSS(PDI,Y) OR CROSS(PDI,X)) AND CLOSE>=OPEN AND A1,CLOSE,OPEN,11,1),colorFFFFFF;
{精美彩色柱}
STICKLINE((CLOSE < OPEN),HIGH,LOW,1,0),color8800;
STICKLINE((CLOSE < OPEN),HIGH,LOW,0,0),colorFF00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,8,0),color8800;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,7,0),color9900;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,6,0),colorAA00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,5,0),colorBB00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,4,0),colorCC00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,3,0),colorDD00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,2,0),colorEE00;
STICKLINE((CLOSE < OPEN),CLOSE,OPEN,1,0),colorFF00;
STICKLINE((CLOSE >= OPEN),HIGH,LOW,1,0),colorFF;
STICKLINE((CLOSE >= OPEN),HIGH,LOW,0,0),colorEEFF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,8,0),colorFF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,7,0),color22FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,6,0),color44FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,5,0),color66FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,4,0),color88FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3,0),colorAAFF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2,0),colorCCFF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1,0),colorEEFF;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLORFF6600;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORFF7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORFF9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORFFBB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFFDD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFEE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFFF00;
{立体柱子:红色}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000033;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
VAR9Q:=CLOSE= HHV(CLOSE,4)AND (REF(CLOSE,1)>=REF(CLOSE,2) OR REF(CLOSE,1)>=REF (CLOSE,3)) OR REF(CLOSE,1)=HHV(CLOSE,4) AND CLOSE>=REF(CLOSE,2) OR REF(CLOSE,2) =HHV(CLOSE,4) AND REF(CLOSE,3)=LLV(CLOSE,4) AND CLOSE>=REF(CLOSE,1) OR REF(CLOSE,3) =HHV(CLOSE,4) AND CLOSE>=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
红持:var9Q,color0000ff,LINETHICK0;
{立体柱子:红色}
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,8,0),COLOR000044;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,7,0),COLOR000055;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,6,0),COLOR000066;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,5,0),COLOR000077;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,4,0),COLOR000099;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,3,0),COLOR0000BB;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,2,0),COLOR0000DD;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,1,0),COLOR0000FF;
VARAQ:=CLOSE=HHV(CLOSE,4) AND REF(CLOSE,1)=LLV(CLOSE,4);
粉变:varaQ,colorff99ff,LINETHICK0;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,8,0),COLORFF11FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,7,0),COLORFF22FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,6,0),COLORFF33FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,5,0),COLORFF55FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,4,0),COLORFF77FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,3,0),COLORFF99FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,2,0),COLORFFBBFF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,1,0),COLORFFDDFF;
VARBQ:=CLOSE=LLV(CLOSE,4) AND (REF(CLOSE,1)<REF(CLOSE,2) OR REF(CLOSE,1)<REF(CLOSE,3)) OR REF(CLOSE,1)=LLV(CLOSE,4) AND CLOSE<REF(CLOSE,2) OR REF(CLOSE,2)=LLV(CLOSE,4) AND REF(CLOSE,1)<>HHV(CLOSE,4) AND CLOSE<REF(CLOSE,1) OR REF(CLOSE,3)=LLV(CLOSE,4) AND CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
银灰跌:varbQ,color888888,LINETHICK0;
{立体柱子:银色}
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,8,0),COLOR333333;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,7,0),COLOR444444;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,6,0),COLOR555555;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,5,0),COLOR777777;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,4,0),COLOR999999;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,3,0),COLORBBBBBB;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,2,0),COLORDDDDDD;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,1,0),COLORFFFFFF;
VARCQ:=REF(CLOSE,1)=LLV(CLOSE,4) AND CLOSE>=REF(CLOSE,2) OR REF(CLOSE,2)=LLV(CLOSE,4) AND REF(CLOSE,1)<=REF(CLOSE,3) AND REF(CLOSE,2)<REF(CLOSE,4) AND CLOSE>=REF(CLOSE,1);
绿买:varcQ,color00ff00,LINETHICK0;
{立体柱子:绿色}
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,8,0),COLOR004400;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,6,0),COLOR005500;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,5,0),COLOR007700;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,4,0),COLOR009900;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,3,0),COLOR00BB00;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,2,0),COLOR00DD00;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,1,0),COLOR00FF00;
VARDQ:=REF(CLOSE,1)=HHV(CLOSE,4) AND CLOSE<REF(CLOSE,2) OR (REF(CLOSE,2)=HHV(CLOSE,4) AND REF(CLOSE,1)>REF(CLOSE,3) OR REF(CLOSE,3)=HHV(CLOSE,4) AND REF(CLOSE,1)>REF (CLOSE,2)) AND REF(CLOSE,2)>=REF(CLOSE,4) AND CLOSE<REF(CLOSE,1);
蓝抛:vardQ,colorff9900,LINETHICK0;
{立体柱子:深蓝色}
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,8,0),COLORFF1100;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,7,0),COLORFF2200;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,6,0),COLORFF3300;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,5,0),COLORFF5500;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,4,0),COLORFF7700;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,3,0),COLORFF9900;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,2,0),COLORFFBB00;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,1,0),COLORFFDD00;
{立体柱子:金色}
ZDF:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(ZDF>9.8,OPEN,CLOSE,8,0),color004444;
STICKLINE(ZDF>9.8,OPEN,CLOSE,7,0),color005555;
STICKLINE(ZDF>9.8,OPEN,CLOSE,6,0),color006666;
STICKLINE(ZDF>9.8,OPEN,CLOSE,5,0),color007777;
STICKLINE(ZDF>9.8,OPEN,CLOSE,4,0),color009999;
STICKLINE(ZDF>9.8,OPEN,CLOSE,3,0),color00BBBB;
STICKLINE(ZDF>9.8,OPEN,CLOSE,2,0),color00DDDD;
STICKLINE(ZDF>9.8,OPEN,CLOSE,1,0),color00FFFF;
{黄金柱+立桩主+将军柱}
三日不破:=MIN(MIN(LOW,REF(LOW,1)),REF(LOW,2))>=REF(LOW,3);
三日量缩:=(MAX(MAX(VOL,REF(VOL,1)),REF(VOL,2))<REF(VOL,3));
三日价涨A:=CLOSE>=REF(CLOSE,1);
三日价涨B:=CLOSE<REF(CLOSE,1);
三日价涨C:=MIN(MIN(CLOSE,REF(CLOSE,1)),REF(CLOSE,2))>=REF(LOW,3);
TIM:=IF(DATE<1540214,1,0);
缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;
百日低量:=(VOL=LLV(VOL,100))*TIM;
倍量柱:=CLOSE>REF(CLOSE,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;
前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;
倍量黄金柱:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
黄金柱:=倍量黄金柱 OR 高量黄金柱;
次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次黄金柱:=次倍量黄金柱 OR 次高量黄金柱;
准倍量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前倍量柱 AND ((三日量缩 AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破)) AND 前三引用不成立;
准高量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前高量柱 AND (三日量缩 AND 三日价涨C) AND 前三引用不成立;
准黄金柱:=准倍量黄金柱 OR 准高量黄金柱;
倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
将军柱:=倍量将军柱 OR 高量将军柱;
次倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次将军柱:=次倍量将军柱 OR 次高量将军柱;
准倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前倍量柱 AND 三日价涨C AND 前三引用不成立;
准高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前高量柱 AND 三日价涨C AND 前三引用不成立;
准将军柱:=准倍量将军柱 OR 准高量将军柱;
BACKSET100:=BACKSET(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱 OR 准将军柱,4);
BACKSET101:=BACKSET(黄金柱,4);
FILTER101:=FILTER(BACKSET101,3);
BACKSET102:=BACKSET(次黄金柱,4);
FILTER102:=FILTER(BACKSET102,3);
BACKSET103:=BACKSET(准黄金柱,4);
FILTER103:=FILTER(BACKSET103,3);
BACKSET104:=BACKSET(将军柱,4);
FILTER104:=FILTER(BACKSET104,3);
BACKSET105:=BACKSET(次将军柱,4);
FILTER105:=FILTER(BACKSET105,3);
BACKSET106:=BACKSET(准将军柱,4);
FILTER106:=FILTER(BACKSET106,3);
立桩量:=VOL=HHV(VOL,40) AND VOL>1.9*REF(VOL,1);
立桩量三日突破:=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)));
立桩量三日不破:=BARSLAST(立桩量)=3 AND REF(LOW,3)<=MIN(MIN(CLOSE,REF(CLOSE,1)),REF(CLOSE,2));
BACKSET300:=BACKSET(立桩量三日不破,4);
BACKSET301:=BACKSET(立桩量三日突破,4);
立桩量成立:=FILTER(BACKSET300,3) AND BACKSET301 AND 立桩量;
DRAWTEXT(立桩量成立,LOW*1.1,'立桩柱'),COLORRED;
STICKLINE(立桩量成立,OPEN,CLOSE,1.5,0),COLORRED;
DRAWTEXT(FILTER101,LOW*1.09,'黄金柱'),COLORYELLOW;
STICKLINE(FILTER101,OPEN,CLOSE,1.5,0),COLORYELLOW;
DRAWTEXT(FILTER104,LOW*1.07,'将军柱'),COLORWHITE;
STICKLINE(FILTER104,OPEN,CLOSE,1.5,0),COLORWHITE;
{突破的计算}
input:n(3,1,100),qj(0,0,50),m(0,0,1), inidate(600,1,1000),Z_DOT(33,3,100),show(4,0,6);
upx1:=IF( (CLOSE>REF(CLOSE,1) or (CLOSE=REF(CLOSE,1) and (REF(CLOSE,2)<REF(CLOSE,1) or (REF(CLOSE,2)=REF(CLOSE,1) and REF(CLOSE,3)<REF(CLOSE,2))))) and CLOSE>REFX(CLOSE,1),CLOSE,0);
upx2:=IF( (CLOSE<REF(CLOSE,1) or (CLOSE=REF(CLOSE,1) and (REF(CLOSE,2)>REF(CLOSE,1) or (REF(CLOSE,2)=REF(CLOSE,1) and REF(CLOSE,3)>REF(CLOSE,2))))) and CLOSE<REFX(CLOSE,1),CLOSE,0);
临界点:=REF(CLOSE,BARSLAST(upx1)),POINTDOT,LINETHICK3;//
低点:=REF(CLOSE,BARSLAST(upx2)),colorgreen,POINTDOT,LINETHICK3;
x1:=LLV(临界点,n);
t0:=BARSLAST(CLOSE=x1);
突破:=IF(CLOSE>x1 and REF(CLOSE,1)<=x1 and REF(临界点,1)=x1 and REFX(CLOSE,1)>x1 and REFX(CLOSE,2)>x1 and REFX(CLOSE,3)>x1,1,0),LINETHICK0;
突破失败:=IF(REF(CLOSE,1)>x1 and CLOSE<=x1 and 临界点>x1 ,1,0),LINETHICK0;
止损率:=(CLOSE-临界点)/临界点*100;//,colorred,LINETHICK0;
止盈率:=(CLOSE-低点)/低点*100;//,colorgreen,linethick0;
//义阳量能
TTJ:=BARSLAST((VOL>=REF(MA(VOL,3),1)*2));
K0:=TTJ=0;
K1:=SUMBARS(K0,1);
STICKLINE(K1<=5,REF(CLOSE,K1-1)*1.002,REF(CLOSE,K1-1),10,0),POINTDOT,colorred;//COLORYELLOW;
义阳:IF (K1>0 AND CLOSE>REF(CLOSE,K1-1),1,0),COLORRED,LINETHICK0;
{少爷接力跑}
B:=(2*CLOSE+HIGH+LOW)/4;
起跑线:LLV(B,3),COLORWHITE;
一棒:HHV(B,13),COLORYELLOW;
二棒:LLV(一棒,3),colorMagenta;
三棒:LLV(一棒,5),colorffcc66;
四棒:LLV(起跑线,3),COLORgreen,linethick3;
五棒:LLV(起跑线,21),COLORyellow,linethick4;
终点:HHV(五棒,33),COLORred,linethick3;
{SB买卖点}
DK:=MA(((SLOPE(CLOSE,20)*5)+CLOSE),20);
DRAWTEXT(CROSS(CLOSE,DK),LOW*1.015,'▲B'),COLORMAGENTA;
DRAWTEXT(CROSS(DK,CLOSE),HIGH*1.0,'▼S'),COLORYELLOW;
{少爷头底部大涨买}
V6:=CLOSE/REF(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
DRAWTEXT(V7,LOW,'\n \n大涨');
V10:=PEAKBARS(3,15,1)<10;
V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
{显示文字(头部,最低价,'头部');}
V9:=TROUGHBARS(3,15,1)<10;
V11:=IF(V9=1,50,0);
底部:= IF(V11=50,50,0);
{显示文字(底部,最低价,'\n底部');}
{上下拐点}
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
波动回调提示图:MA(CLOSE,10000);
DRAWTEXT(CROSS(FF,MA15),(LOW)*1.01 ,'上拐'),Color00FFFF;
DRAWTEXT(CROSS(MA15,FF),(HIGH * 1.01),'下拐'),Color00FF00;
DRAWTEXT(CROSS(85,RSI),(HIGH * 1.024),'回调'),colorFFFFFF;
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
指导线: EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2),linethick0,ColorFFffFF;
界: MA(CLOSE,27),linethick0,Color00FFFF;
{抓涨停、必涨、黑马}
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
DRAWTEXT(VAR3P>90,LOW,' \n \n抓板'),COLORRED;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
SC:=LOW<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND HIGH>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND CLOSE>REF(CLOSE,1) AND CLOSE>OPEN;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1)),COLORYELLOW;
{显示文字(买,最低价*1.01, '必涨'),COLORYELLOW;}
A1:=3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*1,5,1)-2*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*1,5,1),COLOR330066;
A2:=(EMA(A1,5)-REF(EMA(A1,5),1))/REF(EMA(A1,5),1)*1;
A5:=(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))*1;
DRAWTEXT(CROSS(A1,EMA(A1,5))AND EMA(A1,5)<A5,LOW,' \n \n \n \n \n黑马'),COLORYELLOW;
{变盘--上涨、下跌--少爷修改}
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,10),1)),LOW,' \n \n \n \n \n 变盘'),ALIGN0,COLORYELLOW;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.0,' 下跌'),ALIGN0,COLOR00FF00;
{大胆博、加仓}
VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);
VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);
DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),' \n \n \n大胆搏 '),COLOR00FFFF;
DRAWTEXT(FILTER((VAR4AA>90),35),(LOW),' \n \n \n \n★加仓'),COLOR00FFFF;
{超准短进—风险、减仓、出局、短进、见底}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);
主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3),2);
散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20),7);
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
动能趋势线:=100*EMA((CLOSE-VAR2)/(VAR3-VAR2),4);
{DRAWTEXT(CROSS(动能趋势线,70),HIGH*1.02,'风险'),colorgreen;}
DRAWTEXT(CROSS(动能趋势线,80),HIGH*1.02,' \n减仓'),COLOR00FF00;
{DRAWTEXT(CROSS(动能趋势线,87.5),HIGH*1.02,'出局'),colorwhite;}
DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW,' \n \n短进'),COLORFF00FF;
DRAWICON(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW,1);
DRAWTEXT(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW,'见底'),colorred;
{各星解盘}
显示解盘文字(收盘价>0,'〓 K 线形态分析 〓 '),colorFFFFFF;
★早晨之星:=向前引用(收盘价,2)/向前引用(开盘价,2)<0.95 AND 向前引用(开盘价,1)<向前引用(收盘价,2) AND (绝对值(向前引用(开盘价,1)-向前引用(收盘价,1)))/向前引用(收盘价,1)<0.03 AND 收盘价/开盘价>1.05 AND 收盘价>向前引用(收盘价,2);
★黄昏之星:=向前引用(收盘价,2)/向前引用(开盘价,2)>1.03 AND 向前引用(开盘价,1)>向前引用(收盘价,2) AND (绝对值(向前引用(开盘价,1)-向前引用(收盘价,1)))/向前引用(收盘价,1)<0.02 AND 收盘价/开盘价<0.97 AND 收盘价<向前引用(收盘价,2);
★长十字:=收盘价=开盘价 AND 最高价/最低价>1.03;
★垂死十字:=收盘价=开盘价 AND 收盘价=最低价 AND 收盘价<>最高价;
★早晨十字星:=向前引用(收盘价,2)/向前引用(开盘价,2)<0.95 AND 向前引用(开盘价,1)<向前引用(收盘价,2) AND 向前引用(开盘价,1)=向前引用(收盘价,1) AND 收盘价/开盘价>1.05 AND 收盘价>向前引用(收盘价,2);
★黄昏十字星:=向前引用(收盘价,2)/向前引用(开盘价,2)>1.05 AND 向前引用(开盘价,1)>向前引用(收盘价,2) AND 向前引用(开盘价,1)=向前引用(收盘价,1) AND 收盘价/开盘价<0.95 AND 收盘价<向前引用(收盘价,2);
★射击之星:=最小值(开盘价,收盘价)=最低价 AND 最高价-最低价>3*(最大值(开盘价,收盘价)-最低价) AND 收盘价>简单移动平均(收盘价,5);
★倒转锤头:=最小值(开盘价,收盘价)=最低价 AND 最高价-最低价>3*(最大值(开盘价,收盘价)-最低价) AND 收盘价<简单移动平均(收盘价,5);
★锤头:=最高价=最大值(开盘价,收盘价) AND 最高价-最低价>3*(最高价-最小值(开盘价,收盘价)) AND 收盘价<简单移动平均(收盘价,5);
★吊颈:=最高价=最大值(开盘价,收盘价) AND 最高价-最低价>3*(最高价-最小值(开盘价,收盘价)) AND 收盘价>简单移动平均(收盘价,5);
★穿头破脚:=向前引用(收盘价,1)/向前引用(开盘价,1)>1.03 AND 收盘价/开盘价<0.96 AND 收盘价<向前引用(开盘价,1) AND 开盘价>向前引用(收盘价,1) OR 向前引用(收盘价,1)/向前引用(开盘价,1)<0.97 AND 收盘价/开盘价>1.04 AND 收盘价>向前引用(开盘价,1) AND 开盘价<向前引用(收盘价,1);
★乌云盖顶:=向前引用(收盘价,1)/向前引用(开盘价,1)>1.03 AND 收盘价/开盘价<0.97 AND 开盘价>向前引用(收盘价,1) AND 收盘价<向前引用(收盘价,1);
★曙光初现:=向前引用(收盘价,1)/向前引用(开盘价,1)<0.97 AND 收盘价/开盘价>1.03 AND 开盘价<向前引用(收盘价,1) AND 收盘价>向前引用(收盘价,1);
★身怀六甲:=(绝对值(向前引用(收盘价,1)-向前引用(开盘价,1)))/向前引用(收盘价,1)>0.04 AND (绝对值(收盘价-开盘价))/收盘价<0.005 AND 最大值(收盘价,开盘价)<最大值(向前引用(收盘价,1),向前引用(开盘价,1)) AND 最小值(收盘价,开盘价)>最小值(向前引用(收盘价,1),向前引用(开盘价,1));
★十字胎:=(绝对值(向前引用(收盘价,1)-向前引用(开盘价,1)))/向前引用(收盘价,1)>0.04 AND 收盘价=开盘价 AND 收盘价<最大值(向前引用(收盘价,1),向前引用(开盘价,1)) AND 收盘价>最小值(向前引用(收盘价,1),向前引用(开盘价,1));
★平顶:=(绝对值(最高价-向前引用(最高价,1)))/最高价<0.001;
★平底:=(绝对值(最低价-向前引用(最低价,1)))/最低价<0.001 AND (绝对值(向前引用(最低价,1)-向前引用(最低价,2)))/向前引用(最低价,1)<=0.001;
★大阳烛:=收盘价/开盘价>1.05 AND 最高价/最低价<收盘价/开盘价+0.018;
★红三兵:=向前引用(收盘价,2)>向前引用(开盘价,2) AND 向前引用(收盘价,1)>向前引用(开盘价,1) AND 收盘价>开盘价 AND 向前引用(收盘价,1)>向前引用(收盘价,2) AND 收盘价>向前引用(收盘价,1);
★双飞乌鸦:=向前引用(收盘价,1)<向前引用(开盘价,1) AND 收盘价<开盘价 AND 收盘价/开盘价<0.98;
★孕育线:=向前引用(收盘价,2)>向前引用(开盘价,2) AND (向前引用(收盘价,2)-向前引用(开盘价,2))/向前引用(开盘价,2)>=2/100 AND 向前引用(开盘价,1)>=向前引用(收盘价,1) AND (向前引用(开盘价,1)-向前引用(收盘价,1))/向前引用(收盘价,1)<=2/100 AND 向前引用(开盘价,1)<=向前引用(收盘价,2) AND 向前引用(收盘价,1)>=向前引用(开盘价,2) AND 收盘价>=开盘价 AND (收盘价-开盘价)/开盘价>=2/100 AND 收盘价>=向前引用(开盘价,1) AND 开盘价<=向前引用(收盘价,1) AND (最大值(收盘价,向前引用(收盘价,2))-最小值(收盘价,向前引用(收盘价,2)))/最小值(收盘价,向前引用(收盘价,2))<=1/100;
★多方炮:=向前引用(收盘价,2)>向前引用(开盘价,2) AND 向前引用(收盘价,1)<向前引用(开盘价,1) AND 收盘价>开盘价;
★出水芙蓉:=(开盘价<指数平滑移动平均(收盘价,20) OR 开盘价<指数平滑移动平均(收盘价,40) OR 开盘价<指数平滑移动平均(收盘价,60)) AND 收盘价>最大值(指数平滑移动平均(收盘价,20),最大值(指数平滑移动平均(收盘价,40),指数平滑移动平均(收盘价,60))) AND 成交量/简单移动平均(成交量,30)>1.2 AND 收盘价/向前引用(收盘价,1)>1.049;
★上升三部曲:=向前引用(收盘价,4)/向前引用(开盘价,4)>1.03 AND 向前引用(收盘价,3)<向前引用(开盘价,3) AND 向前引用(收盘价,2)<向前引用(开盘价,2) AND 向前引用(收盘价,1)<向前引用(开盘价,1) AND 向前引用(最低价,4)<向前引用(最低价,3) AND 向前引用(最低价,4)<向前引用(最低价,2) AND 向前引用(最低价,4)<向前引用(最低价,1) AND 向前引用(最高价,4)>向前引用(最高价,3) AND 向前引用(最高价,4)>向前引用(最高价,2) AND 向前引用(最高价,4)>向前引用(最高价,1) AND 收盘价/开盘价>1.03 AND 收盘价>向前引用(收盘价,4);
★下跌三部曲:=向前引用(收盘价,4)/向前引用(开盘价,4)<0.97 AND 向前引用(收盘价,3)>向前引用(开盘价,3) AND 向前引用(收盘价,2)>向前引用(开盘价,2) AND 向前引用(收盘价,1)>向前引用(开盘价,1) AND 向前引用(最低价,4)<向前引用(最低价,3) AND 向前引用(最低价,4)<向前引用(最低价,2) AND 向前引用(最低价,4)<向前引用(最低价,1) AND 向前引用(最高价,4)>向前引用(最高价,3) AND 向前引用(最高价,4)>向前引用(最高价,2) AND 向前引用(最高价,4)>向前引用(最高价,1) AND 收盘价/开盘价<0.97 AND 收盘价<向前引用(收盘价,4);
★跳空缺口:=最高价<向前引用(最低价,1) OR 最低价>向前引用(最高价,1);
★三只乌鸦:=向前引用(收盘价,2)<向前引用(开盘价,2) AND 向前引用(收盘价,1)<向前引用(开盘价,1) AND 收盘价<开盘价 AND 向前引用(收盘价,1)<向前引用(收盘价,2) AND 收盘价<向前引用(收盘价,1);
★光脚阴线:=最低价=收盘价 AND 最高价<>最低价;
★光头阳线:=最高价=收盘价 AND 最高价<>最低价;
★分离:=开盘价=向前引用(开盘价,1) AND (收盘价-开盘价)*(向前引用(收盘价,1)-向前引用(开盘价,1))<0;
★长下影:=(最小值(收盘价,开盘价)-最低价)/(最高价-最低价)>0.667;
★长上影:=(最高价-最大值(收盘价,开盘价))/(最高价-最低价)>0.667;
★十字星:=收盘价=开盘价 AND 最高价<>最低价;
★大阴烛:=开盘价/收盘价>1.05 AND 最高价/最低价<开盘价/收盘价+0.018;
★好友反攻:=向前引用(收盘价,1)<向前引用(开盘价,1) AND 收盘价>开盘价 AND (绝对值(收盘价-向前引用(收盘价,1)))/收盘价<0.002 OR 向前引用(收盘价,1)>向前引用(开盘价,1) AND 收盘价<开盘价 AND (绝对值(收盘价-向前引用(收盘价,1)))/收盘价<0.002;
★倾盆大雨:=向前引用(收盘价,1)/向前引用(开盘价,1)>=1.03 AND 开盘价<向前引用(收盘价,1) AND 开盘价>向前引用(开盘价,1) AND 收盘价<向前引用(开盘价,1);
显示解盘文字(★倾盆大雨,'★倾盆大雨★见顶信号;'),colorFFFF00;
显示解盘文字(★大阴烛,'★大阴烛★后市向淡,发生逆转;'),colorFFFF00;
显示解盘文字(★好友反攻,'★好友反攻★底部反转;'),colorFF;
显示解盘文字(★跳空缺口,'★跳空缺口★注意向上还是向下跳空;'),colorFFFFFF;
显示解盘文字(★光脚阴线,'★光脚阴线★下跌信号;'),colorFFFF00;
显示解盘文字(★光头阳线,'★光头阳线★后市看涨;'),colorFF;
显示解盘文字(★三只乌鸦,'★三只乌鸦★可能见顶回落;'),colorFFFF00;
显示解盘文字(★分离,'★分离★注意看涨分离和看跌分离;'),colorFFFFFF;
显示解盘文字(★长下影,'★长下影★持续下跌后出现,有可能止跌回升;在升势末期出现,须多加留意;'),colorFF;
显示解盘文字(★长上影,'★长上影★表明行情上档压力沉重,升势受阻;'),colorFFFF00;
显示解盘文字(★下跌三部曲,'★下跌三部曲★下跌信号;'),colorFF;
显示解盘文字(★上升三部曲,'★上升三部曲★上涨信号;'),colorFFFF00;
显示解盘文字(★早晨之星,'★早晨之星★见底回升;'),colorFF;
显示解盘文字(★黄昏之星,'★黄昏之星★见顶回落;'),colorFFFF00;
显示解盘文字(★十字星,'★十字星★有转向意味,注意股价位置在顶部还是底部;'),colorFFFFFF;
显示解盘文字(★长十字,'★长十字★注意在顶部还是底部;'),colorFFFFFF;
显示解盘文字(★垂死十字,'★垂死十字★下跌信号;'),colorFFFF00;
显示解盘文字(★早晨十字星,'★早晨十字星★上涨信号,见底回升;'),colorFF;
显示解盘文字(★黄昏十字星,'★黄昏十字星★下跌信号,见顶回落;'),colorFFFF00;
显示解盘文字(★射击之星,'★射击之星★可能见顶回落,可靠性低;'),colorFFFF00;
显示解盘文字(★倒转锤头,'★倒转锤头★可能见底回升;'),colorFF;
显示解盘文字(★锤头,'★锤头★可能见底回升,如有量配合,信号强烈;'),colorFF;
显示解盘文字(★吊颈,'★吊颈★上升行情中见顶回落,顶部出现,见顶信号;'),colorFFFF00;
显示解盘文字(★平顶,'★平顶★温和的反转;'),colorFFFF00;
显示解盘文字(★穿头破脚,'★穿头破脚★顶部出现,见顶回落信号;'),colorFFFF00;
显示解盘文字(★乌云盖顶,'★乌云盖顶★见顶回落信号;'),colorFFFF00;
显示解盘文字(★曙光初现,'★曙光初现★后市见底回升;'),colorFF;
显示解盘文字(★身怀六甲,'★身怀六甲★出现在底部,是见底回升信号;出现在顶部,是见顶回落信号;'),colorFF;
显示解盘文字(★十字胎,'★十字胎★'),colorFF;
显示解盘文字(★平底,'★平底★温和的反转;'),colorFF;
显示解盘文字(★大阳烛,'★大阳烛★看涨;'),colorFF;
显示解盘文字(★红三兵,'★红三兵★每日收盘价上移,表示可能见底回升;'),colorFF;
显示解盘文字(★双飞乌鸦,'★双飞乌鸦★行情将见顶回落;'),colorFFFF00;
显示解盘文字(★孕育线,'★孕育线★注意股价位置;'),colorFFFFFF;
显示解盘文字(★多方炮,'★多方炮★在底部出现有上涨可能,在中间出现有可能是
上涨中继,顶部出现是复合见顶信号;'),colorFF;
显示解盘文字(★出水芙蓉,'★出水芙蓉★见底回升;'),colorFF;
A001:=收盘价-向前引用(收盘价,6);
A002:=简单移动平均(A001,6);
A003:=(收盘价-最低值(最低价,9))/(最高值(最高价,9)-最低值(最低价,9))*100;
A004:=移动平均(A003,3,1);
A005:=移动平均(A004,3,1);
A006:=指数平滑移动平均(3*A004-2*A005,2);
A007:=(最高价+最低价+收盘价)/3;
A008:=(A007-简单移动平均(A007,14))/(0.015*平均绝对偏差(A007,14))/2;
A009:=(A008+指数平滑移动平均((-100*(最高值(最高价,14)-收盘价)/(最高值(最高价,14)-最低值(最低价,14))+100)/100,3)*200-100)/2;
A010:=A009-向前引用(A009,14);
A011:=A009-向前引用(A009,26);
A012:=(A009+A010+A011)/3;
KKM:=指数平滑移动平均(A012,4);
A013:=最高值(最高价,34);
A014:=(2*收盘价+最高价+最低价)/4;
A015:=最低值(最低价,34);
A016:=指数平滑移动平均((A014-A015)/(A013-A015)*100,13);
A017:=指数平滑移动平均(0.667*向前引用(A016,1)+0.333*A016,2);
KKMD:=A016-A017>1 AND A016<30 AND A017<30;
KKML:=A016-A017<0 AND A016>80 AND A017>80 AND 向前引用(A016-A017,1)>0;
KKMQ:=统计总数(A016-A017>0,2)=2;
KKAL:=A016-A017<0;
生命线:=简单移动平均(收盘价,20);
取舍线:=简单移动平均(收盘价,10);
画解盘图标(KKMD,4);
画解盘图标(KKAL,1);
显示解盘文字(KKMD,'最佳买入时机');
显示解盘文字(KKML,'最佳卖出时机');
显示解盘文字(KKMQ,'持仓区');
显示解盘文字(KKAL,'空仓区');
显示解盘文字(收盘价/向前引用(收盘价,1)>对应大盘收盘价/向前引用(对应大盘收盘价,1),'该股强于大盘');
显示解盘文字(收盘价/向前引用(收盘价,1),'该股强于大盘');
显示解盘文字(交叉函数(简单移动平均(收盘价,5),简单移动平均(收盘价,10)),'可出手');
显示解盘文字(交叉函数(简单移动平均(收盘价,10),简单移动平均(收盘价,5)),'收手了');
显示解盘文字(KKM>指数平滑移动平均(KKM,4) AND KKM>向前引用(KKM,1),'快速介入');
显示解盘文字(KKM>指数平滑移动平均(KKM,4) AND KKM<向前引用(KKM,1),'休息观望~');
显示解盘文字(KKM<指数平滑移动平均(KKM,4) AND KKM>向前引用(KKM,1),'有防御能力');
显示解盘文字(KKM<指数平滑移动平均(KKM,4) AND KKM<向前引用(KKM,1),'风险较大');
{涨跌停指标}
kk:=DYNAINFO( 3);
GGC:=kk*0.10;
Y:=kk+GGC;
U:=kk-GGC;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,1,30,960,' ████████████'),colorFFCCFF;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,1,30,960,' ▲涨停价:'+NUMTOSTR(Y,2)),Color0000CC;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,1,30,1000,' ████████████'),colorFFFFFF;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,1,30,1000,' ▼跌停价:'+NUMTOSTR(U,2)),Color006600;
DRAWTEXTEX(CLOSE,1,800,1000, STKLABEL+' '+STKNAME+' '),LINETHICK8,COLOR00CCFF;
{资金量买卖}
WJ:=(HIGH+LOW+CLOSE)/3;
VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ);
VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN));
VD5:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
VD6:=(VD1*VD5);
VD7:=(VD2*VD5);
VD8:=(VD3*VD5);
VD9:=(VD4*VD5);
买入量:=(VD9+VD8);
卖出量:=(VD6+VD7);
买入资金:=买入量*CLOSE/100;
卖出资金:=卖出量*CLOSE/100;
资金进出:=买入资金-卖出资金;
买卖资金比:=买入资金/卖出资金;
DRAWTEXTEX(CLOSE,1,50,70,' ▼买入万元: '+NUMTOSTR(买入资金,2))Colorred,LINETHICK1;
DRAWTEXTEX(CLOSE,1,50,100,' ▲卖出万元: '+NUMTOSTR(卖出资金,2))Color00ff00,LINETHICK1;
DRAWTEXTEX(CLOSE,1,50,130,' ★进出万元: '+NUMTOSTR(资金进出,2))Coloryellow,LINETHICK1;
{主力持仓}
jj:=(HIGH+LOW+CLOSE)/3;qj0:=AMOUNT/IF(HIGH=LOW,4,HIGH-LOW);
买1:=qj0*(MIN(OPEN,CLOSE)-LOW);
买2:=qj0*(jj-MIN(CLOSE,OPEN));
卖1:=qj0*(MAX(CLOSE,OPEN)-jj);
卖2:=qj0*(HIGH-MAX(OPEN,CLOSE));
DT:=((买1+买2)-(卖1+卖2))/10000;
DRAWTEXTEX(DT>0,0,200,30,'主力增:'+NUMTOSTR(DT,2)+' 万元'),COLOR00FFFF;
DRAWTEXTEX(DT<0,0,200,30,'主力减:'+NUMTOSTR(DT,2)+' 万元'),COLOR00FF00;
{散户持仓}
jj:=(HIGH+LOW+CLOSE)/3;qj0:=AMOUNT/IF(HIGH=LOW,4,HIGH-LOW);
TD1:=qj0*(MIN(OPEN,CLOSE)-LOW);DD1:=qj0*(jj-MIN(CLOSE,OPEN));
DD2:=qj0*(HIGH-MAX(OPEN,CLOSE));TD2:=qj0*(MAX(CLOSE,OPEN)-jj);
td:=TD1-TD2;da:=DD1-DD2;xd1:=1-(TD1+DD1);xd2:=1-(TD2+DD2);
tz:=VOL/SUM(VOL,60)*100;DT:=((xd1-xd2)/10000)/tz;
DRAWTEXTEX(DT>0,0,200,50,'散户增:'+NUMTOSTR(DT,2)+' 万元'),COLOR00FFFF;
DRAWTEXTEX(DT<0,0,200,50,'散户减:'+NUMTOSTR(DT,2)+' 万元'),COLOR00FF00;