手机版 官方微博
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮忙在主图上面增加一个功能

[通达信]
设置
1644 2 一位道友 Lv.2 发表于 · 2020-2-17 12:40 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
老师这个主图上面关于有一个上穿BBI后底部显现两个黄色向上符号的定义,给这个定义在原有要求上在增加一个要求就是要求45日均线拐头向上或是趋势向上。
也就是说只要45日趋势向下,那么就算原有的定义都符合了,也不会出现这个符号,必须在原有的定义上面同时符合45日线拐头向上或是趋势向上。
45日均线不要显示在上面,要求隐藏掉。这个45日天数可以自行更改。



{加入KDJ的J小于45}
{参数自己填写}
M5:MA(C,5),DOTLINE;
MA20:MA(CLOSE,20),COLORRED;
BBI:(MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/4,LINETHICK3,COLORYELLOW;
ZT:=C/REF(C,1)>1.0993 AND C=H;
STICKLINE(ZT,O,C,2,0),COLORYELLOW;
QA:=REF(H,10)=HHV(H,2*10+1);
QB:=BACKSET(QA,10+1);
QC:=FILTER(QB,10) AND H=HHV(H,10+1);
QD:=BARSLAST(QC);
QE:=IF(QC,CURRBARSCOUNT,0);
QF:=IF(QD,REF(QE,QD),QE);
QG:=CONST(QF);
QH:=REF(QF,QD+1);
QW:=CONST(QH);
DRAWLINE(CURRBARSCOUNT=QW,H,CURRBARSCOUNT=QG,H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=QW,H,ISLASTBAR,REF(H,QW-1),1),COLOR0099FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=QG,H,ISLASTBAR,REF(H,QG-1),1),COLOR0099FF,POINTDOT;
QM:=INTPART(3*8/5);
QR:=REF(H,QM)=HHV(H,2*QM+1);
QT:=FILTER(QR,QM);
QY:=BACKSET(QT,QM+1);
QU:=FILTER(QY,QM);
QI:=BACKSET(ISLASTBAR,BARSLAST(QU)+1);
QP:=QI>REF(QI,1);
DRAWLINE(QU,H,QP,H,1),COLORRED;
QA1:=REF(L,8)=LLV(L,2*8+1);
QB1:=BACKSET(QA1,8+1);
QC1:=FILTER(QB1,8) AND L=LLV(L,8+1);
QD1:=BARSLAST(QC1);
QE1:=IF(QC1,CURRBARSCOUNT,0);
QF1:=IF(QD1,REF(L,QD1),L);
QG1:=IF(QD1,REF(QE1,QD1),QE1);
QH1:=CONST(QG1);
QW1:=REF(QF1,QD1+1);
QM1:=REF(QG1,QD1+1);
QR1:=CONST(QM1);
DRAWLINE(CURRBARSCOUNT=QR1,L,CURRBARSCOUNT=QH1,L,1),COLORBLUE;
DRAWLINE(CURRBARSCOUNT=QH1,L,ISLASTBAR,REF(L,QH1-1),1),COLORWHITE,POINTDOT;
DRAWLINE(CURRBARSCOUNT=QR1,L,ISLASTBAR,REF(L,QR1-1),1),COLORWHITE,POINTDOT;
QT1:=REF(L,QM)=LLV(L,2*QM+1);
QY1:=FILTER(QT1,QM);
QU1:=BACKSET(QY1,QM+1);
QI1:=FILTER(QU1,QM);
QP1:=BACKSET(ISLASTBAR,BARSLAST(QI1)+1);
QJ1:=QP1>REF(QP1,1);
DRAWLINE(QI1,L,QJ1,L,1),COLORRED;
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=BACKSET(SR2,10+1);
HD:=FILTER(SR3,10);
前高:=REF(H,BARSLAST(HD));
{DRAWICON(CROSS(C,前高),L-0.20,1);}{突破前高的信号};  {-----}

总股本:=STRCAT(STRCAT(' 总股本:',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘:',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(STRCAT(' 流通比:',CON2STR(CAPITAL/TOTALCAPITAL*100,2)),'%');
市值:=STRCAT(STRCAT(' 流通市值:',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));
股本市值:=STRCAT('【股本市值】',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市日期));
市盈率:=STRCAT(' 市盈率:',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率:',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率:',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率:',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率:',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利率:',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率:',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('【当前业绩】',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.01,0,股本市值),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.04,0,当前业绩),COLORMAGENTA;
DRAWTEXT_FIX(1,0.005,0.07,0,'莸利比例:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.06,0.07,0,CONST(WINNER(C )*100)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.15,0.07,0,CONST(DYNAINFO(37)*100)),COLORYELLOW;
DRAWTEXT_FIX (1,0.10,0.07,0,'换手:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.22,0.07,0,CONST(DYNAINFO(17))),COLORYELLOW;
DRAWTEXT_FIX (1,0.18,0.07,0,'量比:'),COLORYELLOW;
DRAWTEXT_FIX (1,0.26,0.07,0,'涨幅:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.33,0.07,0,CONST(DYNAINFO(14)*100)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.33,0.07,0,IF(CONST(DYNAINFO(14)*100)<0,CONST(DYNAINFO(14)*100),DRAWNULL)),COLORYELLOW;
{}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.1,0,财务系数),COLORYELLOW;
{};

{DRAWTEXT(V>REF(V,1)*2&&CROSS(C,BBI)&&BBI>=REF(BBI,1),L*0.98,'【切】'),COLORYELLOW;}
{DRAWTEXT(BETWEEN(C/REF(C,1),1.008,1.025)&&H/REF(C,1)<1.03&&V=LLV(V,20)&&CROSS(MACD.MACD,0)&&REF(CROSS(KD.D,KD.K),2)&&DOWNNDAY(KD.K,3),L*0.98,'【切】'),COLORYELLOW;}
{把黄色的【切】,改为两个黄色上箭头的图标,并且远离K线。}
{DRAWTEXT(V>REF(V,1)*2&&CROSS(C,BBI)&&BBI>=REF(BBI,1),L*0.97,'【切】'),COLORYELLOW;}
{DRAWTEXT(BETWEEN(C/REF(C,1),1.008,1.025)&&H/REF(C,1)<1.03&&V=LLV(V,20)&&CROSS(MACD.MACD,0)&&REF(CROSS(KD.D,KD.K),2)&&DOWNNDAY(KD.K,3),L*0.97,'【切】'),COLORYELLOW;}

板块类别:=STRCAT(STRCAT(STRCAT(STRCAT(HYBLOCK,STRCAT(':',DYBLOCK)),STRCAT(':',FGBLOCK)),ZHBLOCK),GNBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.95,1,2,板块类别),COLORYELLOW;




{涨幅公式}
VAR1:=H/REF(C,1)<1.03 AND BETWEEN(C/REF(C,1),1.01,1.03);
{MACD,金叉飘红出红柱}
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD2:=(DIF-DEA)*2;
VAR3:MACD2>0,NODRAW;
{VAR3:MACD>0, NODRAW;}
{KDJ定义两三天前死叉开口趋势向下,上次你讲三天前,改成两天好了};
VAR4:=CROSS(KDJ.D,KDJ.K);
VAR5:=REF(VAR4,2)=1 OR REF(VAR4,3)=1;
VAR6:=KDJ.D<REF(KDJ.D,1) AND REF(KDJ.D,1)<REF(KDJ.D,2);
VAR7:=KDJ.K<REF(KDJ.K,1) AND REF(KDJ.K,1)<REF(KDJ.K,2);
{天前KDJ死叉,并且K和D趋势向下}
VAR8:=VAR5 AND VAR6 AND VAR7;
{要求当天的K线收盘涨幅在百分之0.8到2.5之间}
VAR11:=CLOSE/REF(CLOSE,1);
VAR12:=VAR11>1.008 AND VAR11<1.025;
{同时当天最高涨幅不可以超过百分之3}
VAR13:=H/REF(C,1)<=1.03;
{底部成交量要极度萎缩至地量,或是用20日内最低量俩定义也可}
{成交量你设置个20日内最低量,同时参数额可以更改,参数N1}

{N1:=20;}
VAR21:=VOL=LLV(VOL,N1);
VAR22:=KDJ.J<45;
买字:VAR3 AND VAR8 AND VAR12 AND VAR13 AND VAR21 AND VAR22,NODRAW,COLORYELLOW;
{DRAWICON(买字>0,L*0.98,34);}
{DRAWICON(买字>0,L*0.96,34);}
DRAWTEXT(买字>0,L*0.96,'【买】'),COLORYELLOW;

{今天开盘虚拟成交量是昨天的倍量,设置参数:倍量,默认为2倍。}
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
倍量条件:=VVOL>REF(V,1)*倍量;
倍量条件2:=VOL>REF(V,1)*倍量;

{股价上穿BBI}
{BBI要求是拐头向上,或是趋势向上----删除}
股价上穿BBI:=CROSS(CLOSE,BBI);
{BBI要求:=BBI>REF(BBI,1);}
{符合以上条件,就出现【切】,在当天K线下面显示。}
切紫色:=(倍量条件 OR 倍量条件2) AND 股价上穿BBI;

{把紫色的【切】,改为两个黄色上箭头的图标,并且远离K线。}
DRAWICON(倍量条件 AND 股价上穿BBI,L*0.96,34);
DRAWICON(倍量条件 AND 股价上穿BBI,L*0.94,34);

{保留符号,必须符合三点}
{1,收盘价在BBI线上}
{2,成交量必须大于昨天的成交量}
{3,当天上影线不可以超过百分之2.5}
上影线:=H-MAX(CLOSE,OPEN);
上影线条件:=上影线/C<0.035;


DRAWICON(切紫色 AND 上影线条件,L*0.96,34);
DRAWICON(切紫色 AND 上影线条件,L*0.94,34);

{符合以上条件,就出现【切】,在当天K线下面显示----删除}
{STICKLINE(切紫色,OPEN,CLOSE,3,0),COLORMAGENTA;};




举报

扔鸡蛋(0) 回复

一位道友
Lv.2
发表于 2020-2-17 13:09 复制 查看全部楼层
老师可以在帮忙修改一下吗,45日趋势向下的它还是有显示出来的,要求45向下的情况向就算其他的都满足了,也不显示符号,必须45日趋势向上,同时隐藏45日和60日均线。感谢!!!

举报

点亮(0) 扔鸡蛋(0) 回复

注册111
Lv.6
发表于 2020-2-17 12:55 复制 查看全部楼层
{加入KDJ的J小于45}
{参数自己填写}
M5:MA(C,5),DOTLINE;
MA20:MA(CLOSE,20),COLORRED;
MA45:MA(CLOSE,45),COLORMAGENTA;
MA60:MA(CLOSE,60);
BBI:(MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/4,LINETHICK3,COLORYELLOW;
ZT:=C/REF(C,1)>1.0993 AND C=H;
STICKLINE(ZT,O,C,2,0),COLORYELLOW;
QA:=REF(H,10)=HHV(H,2*10+1);
QB:=BACKSET(QA,10+1);
QC:=FILTER(QB,10) AND H=HHV(H,10+1);
QD:=BARSLAST(QC);
QE:=IF(QC,CURRBARSCOUNT,0);
QF:=IF(QD,REF(QE,QD),QE);
QG:=CONST(QF);
QH:=REF(QF,QD+1);
QW:=CONST(QH);
DRAWLINE(CURRBARSCOUNT=QW,H,CURRBARSCOUNT=QG,H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=QW,H,ISLASTBAR,REF(H,QW-1),1),COLOR0099FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=QG,H,ISLASTBAR,REF(H,QG-1),1),COLOR0099FF,POINTDOT;
QM:=INTPART(3*8/5);
QR:=REF(H,QM)=HHV(H,2*QM+1);
QT:=FILTER(QR,QM);
QY:=BACKSET(QT,QM+1);
QU:=FILTER(QY,QM);
QI:=BACKSET(ISLASTBAR,BARSLAST(QU)+1);
QP:=QI>REF(QI,1);
DRAWLINE(QU,H,QP,H,1),COLORRED;
QA1:=REF(L,8)=LLV(L,2*8+1);
QB1:=BACKSET(QA1,8+1);
QC1:=FILTER(QB1,8) AND L=LLV(L,8+1);
QD1:=BARSLAST(QC1);
QE1:=IF(QC1,CURRBARSCOUNT,0);
QF1:=IF(QD1,REF(L,QD1),L);
QG1:=IF(QD1,REF(QE1,QD1),QE1);
QH1:=CONST(QG1);
QW1:=REF(QF1,QD1+1);
QM1:=REF(QG1,QD1+1);
QR1:=CONST(QM1);
DRAWLINE(CURRBARSCOUNT=QR1,L,CURRBARSCOUNT=QH1,L,1),COLORBLUE;
DRAWLINE(CURRBARSCOUNT=QH1,L,ISLASTBAR,REF(L,QH1-1),1),COLORWHITE,POINTDOT;
DRAWLINE(CURRBARSCOUNT=QR1,L,ISLASTBAR,REF(L,QR1-1),1),COLORWHITE,POINTDOT;
QT1:=REF(L,QM)=LLV(L,2*QM+1);
QY1:=FILTER(QT1,QM);
QU1:=BACKSET(QY1,QM+1);
QI1:=FILTER(QU1,QM);
QP1:=BACKSET(ISLASTBAR,BARSLAST(QI1)+1);
QJ1:=QP1>REF(QP1,1);
DRAWLINE(QI1,L,QJ1,L,1),COLORRED;
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=BACKSET(SR2,10+1);
HD:=FILTER(SR3,10);
前高:=REF(H,BARSLAST(HD));
{DRAWICON(CROSS(C,前高),L-0.20,1);}{突破前高的信号};  {-----}

总股本:=STRCAT(STRCAT(' 总股本:',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘:',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(STRCAT(' 流通比:',CON2STR(CAPITAL/TOTALCAPITAL*100,2)),'%');
市值:=STRCAT(STRCAT(' 流通市值:',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));
股本市值:=STRCAT('【股本市值】',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市日期));
市盈率:=STRCAT(' 市盈率:',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率:',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率:',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率:',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率:',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利率:',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率:',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('【当前业绩】',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.01,0,股本市值),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.04,0,当前业绩),COLORMAGENTA;
DRAWTEXT_FIX(1,0.005,0.07,0,'莸利比例:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.06,0.07,0,CONST(WINNER(C )*100)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.15,0.07,0,CONST(DYNAINFO(37)*100)),COLORYELLOW;
DRAWTEXT_FIX (1,0.10,0.07,0,'换手:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.22,0.07,0,CONST(DYNAINFO(17))),COLORYELLOW;
DRAWTEXT_FIX (1,0.18,0.07,0,'量比:'),COLORYELLOW;
DRAWTEXT_FIX (1,0.26,0.07,0,'涨幅:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.33,0.07,0,CONST(DYNAINFO(14)*100)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.33,0.07,0,IF(CONST(DYNAINFO(14)*100)<0,CONST(DYNAINFO(14)*100),DRAWNULL)),COLORYELLOW;
{}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.1,0,财务系数),COLORYELLOW;
{};

{DRAWTEXT(V>REF(V,1)*2&&CROSS(C,BBI)&&BBI>=REF(BBI,1),L*0.98,'【切】'),COLORYELLOW;}
{DRAWTEXT(BETWEEN(C/REF(C,1),1.008,1.025)&&H/REF(C,1)<1.03&&V=LLV(V,20)&&CROSS(MACD.MACD,0)&&REF(CROSS(KD.D,KD.K),2)&&DOWNNDAY(KD.K,3),L*0.98,'【切】'),COLORYELLOW;}
{把黄色的【切】,改为两个黄色上箭头的图标,并且远离K线。}
{DRAWTEXT(V>REF(V,1)*2&&CROSS(C,BBI)&&BBI>=REF(BBI,1),L*0.97,'【切】'),COLORYELLOW;}
{DRAWTEXT(BETWEEN(C/REF(C,1),1.008,1.025)&&H/REF(C,1)<1.03&&V=LLV(V,20)&&CROSS(MACD.MACD,0)&&REF(CROSS(KD.D,KD.K),2)&&DOWNNDAY(KD.K,3),L*0.97,'【切】'),COLORYELLOW;}

板块类别:=STRCAT(STRCAT(STRCAT(STRCAT(HYBLOCK,STRCAT(':',DYBLOCK)),STRCAT(':',FGBLOCK)),ZHBLOCK),GNBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.95,1,2,板块类别),COLORYELLOW;




{涨幅公式}
VAR1:=H/REF(C,1)<1.03 AND BETWEEN(C/REF(C,1),1.01,1.03);
{MACD,金叉飘红出红柱}
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD2:=(DIF-DEA)*2;
VAR3:MACD2>0,NODRAW;
{VAR3:MACD>0, NODRAW;}
{KDJ定义两三天前死叉开口趋势向下,上次你讲三天前,改成两天好了};
VAR4:=CROSS(KDJ.D,KDJ.K);
VAR5:=REF(VAR4,2)=1 OR REF(VAR4,3)=1;
VAR6:=KDJ.D<REF(KDJ.D,1) AND REF(KDJ.D,1)<REF(KDJ.D,2);
VAR7:=KDJ.K<REF(KDJ.K,1) AND REF(KDJ.K,1)<REF(KDJ.K,2);
{天前KDJ死叉,并且K和D趋势向下}
VAR8:=VAR5 AND VAR6 AND VAR7;
{要求当天的K线收盘涨幅在百分之0.8到2.5之间}
VAR11:=CLOSE/REF(CLOSE,1);
VAR12:=VAR11>1.008 AND VAR11<1.025;
{同时当天最高涨幅不可以超过百分之3}
VAR13:=H/REF(C,1)<=1.03;
{底部成交量要极度萎缩至地量,或是用20日内最低量俩定义也可}
{成交量你设置个20日内最低量,同时参数额可以更改,参数N1}

N1:=20;
VAR21:=VOL=LLV(VOL,N1);
VAR22:=KDJ.J<45;
买字:VAR3 AND VAR8 AND VAR12 AND VAR13 AND VAR21 AND VAR22,NODRAW,COLORYELLOW;
{DRAWICON(买字>0,L*0.98,34);}
{DRAWICON(买字>0,L*0.96,34);}
DRAWTEXT(买字>0,L*0.96,'【买】'),COLORYELLOW;

{今天开盘虚拟成交量是昨天的倍量,设置参数:倍量,默认为2倍。}
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
倍量:=2;
倍量条件:=VVOL>REF(V,1)*倍量;
倍量条件2:=VOL>REF(V,1)*倍量;

{股价上穿BBI}
{BBI要求是拐头向上,或是趋势向上----删除}
股价上穿BBI:=CROSS(CLOSE,BBI);
{BBI要求:=BBI>REF(BBI,1);}
{符合以上条件,就出现【切】,在当天K线下面显示。}
切紫色:=(倍量条件 OR 倍量条件2) AND 股价上穿BBI;

{把紫色的【切】,改为两个黄色上箭头的图标,并且远离K线。}
DRAWICON(倍量条件 AND 股价上穿BBI AND MA(C,45)>REF(MA(C,45),1),L*0.96,34);
DRAWICON(倍量条件 AND 股价上穿BBI,L*0.94,34);

{保留符号,必须符合三点}
{1,收盘价在BBI线上}
{2,成交量必须大于昨天的成交量}
{3,当天上影线不可以超过百分之2.5}
上影线:=H-MAX(CLOSE,OPEN);
上影线条件:=上影线/C<0.035;


DRAWICON(切紫色 AND 上影线条件,L*0.96,34);
DRAWICON(切紫色 AND 上影线条件,L*0.94,34);

{符合以上条件,就出现【切】,在当天K线下面显示----删除}
{STICKLINE(切紫色,OPEN,CLOSE,3,0),COLORMAGENTA;};

附件

捕获.JPG

举报

点亮(0) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 免费注册登录

本版积分规则

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表