以下是通达信牛牛副图公式 副图 源码(无源码的请下载附件导入)
{================背景 ================};
DRAWGBK(ISLASTBAR, RGB(60,60,60),RGB(0,0,0),0,'0',0);
PJGJ:=AMOUNT/VOL/100;
SSRYDJX:=MA(PJGJ,13);
SSRCJL:=EMA(VOL,13);
SSRCJE:=EMA(AMOUNT,13);
SSRCBJX:=SSRCJE/SSRCJL/100;
CYS13:=(CLOSE-SSRCBJX)/SSRCBJX*100;
XYSHSL:=EMA(VOL/CAPITAL*100,13);
STICKLINE(XYSHSL>6.1 AND CYS13>5 ,20 ,0 ,1 ,0 ),COLORGREEN;
STICKLINE(XYSHSL>3.8 AND CYS13>5 ,15.30 ,0 ,2 ,0 ),COLORYELLOW;
STICKLINE(XYSHSL>2.1 AND CYS13>5 ,10 ,0 ,2 ,0 ),COLORCYAN;
STICKLINE(XYSHSL>1.8 AND CYS13>5 ,5.30 ,0 ,2 ,0 ),COLORBLUE;
RSVV1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
RSVV2:=(9*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*20,3,1)-3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*20,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*20,3,1),3,1),2,1));
RSVV:=(9*SMA((CLOSE-LLV(LOW,17))/(HHV(HIGH,17)-LLV(LOW,17))*20,3,1)-3*SMA(SMA((CLOSE-LLV(LOW,17))/(HHV(HIGH,17)-LLV(LOW,17))*20,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,17))/(HHV(HIGH,17)-LLV(LOW,17))*20,3,1),3,1),2,1));
短K:SMA(RSVV,2,1),COLORAACCDD;
短D:SMA(短K,2,1),COLORYELLOW;
STICKLINE(短K>短D,短K,短D,1,0),COLORRED;
STICKLINE(短K<=短D,短K,短D,1,0),COLORYELLOW;
{趋势线}
去除ST:=IF(NAMELIKE('ST'),0,1) AND IF(NAMELIKE('*ST'),0,1);
去除停牌:=DYNAINFO(4)>0;
XG:=去除ST AND 去除停牌;
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
FATK:=SMA(RSV1,5,1);
趋势线:=SMA(FATK,5,1);
买卖线:=(7*SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3,1),2,1));
买卖线1:=(ATAN((MA(买卖线,4)/REF(MA(买卖线,4),1)-1)*100)*180/3.1416);
趋势线3:=(ATAN((MA(趋势线,4)/REF(MA(趋势线,4),1)-1)*100)*180/3.1416);
{角度MA20:=ATAN((MA20/REF(MA20,2)-1)*100)*180/3.1416;
角度MA34:=ATAN((MA34/REF(MA34,2)-1)*100)*180/3.1416;
角度MA55:=ATAN((MA55/REF(MA55,2)-1)*100)*180/3.1416;}
选股:=买卖线1>=86 AND 趋势线3>=30 ;
{选股2:=角度MA13>=45 AND 角度MA20>=10 AND 角度MA20<40 AND 角度MA34>=-10;
选股3:=角度MA13<0 AND 角度MA20<0;
选股55:=角度MA55<30 AND 角度MA55>=15;}
低位金叉:=CROSS(买卖线,趋势线) AND 趋势线<趋势位;
JCCOUNT:=COUNT(CROSS(买卖线,趋势线),BARSLAST(趋势线>=位置));
二次金叉:=CROSS(买卖线,趋势线) AND 趋势线<70 AND COUNT(JCCOUNT=2,21)=1;
三次金叉:=CROSS(买卖线,趋势线) AND 趋势线<75 AND 趋势线>30 AND COUNT(JCCOUNT=3,60)=1;
{TH1:=EVERY(峰谷2线<0 AND 峰谷1线<0,40);
TH2:=COUNT(CROSS(峰谷1线,峰谷2线),60)>=3;}
A1:=BARSLAST(REF(CROSS(买卖线,趋势线),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND 趋势线>REF(趋势线,A1+1) AND CROSS(买卖线,趋势线);
底背离1:=IF (背离>=1,底背离,1);
XXXX:= 选股 AND 低位金叉 AND XG;
GGG := 选股 AND 底背离 AND 二次金叉 AND XG;
BBB1:= 选股 AND 底背离 AND 三次金叉 AND XG;
STICKLINE(FILTER(选股 AND 三次金叉 AND XG AND 底背离1,3),0,50,1,0),COLOR0080FF;
DRAWTEXT(FILTER(选股 AND 三次金叉 AND XG AND 底背离1,3),52,'3'),COLORRED;
STICKLINE(FILTER(选股 AND 二次金叉 AND XG AND 底背离1,3),0,40,1,0),COLOR00FFFF;
DRAWTEXT(FILTER(选股 AND 二次金叉 AND XG AND 底背离1,3),55,'2'),COLORRED;
STICKLINE(FILTER(选股 AND 低位金叉 AND XG AND 底背离1,3),0,30,1,0),COLORFF8000;
DRAWTEXT(FILTER(选股 AND 低位金叉 AND XG AND 底背离1,3),57,'1'),COLORRED;
{一绝}
Q_1:=C-REF(C,1);
Q_2:=100*EMA(EMA(Q_1,6),6)/EMA(EMA(ABS(Q_1),6),6);
Q_3:=CROSS(EMA(C,19),EMA(C,7));
Q_4:=CROSS(EMA(C,7),EMA(C,19));
ZD1:=L=LLV(L,BARSLAST(Q_3)+1);
ZD2:=LLV(L,BARSLAST(Q_3)+1);
ZD3:=H=HHV(H,BARSLAST(Q_4)+1);
ZD4:=HHV(H,BARSLAST(Q_4)+1);
Q_A:=DRAWLINE(ZD1,ZD2,ZD3,ZD4,0);
U111:=H=HHV(H,BARSLAST(Q_4)+1);
U222:=HHV(H,BARSLAST(Q_4)+1);
U333:=L=LLV(L,BARSLAST(Q_3)+1);
U444:=LLV(L,BARSLAST(Q_3)+1);
Q_B:=DRAWLINE(U111,U222,U333,U444,0);
TJ:=IF(Q_B<REF(Q_B,1) AND Q_B=Q_A,1,0);
BB11:=REF(TJ,1)=0 AND TJ>=1;
DRAWICON(BB11,55,7);
SS:=REF(Q_A<REF(Q_A,1) AND Q_B=Q_A,1)=0 AND TJ<1;
DRAWICON(SS,55,8);
{买卖点 卖出指标参考 副图}
{N 1 100 2 M 1 100 3}
{以下设置逃顶指标"MACD卖出"}
DIF:=EMA(EMA(EMA(CLOSE,5),5),5);
DEA:=EMA(EMA(EMA(CLOSE,7),7),7);
CDMA:=(DIF-DEA)*5;
MACD2:=CDMA;
MACD1:=CDMA;
低位反转:=MACD1<0 AND MACD1>REF(MACD1 ,1) AND REF(MACD1 ,1)<REF(MACD1 ,2)AND REF(MACD1 ,2)<REF(MACD1 ,3)AND REF(MACD1 ,3)<REF(MACD1 ,4);
STICKLINE(低位反转,0,MACD1,0.3,0),COLORRED;
高位反转:=MACD1>0 AND MACD1<REF(MACD1 ,1) AND REF(MACD1 ,1)>REF(MACD1 ,2)AND REF(MACD1 ,2)>REF(MACD1 ,3)AND REF(MACD1 ,3)>REF(MACD1 ,4);
STICKLINE(高位反转,0,MACD1,0.3,0),COLORGREEN;
VAR11:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
DRAWICON(高位反转,40,92);
DRAWICON(低位反转,40,42);
VAR12:=REF(C,1);
VAR13:=SMA(MAX(C-VAR12,0),6,1)/SMA(ABS(C-VAR12),6,1)*100;
DRAWTEXT(CROSS(84,VAR13),50,'×'),COLORGREEN ;
{以下设置"精确卖出"}
{N 1 100 2 M 1 100 3}
VAR2:=1;
VAR3:=REF(HIGH,1)*1.1;
VAR4:=HIGH*1.1;
VAR5:=(VAR4*VOL+VAR3*(CAPITAL-VOL))/CAPITAL;
VAR6:=REF(LOW,1)*0.9;
VAR7:=LOW*0.9;
VAR8:=(VAR7*VOL+VAR6*(CAPITAL-VOL))/CAPITAL;
VAR9:=EMA(VAR8,30);
VARA:=EMA(VAR5,30);
VARB:=VARA-2;
VARC:=IF(CLOSE<=VAR9,VARB,VARA);
VARD:=MA(CLOSE,80)-MA(CLOSE,10)/17;
买点: STICKLINE(VARC-VARB=0 AND VAR2 AND CROSS((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,MA((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,M)),0,30,2,0),COLORRED;
写字: DRAWTEXT(FILTER(VARC-VARB=0 AND CROSS((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,MA((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,M)),4),45,'买'),COLORRED;
VARE:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
卖出线:=SMA(SMA(VARE,3,1),3,1);
买入线:=3*SMA(VARE,3,1)-2*卖出线;
DRAWICON(CROSS(90,买入线),25,2);
卖出: DRAWTEXT(FILTER(CROSS(90,买入线),3),26,'卖'),COLORGREEN;
{以下设置"买卖点"的买点}
VAR4A:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5A:=SMA(VAR4A,13,8);
VAR8A:=EMA(C,5);
VAR9A:=MA((LLV(C,9))*1.1,14);
VAR10A:=2*VAR9A-VAR8A-C*0.1;
VAR11A:=IF(((VAR8A-VAR10A)*5>0),(POW((VAR8A-VAR10A)*5,2))/10,(-1*(POW((VAR8A-VAR10A)*
(5),2)))/(10));
VAR12A:=IF((VAR11A>0),VAR11A-0,12);
VAR13A:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
趋势:=CEILING(SMA(VAR5A,13,8)),LINETHICK2,COLOR0000FF;
{STICKLINE(FILTER(CROSS(趋势,VAR12A)AND 趋势>REF(C,1) OR 趋势>REF(趋势,1)AND 趋势<35
AND C>REF(C,1),5),0,20,1,0),COLORMAGENTA;
DRAWTEXT(FILTER(CROSS(趋势,VAR12A)AND 趋势>REF(C,1) OR 趋势>REF(趋势,1)AND 趋势<35
AND C>REF(C,1),5),35,'B'),COLORRED;}
{以下设置"追涨买入"的买点}
空:=EMA(C,5);
均衡:=EMA(空,5);
中轨:=HHV(MA(H,13),13);
追涨买入:IF(FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11),45,0),COLORWHITE;
DRAWTEXT(FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11),60,'追涨'),COLORWHITE;
{以下设置"筹码突破点"的突破点}
主筹估算:=EMA(WINNER(C)*70,3);
散筹估算:=EMA((WINNER(C*1.1)-WINNER(C*0.9))*70,3);
筹码突破见高卖:CROSS(主筹估算,散筹估算),COLORGREEN;
STICKLINE(CROSS(主筹估算,散筹估算),0,50,0.5,0),COLORGREEN;
DRAWTEXT(CROSS(主筹估算,散筹估算),51,'S'),COLORGREEN;
VAR111:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR133:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAREE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
DRAWTEXT(VAR111 AND COUNT(VAR111,30)=1,10,'机构进场'),LINETHICK1,COLORFF00FF;
VAR1A:=IF(VAREE>0,VAREE,0);
VAR1B:=IF(VAR14>=200 AND VAR133>=150,15,IF(VAR14<=-200 AND VAR133<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,10,'大顶(底)') COLORWHITE;
指标王:=CROSS(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),SMA(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),3,1)) AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1)<20;
DRAWTEXT(指标王,5,'主力建仓'),COLOR8000FF;
中中顶:=(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4*2-(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4,LINETHICK2,COLORGREEN;
中顶:=(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60),60))/4*2.03-(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),60))/4,LINETHICK2,COLORRED;
AF3:=EMA((CLOSE+HIGH+LOW)/3,3);
BF3:=REF(AF3,1);
逃顶:=CROSS(BF3,AF3) AND H>中中顶 AND H>中顶;
DRAWTEXT(逃顶,70,'逃'),COLORGREEN;
{蝴蝶}
DIF11:=(EMA(DCLOSE,12)-EMA(DCLOSE,26))/EMA(DCLOSE,26)*100;
DEA11:=EMA(DIF11,9);
AAA11:=(DIF11-DEA11)*120;
买12:=45;
入12:=AAA11-REF(AAA11,1);
正大:=CROSS(入12,买12);
DIFFF:=(EMA(DCLOSE,10)-EMA(DCLOSE,72))/EMA(DCLOSE,72)*100;
DEAAA:=EMA(DIFFF,17);
AAAA:=(DIFFF-DEAAA)*100;
牛股:=CROSS(AAAA-REF(AAAA,1),45);
正大牛股:=(正大 AND 牛股);
角线:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=PLOYLINE(CROSS(角线,角线MA),角线MA);
ANB:=PLOYLINE(CROSS(角线MA,角线),角线MA);
角买:=CROSS(角线,角线MA) AND ((ANB>REF(ANB,1) AND ANB>ANA AND 角线MA<=0) OR ((角线MA<=-45 OR CROSS(角线MA,-45)) AND (ANB<-60 OR LLV("KDJ.J",3)<=-49) AND ANB>0));DRAWTEXT_FIX(1,0.980,20,1,'★分析家公式网'),COLORYELLOW;
角买点:=角买=1;
AA10:=MA(CLOSE,8);
BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);
均线30:=MA(CLOSE,30);
均线89:=MA(CLOSE,89);
均线:=MA(CLOSE,16);
天马:=((((((OPEN <= 均线) AND ((均线30 - REF(均线30,1)) > 0))
AND (CLOSE > 均线89)) AND (BB10 > 1)) AND ((CLOSE / OPEN) > 1.04)));
{股价必涨}
AA121:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
SS121:=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:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS121,2);
BB121:=MR AND NOT(REF(MR,1));
股价必涨:=(AA121 OR BB121 OR 角买点 OR 天马);
{抄底}
二十日换手率:=BETWEEN(SUM(HSCOL,20),10,200);{意思是 20日换手率介于10---100之间}
DFO:=(C-REF(C,1))/REF(C,1)*100<-5;
AAO:=BARSLAST(DFO);
突破12:=CROSS(C,REF(O,AAO));
抄底:=(二十日换手率 AND 突破12);
大牛:=(正大牛股 AND 股价必涨);
必涨:=(正大牛股 AND 抄底);
大牛股:=(大牛 AND 必涨 AND 抄底);
DRAWICON(大牛>0,70,28);
DRAWICON(必涨>0,72,29);
DRAWICON(大牛股>0,74,30);
AA05:=MA(C,5),COLOR0099CC;
五日乖离率:=(C-AA05)/AA05*100;
BB0512:=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)),3),NODRAW;
AA1012:=MA(C,10);
AA2012:=MA(C,20);BB1012:=ATAN((AA1012/REF(AA1012,1)-1)*100)*180/3.1416;
AA3012:=MA(C,30);
三拾日乖离率:=(C-AA3012)/AA3012*100;
BB30:=ATAN((AA3012/REF(AA3012,1)-1)*100)*180/3.1416;
强势追击:=FILTER(BB30>30 AND BB1012>45 AND
CROSS(BB0512,60),10);
加仓:=FILTER(COUNT(CROSS(BB0512,30),5)>=1 AND
AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND
AA1012>REF(AA1012,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB0512),5)>=1 AND (C>AA3012 OR O>AA3012) AND
AA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND
AA1012<REF(AA1012,1),10);
DRAWICON(加仓 ,65,21);
DRAWICON(清仓 ,68.025,43);
DRAWICON(强势追击 ,71,11);
{有庄控盘}
VAW1:=EMA(EMA(CLOSE,13),13);
控盘:=(VAW1-REF(VAW1,1))/REF(VAW1,1)*1000;
无庄控盘:=控盘<0;
有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;
{分时价格原码}
JJ:=DYNAINFO(11);
{波段买卖原码}
P:=21;S:=8;M1:=3;
财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*50;
神:=EMA(财,M1);
{股价与均线偏离买卖条件}
BTJ1:=(C-JJ)/JJ<-0.03;
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;
STJ1:=(C-JJ)/JJ>0.005;
{控盘买卖条件}
STJ01:=控盘<REF(控盘,1) AND 控盘>0.5;
STJ02:=控盘>0;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;
{波段买卖条件}
BTJ3:=CROSS(财,神) AND 财<-0.3;
BTJ32:=CROSS(财,神) AND 财<-0.1;
STJ31:=CROSS(神,财);
STJ32:=CROSS(神,财) AND 财>1.618;
{以下为信号};
BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);
STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);
STJ82:=FILTER(STJ02 AND STJ32 ,13);
STJ83:=STJ81 AND STJ82;
庄:= BTJ11 AND BTJ2 AND BTJ3;
{庄:=FILTER(STJ83,2);}
DRAWTEXT(庄,20,'↖庄进'),COLORYELLOW;
DRAWTEXT(BTJ82,72,'来'),COLORYELLOW;
DRAWTEXT(BTJ811,65,'人'),COLORYELLOW;
DRAWTEXT(BTJ81,61,'吧'),COLORYELLOW;
VAR01:=C-REF(C,1);
VAR02:=100*EMA(EMA(VAR01,6),6)/EMA(EMA(ABS(VAR01),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;
BT:=(LLV(VAR02,2)=LLV(VAR02,7) AND COUNT(VAR02<0,2) AND CROSS(VAR02,MA(VAR02,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
STICKLINE(BT,95,100,5,0),COLOR000088;
STICKLINE(BT,95,100,2,0),COLOR0000CC;
STICKLINE(BT,95,100,0.22,0),COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
STICKLINE(TJ1,90,95,7,0),COLOR880088;
STICKLINE(TJ1,90,95,1.7,0),COLORAA00AA;
STICKLINE(TJ1,90,95,0.9,0),COLORCC00CC;
STICKLINE(TJ1,90,95,0.4,0),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
STICKLINE(TJ2,85,90,9,0),COLOR008888;
STICKLINE(TJ2,85,90,6,0),COLOR00AAAA;
STICKLINE(TJ2,85,90,4,0),COLOR00CCCC;
STICKLINE(TJ2,85,90,0.3,0),COLOR00FFFF;
VA6CF:=(CLOSE+HIGH+LOW)/3;
VA8FF:=LLV(LOW,34);
VARB3234:=HHV(HIGH,34);
VARC445:=EMA((VA6CF-VA8FF)/(VARB3234-VA8FF)*100,13);
VARD333:=EMA(0.667*REF(VARC445,1)+0.333*VARC445,2);
VARE23:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VARF32:=MA(VARE23,3);
VAR6343:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR8321:=LLV(LOW,34);
VAR1123:=HHV(HIGH,34);
B1323:=EMA(((VAR6343-VAR8321)/(VAR1123-VAR8321))*(100),8);
DRAWKLINE(EMA(B1323,5),EMA(B1323,5),B1323+1,B1323),NODRAW;
领先:EMA(B1323,5),COLORCYAN,NODRAW;
生命线:EMA(VARD333,1),COLORYELLOW,NODRAW;
V11221:=MA(C,5)=HHV(MA(C,5),20);
V223:=MA(C,5)>MA(C,10);
V333:=MA(V,5)>MA(V,40)*1.01;
V4333:=COUNT(MA(C,1)>REF(C,1),2)=2;
VV332:=V11221 AND V223 AND V333 AND V4333;
A1324:=EMA(CLOSE,8);
A23423:=EMA(A1324,20);
A355:=CROSS(A1324,A23423);
A4323:=A1324<EMA(CLOSE,120);
A53223:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*
SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1),CIRCLEDOT ,COLORFF9900 ;
安全位:=20;
低位转强:IF(CROSS(A53223,安全位),50,0),STICK,COLORMAGENTA,LINETHICK2;
开始拉升:IF(CROSS(VARC445,生命线) AND VARC445>VARD333 AND VARC445<55 AND C>O,50,0),
COLORLIRED;
A654:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);
极地上涨:IF(A654,领先,0),COLORGREEN,LINETHICK2,NODRAW;
{STICKLINE(开始拉升>0,15,开始拉升*1.01,1,0),COLORBLUE;}
{STICKLINE((开始拉升>0 AND 开始拉升<400) OR (极地上涨>0 AND 极地上涨<400)
OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),30,开始拉升,1,0),COLORFF0080;}
DRAWICON((开始拉升>0 AND 开始拉升<400) OR (极地上涨>0 AND 极地上涨<400)
OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),48,25);
{短中长预}
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19),COLORRED;
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4),LINETHICK2;
长期线:A+100,COLORFFFFFF;
短期线:=B+100,COLOR888888,DOTLINE,COLORFFFF00;
中期线:D+100,COLORC08080,DOTLINE;
80,COLOR996699;
20,COLORGREEN;
10,COLORCC6633,LINETHICK2;
90,COLOR9966FF,LINETHICK2;
见顶:=((REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线)) ,COLORGREEN;
顶部区域:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5
AND 短期线<中期线 AND 短期线<长期线+4,COLORGREEN;
顶部:=FILTER(顶部区域,4);
STICKLINE( {见顶 OR} 顶部,99,103,20,1 ),COLORRED,LINETHICK2;
底部区域:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))
OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1) ,COLORGREEN;
STICKLINE( 底部区域,-4,0,22,0 ),COLORGREEN;
低位金叉1:50*(长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线
AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线 OR REF( 短期线,1)<1 )),COLORRED;
STICKLINE( 低位金叉,0,5,11,0 ),COLORRED;
1356222077.png
|