主图
用到划线支撑压力划线函数不想看到这个函数的话可自行删除
涨停:=IF(CODELIKE('688') OR (CODELIKE('300') AND DATE>=1200824),(C>=ZTPRICE(REF(CLOSE,1),0.1995) AND C=H)
,(C>=ZTPRICE(REF(CLOSE,1),0.0995) AND C=H));
STICKLINE(涨停,OPEN,CLOSE,2,1),COLORFF00FF;
STICKLINE(涨停,OPEN,CLOSE,3,1),COLORFF00FF;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLOR00FFFF COLORRED;
马线:MA(牛线,3),COLOR0000FF COLORGREEN; ;
DRAWBAND(牛线,RGB(250,255,0),马线,RGB(0,0,250));
{顶底线}
顶:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,HHV(H,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;
低:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,LLV(L,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;
STICKLINE(CCI>=200 AND H>=顶,O,C,3,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低,O,C,3,0),COLORYELLOW;
显强势板块1:=1;
X_1:=30;
{======显示位置的数据自己根据需要进行上下左右调整======}
四排位置:=0.028;
横向左右位置:=0.005;
{============}
煤炭A:=("880301$C"-REF("880301$C",1))/REF("880301$C",1)*100;
电力A:=("880305$C"-REF("880305$C",1))/REF("880305$C",1)*100;
石油A:=("880310$C"-REF("880310$C",1))/REF("880310$C",1)*100;
钢铁A:=("880318$C"-REF("880318$C",1))/REF("880318$C",1)*100;
有色A:=("880324$C"-REF("880324$C",1))/REF("880324$C",1)*100;
化纤A:=("880330$C"-REF("880330$C",1))/REF("880330$C",1)*100;
化工A:=("880335$C"-REF("880335$C",1))/REF("880335$C",1)*100;
建材A:=("880344$C"-REF("880344$C",1))/REF("880344$C",1)*100;
造纸A:=("880350$C"-REF("880350$C",1))/REF("880350$C",1)*100;
矿物制品A:=("880351$C"-REF("880351$C",1))/REF("880351$C",1)*100;
日用化工A:=("880355$C"-REF("880355$C",1))/REF("880355$C",1)*100;
农林牧渔A:=("880360$C"-REF("880360$C",1))/REF("880360$C",1)*100;
纺织服饰A:=("880367$C"-REF("880367$C",1))/REF("880367$C",1)*100;
食品饮料A:=("880372$C"-REF("880372$C",1))/REF("880372$C",1)*100;
酿酒A:=("880380$C"-REF("880380$C",1))/REF("880380$C",1)*100;
家用电器A:=("880387$C"-REF("880387$C",1))/REF("880387$C",1)*100;
汽车类A:=("880390$C"-REF("880390$C",1))/REF("880390$C",1)*100;
医疗保健A:=("880398$C"-REF("880398$C",1))/REF("880398$C",1)*100;
家居用品A:=("880399$C"-REF("880399$C",1))/REF("880399$C",1)*100;
医药A:=("880400$C"-REF("880400$C",1))/REF("880400$C",1)*100;
商业连锁A:=("880406$C"-REF("880406$C",1))/REF("880406$C",1)*100;
商贸代理A:=("880414$C"-REF("880414$C",1))/REF("880414$C",1)*100;
传媒娱乐A:=("880418$C"-REF("880418$C",1))/REF("880418$C",1)*100;
广告包装A:=("880421$C"-REF("880421$C",1))/REF("880421$C",1)*100;
文教休闲A:=("880422$C"-REF("880422$C",1))/REF("880422$C",1)*100;
酒店餐饮A:=("880423$C"-REF("880423$C",1))/REF("880423$C",1)*100;
旅游A:=("880424$C"-REF("880424$C",1))/REF("880424$C",1)*100;
航空航天A:=("880430$C"-REF("880430$C",1))/REF("880430$C",1)*100;
船舶A:=("880431$C"-REF("880431$C",1))/REF("880431$C",1)*100;
运输设备A:=("880432$C"-REF("880432$C",1))/REF("880432$C",1)*100;
通用机械A:=("880437$C"-REF("880437$C",1))/REF("880437$C",1)*100;
工业机械A:=("880440$C"-REF("880440$C",1))/REF("880440$C",1)*100;
电气设备A:=("880446$C"-REF("880446$C",1))/REF("880446$C",1)*100;
工程机械A:=("880447$C"-REF("880447$C",1))/REF("880447$C",1)*100;
电器仪表A:=("880448$C"-REF("880448$C",1))/REF("880448$C",1)*100;
电信运营A:=("880452$C"-REF("880452$C",1))/REF("880452$C",1)*100;
公共交通A:=("880453$C"-REF("880453$C",1))/REF("880453$C",1)*100;
水务A:=("880454$C"-REF("880454$C",1))/REF("880454$C",1)*100;
供气供热A:=("880455$C"-REF("880455$C",1))/REF("880455$C",1)*100;
环境保护A:=("880456$C"-REF("880456$C",1))/REF("880456$C",1)*100;
运输服务A:=("880459$C"-REF("880459$C",1))/REF("880459$C",1)*100;
仓储物流A:=("880464$C"-REF("880464$C",1))/REF("880464$C",1)*100;
交通设施A:=("880465$C"-REF("880465$C",1))/REF("880465$C",1)*100;
银行类A:=("880471$C"-REF("880471$C",1))/REF("880471$C",1)*100;
证券类A:=("880472$C"-REF("880472$C",1))/REF("880472$C",1)*100;
保险类A:=("880473$C"-REF("880473$C",1))/REF("880473$C",1)*100;
多元金融A:=("880474$C"-REF("880474$C",1))/REF("880474$C",1)*100;
建筑A:=("880476$C"-REF("880476$C",1))/REF("880476$C",1)*100;
房地产A:=("880482$C"-REF("880482$C",1))/REF("880482$C",1)*100;
电脑设备A:=("880489$C"-REF("880489$C",1))/REF("880489$C",1)*100;
通信设备A:=("880490$C"-REF("880490$C",1))/REF("880490$C",1)*100;
半导体A:=("880491$C"-REF("880491$C",1))/REF("880491$C",1)*100;
元器件A:=("880492$C"-REF("880492$C",1))/REF("880492$C",1)*100;
软件服务A:=("880493$C"-REF("880493$C",1))/REF("880493$C",1)*100;
互联网A:=("880494$C"-REF("880494$C",1))/REF("880494$C",1)*100;
综合类A:=("880497$C"-REF("880497$C",1))/REF("880497$C",1)*100;
最大值1A:=MAX(煤炭A,MAX(电力A,MAX(石油A,MAX(钢铁A,MAX(有色A,MAX(化纤A,MAX(化工A,MAX(建材A,MAX(造纸A,MAX(矿物制品A,日用化工A))))))))));
最大值2A:=MAX(农林牧渔A,MAX(纺织服饰A,MAX(食品饮料A,MAX(酿酒A,MAX(家用电器A,MAX(汽车类A,MAX(医疗保健A,MAX(家居用品A,MAX(医药A,MAX(商业连锁A,商贸代理A))))))))));
最大值3A:=MAX(传媒娱乐A,MAX(广告包装A,MAX(文教休闲A,MAX(酒店餐饮A,MAX(旅游A,MAX(航空航天A,MAX(船舶A,MAX(运输设备A,MAX(通用机械A,MAX(工业机械A,电气设备A))))))))));
最大值4A:=MAX(工程机械A,MAX(电器仪表A,MAX(电信运营A,MAX(公共交通A,MAX(水务A,MAX(供气供热A,MAX(环境保护A,MAX(运输服务A,MAX(仓储物流A,MAX(交通设施A,银行类A))))))))));
最大值5A:=MAX(证券类A,MAX(保险类A,MAX(多元金融A,MAX(建筑A,MAX(房地产A,MAX(电脑设备A,MAX(通信设备A,MAX(半导体A,MAX(元器件A,MAX(软件服务A,MAX(互联网A,综合类A)))))))))));
ZZDZ:=CONST(MAX(最大值1A,MAX(最大值2A,MAX(最大值3A,MAX(最大值4A,最大值5A)))));
DRAWTEXT_FIX(显强势板块1=1,横向左右位置,四排位置,0,' ████████████████'),COLORRED;
XSWZ1:=CONST(IF(ZZDZ-煤炭A=0 OR ZZDZ-电力A=0 OR ZZDZ-石油A=0 OR ZZDZ-钢铁A=0 OR ZZDZ-有色A=0 OR ZZDZ-化纤A=0 OR ZZDZ-化工A=0 OR ZZDZ-建材A=0 OR ZZDZ-造纸A=0 OR ZZDZ-旅游A=0 OR ZZDZ-船舶A=0 OR ZZDZ-水务A=0 OR ZZDZ-建筑A=0 OR ZZDZ-医药A=0,614,IF(ZZDZ-汽车类A=0 OR ZZDZ-银行类A=0 OR ZZDZ-证券类A=0 OR ZZDZ-保险类A=0 OR ZZDZ-房地产A=0 OR ZZDZ-半导体A=0 OR ZZDZ-元器件A=0 OR ZZDZ-互联网A=0 OR ZZDZ-综合类A=0,627,643)));
DRAWTEXT_FIX(ISLASTBAR AND 显强势板块1=1,横向左右位置,四排位置,0,IF(ZZDZ-煤炭A=0,'【今强势板块】:煤炭行业',IF(ZZDZ-电力A=0,'【今强势板块】:电力行业',IF(ZZDZ-石油A=0,'【今强势板块】:石油行业',IF(ZZDZ-钢铁A=0,'【今强势板块】:钢铁行业',IF(ZZDZ-有色A=0,'【今强势板块】:有色行业',IF(ZZDZ-化纤A=0,'【今强势板块】:化纤行业',IF(ZZDZ-化工A=0,'【今强势板块】:化工行业',IF(ZZDZ-建材A=0,'【今强势板块】:建材行业',IF(ZZDZ-造纸A=0,'【今强势板块】:造纸行业',IF(ZZDZ-矿物制品A=0,'【今强势板块】:矿物制品',IF(ZZDZ-日用化工A=0,'【今强势板块】:日用化工',
IF(ZZDZ-农林牧渔A=0,'【今强势板块】:农林牧渔',IF(ZZDZ-纺织服饰A=0,'【今强势板块】:纺织服饰',IF(ZZDZ-食品饮料A=0,'【今强势板块】:食品饮料',IF(ZZDZ-酿酒A=0,'【今强势板块】:酿酒行业',IF(ZZDZ-家用电器A=0,'【今强势板块】:家用电器',IF(ZZDZ-汽车类A=0,'【今强势板块】:汽车行业',IF(ZZDZ-医疗保健A=0,'【今强势板块】:医疗保健',IF(ZZDZ-家居用品A=0,'【今强势板块】:家居用品',IF(ZZDZ-医药A=0,'【今强势板块】:医药行业',IF(ZZDZ-商业连锁A=0,'【今强势板块】:商业连锁',IF(ZZDZ-商贸代理A=0,'【今强势板块】:商贸代理',DRAWNULL))))))))))))))))))))))),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND 显强势板块1=1,横向左右位置,四排位置,0,IF(ZZDZ-传媒娱乐A=0,'【今强势板块】:传媒娱乐',IF(ZZDZ-广告包装A=0,'【今强势板块】:广告包装',IF(ZZDZ-文教休闲A=0,'【今强势板块】:文教休闲',IF(ZZDZ-酒店餐饮A=0,'【今强势板块】:酒店餐饮',IF(ZZDZ-旅游A=0,'【今强势板块】:旅游行业',IF(ZZDZ-航空航天A=0,'【今强势板块】:航空航天',IF(ZZDZ-船舶A=0,'【今强势板块】:船舶行业',IF(ZZDZ-运输设备A=0,'【今强势板块】:运输设备',IF(ZZDZ-通用机械A=0,'【今强势板块】:通用机械',IF(ZZDZ-工业机械A=0,'【今强势板块】:工业机械',IF(ZZDZ-电气设备A=0,'【今强势板块】:电气设备',
IF(ZZDZ-工程机械A=0,'【今强势板块】:工程机械',IF(ZZDZ-电器仪表A=0,'【今强势板块】:电器仪表',IF(ZZDZ-电信运营A=0,'【今强势板块】:电信运营',IF(ZZDZ-公共交通A=0,'【今强势板块】:公共交通',IF(ZZDZ-水务A=0,'【今强势板块】:水务行业',IF(ZZDZ-供气供热A=0,'【今强势板块】:供气供热',IF(ZZDZ-环境保护A=0,'【今强势板块】:环境保护',IF(ZZDZ-运输服务A=0,'【今强势板块】:运输服务',IF(ZZDZ-仓储物流A=0,'【今强势板块】:仓储物流',IF(ZZDZ-交通设施A=0,'【今强势板块】:交通设施',
IF(ZZDZ-银行类A=0,'【今强势板块】:银行板块',IF(ZZDZ-证券类A=0,'【今强势板块】:证券板块',IF(ZZDZ-保险类A=0,'【今强势板块】:保险板块',IF(ZZDZ-多元金融A=0,'【今强势板块】:多元金融',IF(ZZDZ-建筑A=0,'【今强势板块】:建筑行业',IF(ZZDZ-房地产A=0,'【今强势板块】:房产板块',IF(ZZDZ-电脑设备A=0,'【今强势板块】:电脑设备',IF(ZZDZ-通信设备A=0,'【今强势板块】:通信设备',IF(ZZDZ-半导体A=0,'【今强势板块】:半导体类',IF(ZZDZ-元器件A=0,'【今强势板块】:元器件类',IF(ZZDZ-软件服务A=0,'【今强势板块】:软件服务',IF(ZZDZ-互联网A=0,'【今强势板块】:互联网类',IF(ZZDZ-综合类A=0,'【今强势板块】:综合板块',DRAWNULL))))))))))))))))))))))))))))))))))),COLORWHITE;
个股排名:=CONST(INSORT(HYBLOCK,'涨幅',1,0));
HYPM1:=STRCAT('【该股在 (',HYBLOCK);
HYPM2:=STRCAT(HYPM1,') 行业涨幅排名:第');
HYPM3:=STRCAT(HYPM2,VAR2STR(个股排名,0));
HYPM4:=STRCAT(HYPM3,'名】 (板块涨停');
涨停数1:=CONST(INSUM(HYBLOCK,'涨幅',2,0));
涨停数2:=CONST(INSUM(HYBLOCK,'涨幅',3,0));
涨停数:=涨停数1+涨停数2;
HYPM5:=STRCAT(HYPM4,VAR2STR(涨停数,0));
HYPM6:=STRCAT(HYPM5,'支)');
HYPM4A:=STRCAT(HYPM3,'名】 (板块内无个股涨停)');
HYPM4B:=IF(涨停数<10,STRCAT(HYPM3,'名】 █████████'),STRCAT(HYPM3,'名】 ██████████'));
DRAWTEXT_FIX(ISLASTBAR,IF(显强势板块1=0,0.25,横向左右位置+0.32),四排位置,0,IF(涨停数<1,DRAWNULL,HYPM4B)),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,IF(显强势板块1=0,0.25,横向左右位置+0.32),四排位置,0,IF(涨停数>=1,HYPM6,HYPM4A)),COLORWHITE;
{空中加油}
DIFF1:=EMA(CLOSE,9)-EMA(CLOSE,30);
DEA1:=EMA(DIFF1,5);
KZJY:=DIFF1>0 AND DEA1>0;
DRAWTEXT(KZJY AND ABS(DIFF1-DEA1)/C<0.0045 AND CROSS(DIFF1,DEA1),(LOW * 1.00),'&')COLORLIBLUE;
{低吸}
B1:=((REF(C,2)-C)/C)*100>6;
B2:=REF(C<O,1) AND C<O;
B3:= ((H-O)/C)*100<2 ;
DRAWTEXT(B1 AND B2 AND B3 ,(LOW * 0.97),''),COLORGREEN;
当日成本:=IF(C>REF(C,1),(3*H+4*C+3*OPEN+2*L)/12,(2*H+4*C+3*OPEN+3*L)/12);
疯牛线:=EXPMEMA(当日成本,3);
龙头线:=EXPMEMA(当日成本,8);
慢牛线:=EXPMEMA(当日成本,25);
生命线:=EXPMEMA(当日成本,79);
牛熊线:=EXPMEMA(当日成本,248);
V2:=EMA(当日成本,13)-EMA(当日成本,34);
V3:=EMA(V2,5);
CYC13:=0.01*EXPMA(AMOUNT,13)/EXPMA(VOL,13);
CYC34:=0.01*EXPMA(AMOUNT,34)/EXPMA(VOL,34);
CYS13:=(CLOSE-CYC13)/CYC13*100;
CYS34:=(CLOSE-CYC34)/CYC34*100;
CYC5:=0.01*EXPMA(AMOUNT,5)/EXPMA(VOL,5);
CYS5:=(CLOSE-CYC5)/CYC5*100;
DIVE:=0.01*EXPMA(AMOUNT,5)/EXPMA(VOL,5);
CYR5:=(DIVE/REF(DIVE,1)-1)*100;
DRAWTEXT((REF(CLOSE/REF(CLOSE,1),3)>1.099 OR REF(CLOSE/REF(CLOSE,1),6)>1.099 OR
REF(CLOSE/REF(CLOSE,1),4)>1.099 OR REF(CLOSE/REF(CLOSE,1),5)>1.099
OR REF(CLOSE/REF(CLOSE,1),2)>1.099) AND CROSS(龙头线,LOW) AND UPNDAY(慢牛线,3),(LOW * 1.00),'&&'),COLORGREEN;
{金针探底}
DRAWTEXT(H/L>=1.05 AND (O-L)/(C-O)>=2 AND C<REF(C,5)
AND C<REF(C,10) AND C<REF(C,20)
AND C<REF(C,30),(LOW * 0.98),'↖&探&底&针'),COLORYELLOW;
{最长筹码线}
X_36:=COST(1);
X_37:=COST(10);
X_38:=COST(20);
X_39:=COST(30);
X_40:=COST(40);
X_41:=COST(50);
X_42:=COST(60);
X_43:=COST(70);
X_44:=COST(80);
X_45:=COST(90);
X_46:=COST(99);
X_47:=COST(5);
X_48:=COST(15);
X_49:=COST(25);
X_50:=COST(35);
X_51:=COST(45);
X_52:=COST(55);
X_53:=COST(65);
X_54:=COST(75);
X_55:=COST(85);
X_56:=COST(95);
X_57:=X_47-X_36;
X_58:=X_37-X_47;
X_59:=X_48-X_37;
X_60:=X_38-X_48;
X_61:=X_49-X_38;
X_62:=X_39-X_49;
X_63:=X_50-X_39;
X_64:=X_40-X_50;
X_65:=X_51-X_40;
X_66:=X_41-X_51;
X_67:=X_52-X_41;
X_68:=X_42-X_52;
X_69:=X_53-X_42;
X_70:=X_43-X_53;
X_71:=X_54-X_43;
X_72:=X_44-X_54;
X_73:=X_55-X_44;
X_74:=X_45-X_55;
X_75:=X_56-X_45;
X_76:=X_46-X_56;
X_77:=MIN(X_57,MIN(X_58,MIN(X_59,MIN(X_60,MIN(X_61,MIN(X_62,MIN(X_63,MIN(X_64,MIN(X_65,MIN(X_66,MIN(X_67,MIN(X_68,MIN(X_69,MIN(X_70,MIN(X_71,MIN(X_72,MIN(X_73,MIN(X_74,MIN(X_75,X_76)))))))))))))))))));
X_78:=IF(X_57=X_77,(X_47+X_36)/2,IF(X_58=X_77,(X_47+X_37)/2,IF(X_59=X_77,(X_48+X_37)/2,IF(X_60=X_77,(X_48+X_38)/2,IF(X_61=X_77,(X_49+X_38)/2,IF(X_62=X_77,(X_49+X_39)/2,IF(X_63=X_77,(X_50+X_39)/2,IF(X_64=X_77,(X_50+X_40)/2,IF(X_65=X_77,(X_51+X_40)/2,IF(X_66=X_77,(X_51+X_41)/2,IF(X_67=X_77,(X_52+X_41)/2,IF(X_68=X_77,(X_52+X_42)/2,IF(X_69=X_77,(X_53+X_42)/2,IF(X_70=X_77,(X_53+X_43)/2,IF(X_71=X_77,(X_54+X_43)/2,IF(X_72=X_77,(X_54+X_44)/2,IF(X_73=X_77,(X_55+X_44)/2,IF(X_74=X_77,(X_55+X_45)/2,IF(X_75=X_77,(X_56+X_45)/2,(X_56+X_46)/2)))))))))))))))))));
筹码峰线:X_78,NODRAW,COLOR00EEEE;
STICKLINE(ISLASTBAR,筹码峰线,筹码峰线*1.001,20,0),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,HYBLOCK),COLORYELLOW;{在屏幕左上角显示所属行业板块}
DRAWTEXT_FIX(ISLASTBAR,0.55,0,0,DYBLOCK),COLORYELLOW;{在屏幕左上角显示所属地域板块}
DRAWTEXT_FIX(ISLASTBAR,0.6,0,0,GNBLOCK),COLORYELLOW;{在屏幕左上角显示所属概念板块}
DRAWTEXT_FIX(ISLASTBAR,0.5,0.025,0,FGBLOCK),COLORMAGENTA;{在屏幕左上角显示所属风格};
大盘指数:INDEXC,COLORWHITE,NODRAW,COLORRED;
沪深涨家数:DYNAINFO(60),NODRAW,COLORLIMAGENTA;
沪深跌家数:DYNAINFO(61),NODRAW,COLORGREEN;
涨停家数:"880006$C" NODRAW COLOR0000FF;
跌停家数:"880006$O" NODRAW COLOR00FF00;
获利盘比例:WINNER(C),NODRAW;
平均成本筹码:COST(50),NODRAW;
{低吸}
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13
OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1 AND C>=MA(C,20);
VAR1A:=REF(VAR1
OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9
OR VARA OR VARB OR VARC,1) AND VARD;
DRAWTEXT(FILTER(VAR19=1,4),(LOW * 1.00),'↖&低&吸'),COLORGREEN;
{回调进}
AA8:=ZIG(3,5); AA9:=REF(AA8,1);
DRAWTEXT((AA8>AA9)AND(AA9<=REF(AA8,2))AND(REF(AA8,2)<=REF(AA8,3)),(LOW * 0.98),'↖&回&调&买'),COLORMAGENTA;
{精准买}
N:=4;MM:=14;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM) ;
ADXX:= EXPMEMA( (MDI-PDI)/(MDI+PDI)*100,MM);
ADXXX:=REVERSE(ADXX),COLORMAGENTA, ;
ADXR:=EXPMEMA(ADX,MM);
ADXRR:=EXPMEMA(ADXX,MM);
ADXRRR:=REVERSE(ADXRR);
新SAR101:=NEWSAR(1,100);
DRAWTEXT(新SAR101<REF(新SAR101,1) AND REF(新SAR101,1)<REF(新SAR101,2)
AND REF(新SAR101,2)<REF(新SAR101,3) AND C>新SAR101 AND C>=MA(C,20) ,(LOW * 0.99),'↖&精&买')COLORLIBLUE;
副图1
使用方法:1、指标由经久不衰的六项经典指标组成,MACD,KDJ,RSI,LW&R,BBI及ZLMM。
2、当某指标出现金叉,拐点画一个买入红箭头。当某指标出现死叉,拐点画一个卖出绿箭头。
3、红箭金叉趋势向上,绿箭死叉预示趋势向下。当六项指标同时发出红箭头时买入待涨,也就是投资回报大于投资付出!反之亦然,趋势一目了然!
4、出现多于三个向上的红箭头,表示趋势转强!向上的箭头越多,趋势越强!
5、出现多于三个向下的绿箭头,表示趋势转弱!向下的箭头越多,趋势越弱
A01:=EMA(CLOSE,1)-EMA(CLOSE,13);
A02:=EMA(A01,5);
DRAWICON(A01>A02,1,1);
DRAWICON(A01<A02,1,2);
DRAWTEXT(ISLASTBAR=1,1,'.MACD'),COLORFFFFFF;
A1:=A01>A02;
MACD金叉:IF(A1,1,0),COLORYELLOW;
RSV1:=(CLOSE-LLV(LOW,0))/(HHV(HIGH,0)-LLV(LOW,0))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
DRAWICON(K>D,2,1);
DRAWICON(K<D,2,2);
DRAWTEXT(ISLASTBAR=1,2,'.KDJ'),COLORFFFFFF;
A2:=K>D;
KDJ金叉:IF(A2,2,0),COLORYELLOW;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
DRAWICON(RSI1>RSI2,3,1);
DRAWICON(RSI1<RSI2,3,2);
DRAWTEXT(ISLASTBAR=1,3,'.RSI'),COLORFFFFFF;
A3:=RSI1>RSI2;
RSI金叉:IF(A3,3,0),COLORYELLOW;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
DRAWICON(LWR1>LWR2,4,1);
DRAWICON(LWR1<LWR2,4,2);
DRAWTEXT(ISLASTBAR=1,4,'.LWR'),COLORFFFFFF;
A4:=LWR1>LWR2;
LWR金叉:IF(A4,4,0),COLORYELLOW;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
DRAWICON(CLOSE>BBI,5,1);
DRAWICON(CLOSE<BBI,5,2);
DRAWTEXT(ISLASTBAR=1,5,'.BBI'),COLORFFFFFF;
A5:=CLOSE>BBI;
BBI金叉:IF(A5,5,0),COLORYELLOW;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
DRAWICON(MMS>MMM,6,1);
DRAWICON(MMS<MMM,6,2);
DRAWTEXT(ISLASTBAR=1,6,'.MTM'),COLORFFFFFF;
A6:=MMS>MMM;
MTM金叉:IF(A6,6,0),COLORYELLOW;
涨买入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0),COLORBLUE,LINETHICK2;
上涨:IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,7,0),COLORBLUE,LINETHICK2;
晴天:=BARSLASTCOUNT(A1 AND A2 AND A3 AND A4 AND A5 AND A6),LINETHICK0;
雨天:=BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉>0 AND MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉<21 ),LINETHICK0;
雪天:=BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉=0),LINETHICK0;
副图2
注意红箭头的反转趋势 2根线与K线位置高低 偏离太低可能是底部来临相反太高 可能要注意回落
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:MA(RSV,3),COLORFF600E,LINETHICK1;
D: EMA(0.667*REF(K,1)+0.333*K,2),COLOR0000FF;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK;
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(H,3)-EMA(H,8);
D4:=EMA(L,3)-EMA(L,8);
STICKLINE(D1>=D2,D1,D2,4,0),COLOR0055AA;
STICKLINE(D1<=D2,D1,D2,4,0),COLOR006600;
STICKLINE(D1>=D2,D1,D2,2,0),COLOR0077CC;
STICKLINE(D1>=D2,D1,D2,1,0),COLOR0099DD;
STICKLINE(D1>=D2,D3,D4,0,0),COLOR00BBFF;
STICKLINE(D1<=D2,D1,D2,3,0),COLOR009900;
STICKLINE(D1<=D2,D1,D2,1,0),COLOR00BB00;
STICKLINE(D1<=D2,D3,D4,0,0),COLOR00EE00;
DRAWICON(CROSS(D1,DIFF) AND DIFF<-0.05 ,D4-0.1,1);
DRAWICON(CROSS(DIFF,D1) AND DIFF>0.1 ,D3+0.1,2);
副图3
主力游资机构散户的合力
SMA1:=24;
SMA2:=14;
SMA3:=6;
SMA4:=6;
MID9:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线1:=(20*MID9+19*REF(MID9,1)+18*REF(MID9,2)+17*REF(MID9,3)+16*REF(MID9,4)+15*REF(MID9,5)+14*REF(MID9,6)+13*REF(MID9,7)+12*REF(MID9,8)+11*REF(MID9,9)+10*REF(MID9,10)+9*REF(MID9,11)+8*REF(MID9,12)+7*REF(MID9,13)+6*REF(MID9,14)+5*REF(MID9,15)+4*REF(MID9,16)+3*REF(MID9,17)+2*REF(MID9,18)+REF(MID9,20))/210,COLORGREEN{COLORRED};
马线1:=MA(牛线1,6),COLORMAGENTA{COLORYELLOW};
STICKLINE(C>牛线1,-1.9,-0.4,3,0),COLORRED{COLORED},LINETHICK2;
STICKLINE(C<马线1,-1.9,-0.4,3,0),COLOR008000{COLORGREEN},LINETHICK2;
STICKLINE(牛线1>=C AND C>=马线1,-1.9,-0.4,3,0),COLOR008000{COLORGREEN},LINETHICK2;
MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210;
马线:=MA(牛线,3);
GB:=(C-牛线);
换手:=V*100/CAPITAL;
主:=MA(换手,5);
大:=MA(换手,12);
中:=MA(换手,34);
散:=MA(换手,55);
均:=(主+大+中+散)/4;
GBB:=(主-散);
GB1:=GB+GBB;
STICKLINE(GB1>=0,2.5,4,3,0),COLORRED{COLORRED},LINETHICK2;
STICKLINE(GB1<0,2.5,4,3,0),COLOR008000{COLORGREEN},LINETHICK2;
AA:=MAX(MA(C,60),MA(C,120));
BB:=MIN(MA(C,60),MA(C,120));
成交量:=V,COLORWHITE,LINETHICK0;
Q:=EMA(V,5);
Q1:=EMA(V,50);
OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
OBV1:=EMA(OBV,5);
OBV2:=EMA(OBV,50);
W:=(Q-Q1)*0.00001;
W1:=(OBV1-OBV2)*0.000001;
W2:=W+W1;
STICKLINE(W2>=0,0.3,1.8,3,0),COLORRED{COLOR017700},LINETHICK2;
STICKLINE(W2<0,0.3,1.8,3,0),COLOR008000{COLORGREEN},LINETHICK2;
J:=MAX(MA(C,30),MA(C,60));
K:=MIN(MA(C,30),MA(C,60));
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;
MADKX:=MA(DKX,6);
MDD:=(DKX-MADKX)*1.2;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,6)-EMA(V1,55);
V3:=EMA(V2,6);
V4:=2*(V2-V3)*5.5;
V5:=(V2-V3)*0.06;
V6:=MDD+V5;
STICKLINE(V6>=0,-4.1,-2.6,3,0),COLORRED{COLOR017700},LINETHICK2;
STICKLINE(V6<0,-4.1,-2.6,3,0),COLOR008000{COLORGREEN},LINETHICK2;
散户:(GB1),DRAWNULL;
游资:(W2),DRAWNULL;
机构:(C-牛线1),DRAWNULL;
主力:(V6),DRAWNULL;
主力共量:机构+主力,DRAWNULL;
N:=15;
SAT1:=IF((AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*4>4,4,(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*4);
STICKLINE(((SAT1>=4)AND BARSCOUNT(C)),0,(0+SAT1),1.2,0),COLORYELLOW;
能量饱和度:SAT1,LINETHICK1,COLORYELLOW,LINETHICK1;