操盘趋势
DRAWGBK((CLOSE > 0),COLORRGB(0,0,30),COLORRGB(0,130,100),1);
{BS}
a:="LTFunc5@FORLT2";
s1:="LTFunc5@LT_S1";
hs:="LTFunc5@LT_HS";
ls:="LTFunc5@LT_LS";
p1:="LTFunc5@LT_P1";
upp:="LTFunc5@LT_UPP";
udd:="LTFunc5@LT_UDD";
DRAWICON(p1=1 and ref(p1,1)=0,l*0.985,'buy1');
DRAWICON(p1=0 and ref(p1,1)=1,h*1.03,'sell1');
DRAWICON(s1=1 and ref(s1,1)=0 and (p1+ref(p1,1))<>1,l*0.995,'bs');
DRAWICON(s1=0 and ref(s1,1)=1 and (p1+ref(p1,1))<>1,h*1.01,'ss');
{MACD}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A:=HHV(DIFF,300);
B:=MACD-REF(MACD,1);
K1:=SYSPARAM(3)-SYSPARAM(2)+1;
DIFF1:=HHV(DIFF,K1);
DEA1:=HHV(DEA,K1);
MACD1:=HHV(MACD,K1);
DIFF2:=LLV(DIFF,K1);
DEA2:=LLV(DEA,K1);
MACD2:=LLV(MACD,K1);
MXA:=MAX(DIFF1[DATACOUNT],MAX(DEA1[DATACOUNT],MACD1[DATACOUNT]));
MNA:=MIN(DIFF2[DATACOUNT],MIN(DEA2[DATACOUNT],MACD2[DATACOUNT]));
A2:=(MXA+MNA)/2;
A3:=MXA-MNA;
H1:=HHV(HIGH,K1);
L1:=LLV(LOW,K1);
MXB:=H1[DATACOUNT];
MNB:=L1[DATACOUNT];
B2:=(MXB+MNB)/2;
B3:=MXB-MNB;
DIFFA:=(DIFF-A2)*B3/A3+B2;
DEAA:=(DEA-A2)*B3/A3+B2;
MACDA:=(MACD-A2)*B3/A3+B2;
B4:=-A2*B3/A3+B2;
STICKLINE(MACD>0 AND B>0,B4,MACDA,10,0),color91B5;
STICKLINE(MACD>0 AND B<0,B4,MACDA,10,0),colorA9B5;
STICKLINE(MACD<0 AND B>0,B4,MACDA,10,0),colorB0B07A;
STICKLINE(MACD<0 AND B<0,B4,MACDA,10,0),color8EB03A;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,B4,B4+B3/20,6,0),colorFFFF;
DRAWTEXT(低位金叉,B4+B3/20,' 低位金叉'),colorFFFF;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,B4,B4-B3/40,2,0),colorFF00FF;
DRAWTEXT(二次金叉,B4-B3/40,' 二次金叉'),ALIGN0,colorFF00FF;
{操盘线}
MAA:=MA(C,3);
MAB:=MA(C,8);
FILLRGN(MAA<MAB,MAA,MAB),COLORGREEN;
FILLRGN(MAA>MAB,MAA,MAB),color4440FF;
生命线:sum(vol*(o+c)/2,88)/sum(vol,88),colorff80ff,linethick2;
分离线:MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1)),colorf4e202,linethick2;
MA17:MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1),linethick2,colorf4e202;
持股线:IF(MA(CLOSE,17)<MA17,MA17,MA(CLOSE,17)),color00d500;
PARTLINE(持股线=MA17,持股线),color80ffff,linethick2;
UPPERL: MA(HIGH,15)*(1+15/130),coloryellow,linethick3;
LOWERL: MA(LOW,15)*(1-15/130),colorred,linethick3;
{立体K线}
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000ff;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000ff;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),colorcyan;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),colorcyan;
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,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
{底买入}
TYP_D:= (HIGH + LOW + CLOSE)/3;
CC1_D:=(TYP_D-MA(TYP_D,14))/(0.015*AVEDEV(TYP_D,14));
C1_D:=SMA(CC1_D,3,1);
C2_D:=SMA(C1_D,3,1);
C3_D:=3*C1_D-2*C2_D;
CB1_D:=EMA(C3_D,5);
LC_D:= REF(CLOSE,1);
RSI1_D:=SMA(MAX(CLOSE-LC_D,0),6,1)/SMA(ABS(CLOSE-LC_D),6,1)*100;
RSI_D:=(RSI1_D-50)*5;
R1_D:=SMA(RSI_D,3,1);
D1_D:=SMA(R1_D,3,1);
J1_D:=3*R1_D-2*D1_D;
RR1_D:=EMA(J1_D,5);
RR2_D:=REF(RR1_D,1);
RR_D:=RR1_D>RR2_D;
RSV_D:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K_D:=SMA(RSV_D,3,1);
K1_D:=(K_D-50)*5;
K2_D:=SMA(K1_D,3,1);
D2_D:=SMA(K2_D,3,1);
J2_D:=3*K2_D-2*D2_D;
BB1_D:=EMA(J2_D,5);
底买入:=RR_D AND NOT(REF(RR_D,1)) AND (RR1_D<-100 AND BB1_D<-100) AND CB1_D<-100;
STICKLINE(底买入,CLOSE ,OPEN,7,0),colorAA00BB;
STICKLINE(底买入,CLOSE ,OPEN,6,0),colorBB11BB;
STICKLINE(底买入,CLOSE ,OPEN,4,0),colorCC22BB;
STICKLINE(底买入,CLOSE ,OPEN,3,0),colorDD33BB;
STICKLINE(底买入,CLOSE ,OPEN,2,0),colorEE44BB;
STICKLINE(底买入,CLOSE ,OPEN,1,0),colorFF55BB;
{短线强势}
流通:=(AMOUNT / VOL);
资金流量:=(close-ref(close,1))*流通;
Var111:=SMA(资金流量,10,1);
MID1:=MA(Var111,26);
UPPER:=MID1 + 2*STD(Var111,26);
短线强势:=CROSS(Var111,UPPER) and C>=O;
STICKLINE(短线强势,CLOSE ,OPEN,7,0),colorAAFF;
STICKLINE(短线强势,CLOSE ,OPEN,5.6,0),colorBBFF;
STICKLINE(短线强势,CLOSE ,OPEN,4.4,0),colorCCFF;
STICKLINE(短线强势,CLOSE ,OPEN,3.3,0),colorDDFF;
STICKLINE(短线强势,CLOSE ,OPEN,2.2,0),colorEEFF;
STICKLINE(短线强势,CLOSE ,OPEN,1.1,0),colorFFFF;
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);
DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),ColorA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),Color1880FF;
DRAWTEXT(CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,L,'★K'),coloryellow;
DRAWTEXT(CROSS("MACD.DEA#WEEK"(12,26,9),"MACD.DIFF#WEEK"(12,26,9)) ,L,'☆M'),coloryellow;
DRAWTEXTEX(c,1,5,10,'所属板块:' + BLKNAME),ALIGN4,colorred;
DD:=FINANCE( 1);
SS:=FINANCE( 7);
BL:=SS/DD*100;
GG:=FINANCE(33);
TH:=DYNAINFO(39);
JZ:=FINANCE(34);
DRAWTEXTEX(c,1,5,70,'总股本:'+NUMTOSTR(DD,0)+'万股' +' 流通A股:'
+NUMTOSTR(SS,0)+'万股'+' 流通比例:'+NUMTOSTR(BL,3)+'%'+' 市盈率:'
+NUMTOSTR(TH,2)+' 倍'+' 收益:'+NUMTOSTR(GG,3)+' 元'+' 净资产:'
+NUMTOSTR(JZ,3)+' 元'),COLORGREEN;
Explain(ref(open,1)<>ref(close,1) and 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),'\n* 黄昏之星 -空方势盛 反转信号 跳空成弃婴'),colorwhite;
Explainicon(ref(open,1)<>ref(close,1) and 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),'30'),align0;
Explain(ref(open,1)<>ref(close,1) and 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),'\n* 晨星 -多方势盛 变盘信号'),colorwhite;
Explainicon(ref(open,1)<>ref(close,1) and 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),'13'),align0;
Explain(MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5),'\n* 倒转槌头 -高位抛压 低位多空争执'),colorwhite;
Explainicon(MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5),'19'),align0 |