您现在的位置:程序化交易>> 股票公式>> 同花顺>> 同花顺公式>>正文内容

优化牛熊均线(图很漂亮噢)[同花顺公式]

相关标签: 最牛的均线炒股技巧 、 通达信黑牛均线选股 、 成本均线牛势 、 怎样看5日10日均线图 、 最简单的均线主图公式 、 怎么看股票的均线图 、 葛兰碧均线法则 图 、 通达信 变色均线主图 、 股市中如何看均线图 、

 

 

优化牛熊均线源码如下:可复制

//优化牛熊均线//
YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
今压:ref(阻价,1),NODRAW,COLORAA11BB;
今撑:ref(支价,1),NODRAW,COLOR009900;
明压:阻价,NODRAW;
明撑:支价,NODRAW;
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10)COLOref76FF;
MA30:MA(CLOSE,30)COLOR9055FF;
MA55:MA(CLOSE,55)COLORBLUE,LINETHICK2;
MA89:MA(CLOSE,89)COLORAA99FF,LINETHICK2;
MA120:MA(CLOSE,120)LINETHICK2;
MA250:MA(CLOSE,250)COLORLIGREEN,LINETHICK2;
AA05:MA(C,5),LINETHICK0;
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/ref(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-ref(AA05,1))/ref(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-ref(速度5,1)),2),LINETHICK2;
AA10:MA(C,10),COLOref76FF;
AA22:=MA(C,22);
BB10:=ATAN((AA10/ref(AA10,1)-1)*100)*180/3.1416;
AA43:MA(C,43);
三拾日乖离率:=(C-AA43)/AA43*100;
VAR1:=(AA22-AA43)>ref((AA22-AA43),1) AND AA22>ref(AA22,1) AND AA43>ref(AA43,1);
VAR2:=(AA43-AA22)<ref((AA43-AA22),1) AND AA22<ref(AA22,1) AND AA43<ref(AA43,1);
BB43:=ATAN((AA43/ref(AA43,1)-1)*100)*180/3.1416;
STICKLINE(BB43>15 AND AA43>ref(AA43,1), AA43,ref(AA43,1),2,1),COLORLIMAGENTA;
强:=FILTER(BB43>30 AND BB10>45 AND CROSS(BB05,60),10);
播种:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND
AA05>ref(AA05,1) AND 三拾日乖离率>ref(三拾日乖离率,1) AND
AA10>ref(AA10,1) AND 加速度5>ref(加速度5,1) AND 速度5>ref(速度5,1) ,10)COLORLIRED;
收获:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA43 OR O>AA43) AND
AA05<ref(AA05,1) AND 三拾日乖离率<ref(三拾日乖离率,1) AND AA10<ref(AA10,1),10);
DRAWTEXT(播种 ,LOW*0.95,'←拉升'),COLORYELLOW;
JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<ref(三拾日乖离率,1) AND AA10>ref(AA10,1) ;
险:=FILTER(JC,30);
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 //本文来至CXH99.COM//
AND 三拾日乖离率>ref(三拾日乖离率,1) AND AA05>ref(AA05,1) AND (C/ref(C,1)-1)*100>5
AND ref(C,1)<AA43;
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>ref(AA05,1) AND 三拾日乖离率>ref(三拾日乖离率,1) AND MA10>ref(MA10,1)
AND 加速度5>ref(加速度5,1) AND 速度5>ref(速度5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA43 OR O>AA43) AND AA05<ref(AA05,1) AND 三拾日乖离率<ref(三拾日乖离率,1) AND MA10<ref(MA10,1),10);
DRAWTEXT(加仓 ,LOW-0.02,'←加仓'),COLORRED;
买:=FILTER(MR,10);
DRAWTEXT(险,HIGH*1.02,'←险'),COLORCYAN;
DRAWTEXT(买,LOW*0.98,'←买!'),COLORMAGENTA;
DRAWTEXT(强,LOW*0.98,'←强'),COLORLIRED;
VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));
VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;
MA6:=MA(C,6);
MA18:=MA(C,18);
FA:=BARSLAST(CROSS(MA18,MA6)) AND CROSS(MA6,MA18);
STICKLINE(FA,MA6,MA6-0.05,3,0),COLORYELLOW; //本文来至CXH99.COM//
DRAWTEXT(FA,MA6-0.13,'握手♂'),COLORRED;
EMA13:EMA(C,13)POINTDOT;
EMA34:EMA(C,34)POINTDOT;
EMA55:EMA(C,55)POINTDOT;
EMA120:EMA(C,120)POINTDOT;
AR1:=EMA55>EMA34 AND EMA34>EMA13;
AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);
AR3:=EMA13>=ref(EMA13,2);
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;
AR5:=AR1 AND AR2 AND AR3 AND AR4;
AR6:=AR5 AND FILTER(AR5,10);
DRAWTEXT(AR6,L-0.09,'低金'),COLORYELLOW;
//STICKLINE(AR6,H,L,0.5,1),COLORYELLOW;//
//STICKLINE(AR6,O,C,6,1),LINETHICK2,COLORYELLOW;//
BR1:=COUNT(BETWEEN((C-ref(C,1))/ref(C,1)*100,0,5) ,5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C<0.2;
BR3:=C>EMA55 AND (ref(C,1)<ref(EMA55,1) OR ref(C,2)<ref(EMA55,2) OR ref(C,3)<ref(EMA55,3) OR ref(C,4)<ref(EMA55,4) OR ref
(C,5)<ref(EMA55,5));
BR4:=BR1 AND BR2 AND BR3;
DRAWTEXT(BR4 AND FILTER(BR4,10),L-0.09,'上升'),COLOR00C5FF;
STICKLINE(BR4 AND FILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;
//STICKLINE(BR4 AND FILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;// //本文来至程序化交易网 cxh99.com//
CR1:=(C-ref(C,1))/ref(C,1)*100>0.5;
CR2:=V>MA(V,5)*0.6;
CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;
CR4:=ABS(EMA34-EMA55)/EMA55<0.03;
CR5:=EMA55<=EMA120 AND EMA55>=ref(EMA55,1);
CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);
//STICKLINE(CR6,H,L,0.5,1),COLORF00FF0;//
//STICKLINE(CR6,O,C,6,1),LINETHICK2,COLORF00FF0;//
DRAWTEXT(CR6,L-0.09,'半金'),COLORF00FF0;
DR1:=EMA13>EMA34 AND EMA34<EMA55;
DR2:=BARSLAST(CROSS(C,EMA55) );
DR3:=H=HHV(H,DR2);
DR4:=BARSLAST(DR3);
DR5:=COUNT(O>C AND C<ref(C,1) AND C>EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;
DR6:=C>ref(C,1) ;
DR7:= DR1 AND DR5 AND DR6 ;
DR8:=DR7 AND FILTER(DR7 ,10);
DRAWTEXT(DR8,L-0.09,'黑客'),COLORD6BA63;
//更多公式指标来源于 CXH99.COM //
STICKLINE(DR8,O,C,2,1),LINETHICK2,COLORD6BA63;
ER:=BARSLAST(ref(CROSS(EMA55,EMA34),1)) AND CROSS(EMA34,EMA55);
FR:=BARSLAST(ref(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);
DRAWTEXT(FR,L-0.09,'二金'),COLORMAGENTA; //本文来至程序化交易网 cxh99.com//
STICKLINE(FR,H,L,0.5,1),COLOR0099FF;
//STICKLINE(FR,O,C,6,1),LINETHICK2,COLORWHITE;//
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5) );
GR2:=EMA13>EMA34 AND EMA34>EMA55 AND EMA13>ref(EMA13,1);
GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:="MACD.MACD"(12,26,9)<ref("MACD.MACD"(12,26,9),1);
GR6:=GR2 AND GR3 AND GR4;
GR7:=GR2 AND GR3 AND GR4 AND GR5;
STICKLINE(GR6 AND GR7,H,H+0.09,3,0),COLOR00FF00;
HR2:=EMA13>=ref(EMA13,3) AND EMA34>=ref(EMA34,1) AND EMA55>=ref(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS
(C,EMA55)// AND CROSS(C,EMA120)//;
DRAWTEXT(HR2 AND FILTER(HR2,10),L-0.09,'推进'),COLORFFC8FF;
//STICKLINE(HR2 AND FILTER(HR2,10),H,L,0.5,1),COLORFFC8FF;
STICKLINE(HR2 AND FILTER(HR2,10),O,C,6,1),LINETHICK2,COLORFFC8FF;//;
RY1:=C/OPEN>1.04;//阳线4%//
RY2:=ref(OPEN,1)/ref(CLOSE,1)>1.04;//阴线4%//
RY3:=ABS(OPEN-ref(C,1))<C*0.02 AND ABS(C-ref(OPEN,1))<C*0.02;//两线相等//
DRAWTEXT(RY1 AND RY2 AND RY3 ,LOW,'日月合璧'),COLORLIRED;
上升三部曲:=ref(CLOSE,4)/ref(OPEN,4)>1.03 AND ref(CLOSE,3)<ref(OPEN,3) AND ref(CLOSE,2)<ref(OPEN,2) AND ref(CLOSE,1)<ref(OPEN,1) AND
ref(LOW,4)<ref(LOW,3) AND ref(LOW,4)<ref(LOW,2) AND ref(LOW,4)<ref(LOW,1) AND ref(HIGH,4)>ref(HIGH,3) AND ref(HIGH,4)>ref(HIGH,2) AND
ref(HIGH,4)>ref(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>ref(CLOSE,4);
曙光初现:=ref(CLOSE,1)/ref(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<ref(CLOSE,1) AND CLOSE>ref(CLOSE,1);
DRAWTEXT(上升三部曲,H,'←上升')COLORLIRED;
DRAWTEXT(曙光初现,L,'←曙光')COLOR0099FF;

//复制到这里为止//

 

 

如果以上指标公式不适用于您常用的行情软件

或者您想改编成选股公式,以便快速选出某种形态个股的话,

可以联系我们相关技术人员 QQ: 262069696  进行有偿改编!

 

 

如果以上指标公式不适用于您常用的行情软件

或者您想改编成选股公式,以便快速选出某种形态个股的话,

可以联系我们相关技术人员 QQ: 262069696  点击在线交流进行 有偿 改编!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容