当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:大盘情绪结合DMI公式,黄金托底买,抄底老鼠仓

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、大盘情绪结合DMI公式

大盘情绪 组合 DMI指标

公式解释:
判断强势的标准是:DMI指标中的PDI大于其他三条线
 
{DMI大盘情绪}
{参数N=15,M=5}
N:=15;
M:=5;
DRAWGBK(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0);
沪A涨家数:="999999$ADVANCE",COLORRED,NODRAW;
深A涨家数:="399107$ADVANCE",COLORRED,NODRAW;
创业板涨家数:="399006$ADVANCE",COLORRED,NODRAW;
中小板涨家数:="399005$ADVANCE",COLORRED,NODRAW;
沪A跌家数:="999999$DECLINE",COLORGREEN,NODRAW;
深A跌家数:="399107$DECLINE",COLORGREEN,NODRAW;
创业板跌家数:="399006$DECLINE",COLORRED,NODRAW;
中小板跌家数:="399005$DECLINE",COLORRED,NODRAW;
上涨总家数:沪A涨家数+深A涨家数+创业板涨家数+中小板涨家数,COLORRED,NODRAW;
下跌总家数:沪A跌家数+深A跌家数+创业板跌家数+中小板跌家数,COLORGREEN,NODRAW;
大盘情绪:上涨总家数*100/(上涨总家数+下跌总家数),LINETHICK1;
涨停:"880006$H" NODRAW COLOR0000FF;
跌停:"880006$O" NODRAW COLORGREEN;
沸:90,COLORRED;
温:50,COLORWHITE;
冰点看连板:10,COLORGREEN;
MTR:=SUM(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:=SUM(IF(HD>0&&HD>LD,HD,0),N);
DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/MTR,LINETHICK2,COLORGREEN;
MDI: DMM*100/MTR,DOTLINE,COLORYELLOW;
ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M),DOTLINE,COLORYELLOW;
ADXR:(ADX+REF(ADX,M))/2,DOTLINE,COLORYELLOW;



2、黄金托底买,短线主图

操作:=MA(C,3);
HHV(操作,15),LINETHICK1,COLORYELLOW,DOTLINE;
K线分界:HHV(操作,15),LINETHICK1,COLORYELLOW,DOTLINE;
DRAWTEXT(ISLASTBAR,K线分界,STRCAT('K线分界:',CON2STR(K线分界,2))),COLORYELLOW;
 
VAR1:=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;
 
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3.1,0),COLOR00FFFF;
DRAWTEXT(VAR19,L-0.11,'黄'),COLOR00FFFF;
DRAWTEXT(VAR19,L-0.17,'买'),COLOR00FFFF;
VAR1PP:=REF(C,1);
VAR15PP:=SMA(MAX(C-VAR1PP,0),7,1)/SMA(ABS(C-VAR1PP),7,1)*100;
 
 STICKLINE(CROSS(78,VAR15PP),C,O,2,0) ,COLOR00FF00,LINETHICK1;
DRAWTEXT(CROSS(78,VAR15PP),H+0.18,'止') ,COLOR00FF00;
DRAWTEXT(CROSS(78,VAR15PP),H+0.07,'赢') ,COLOR00FF00;
VAR2HH:=IF(CLOSE>OPEN,CLOSE,OPEN);
VAR3HH:=REF(VAR2HH,BARSLAST(VOL=HHV(VOL,60)));
韭菜点:=(LOW<=REF(VAR3HH,1)*0.6 AND REF(LOW,1)>REF(VAR3HH,1)*0.6 AND REF(LOW,2)>REF(VAR3HH,1)*0.6 AND REF(LOW,3)>REF(VAR3HH,1)*0.6),COLORGREEN;
STICKLINE(韭菜点,C,O,3,0),COLORLIRED;
STICKLINE(韭菜点,H*1.1,L-0.15,0,0),COLORLIRED;
DRAWTEXT(韭菜点,L-0.05,'韭菜'),COLORLIRED;
波段底:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1)); 
DRAWTEXT(CROSS(波段底,3),L-0.04,'底'); 
买卖:=(EMA(C,3.14)+EMA(C,6.28))/2,COLORRED,NODRAW;
吸:=买卖*0.935,COLORWHITE,NODRAW;
抛:=买卖*1.075,COLORYELLOW,NODRAW;
DRAWTEXT(L<买卖*0.935,L*0.99,'吸1/5')COLORYELLOW;
DRAWTEXT(L<买卖*0.935,L*0.98,'反弹出')COLORYELLOW;
DRAWTEXT(H>买卖*1.075 AND C/REF(C,1)<1.091,H*1.015,'抛一半'),COLORWHITE;
DRAWTEXT(H>买卖*1.075 AND C/REF(C,1)<1.091,H*1.007,'再低吸'),COLORWHITE;



3、抄底老鼠仓

大盘大幅回调,又到了做底的时候,符合使用这个公式。

 
抄底老鼠仓使用方法如下:
1、公式注重抄底和逃顶,区别于其他公式单独一个底部信号出现都不是非常准确,所以组合了3个抄底公式(抄底、老鼠仓、精准买)来判断底部,用了(开盘逃、精准卖和卖出)三个逃顶公式组合判断顶部,这样的风险小了很多,当抄底和精准买同时出,或者抄底和老鼠仓同时出,准确率较高。
2,本公式可以用于分时图,5分钟分时图可以判断卖点。( 股 民 学 院 : http://www.58188.net )
3,只要遵守公式买卖,赚钱定比亏钱多, 宁可少赚也不要赔钱,祝大家一起发发发。
下面两张图一个是日线上体现的主图,一个5分钟分时看的主图。

MMS:=MA(SMA((L+H+2*C)/4-REF((L+H+2*C)/4,1),5,1)/SMA(ABS((L+H+2*C)/4-REF((L+H+2*C)/4,1)),5,1)*100,1)+50;
G1:=IF(-MMS>95,0,20);
UOO:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LLV(CLOSE,7))*100=100)>0 AND G1)+1);
KS:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));
KS1:=IF(BARSCOUNT(C)=1,C/10000,(1-C/SMA(C,13,1))*100);
趋势线:=EMA(((KS / 10) + EMA(CLOSE,10)),3);
AA:=-100*(趋势线-CLOSE)/趋势线;
AC:=(EMA(AA,5) );
SSL:=EMA(CLOSE,3);
MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
MM:=MA(MMV,1);
SA:=(MM*0.985);
SS:=(MA(CLOSE,5));
DD:=(MA(CLOSE,13));
GG:=(MA(CLOSE,21));
牛熊分界线:IF(((SSL>MM)),MM,SA),LINETHICK2,COLORFF00FF;
IF(SSL<MM,牛熊分界线,DRAWNULL),LINETHICK2,COLORGREEN;
能量线:=DMA(((CLOSE + OPEN) / 2),(VOL / (SMA(VOL,4,1) *4)));
上开:=O;
上收:=C;
上高:=H;
上低:=L;
JJ:=(上开+上高+上低)/3;
A:=EMA(JJ,4);
黄金线:=A,COLORYELLOW,LINETHICK1;
B:=REF(A,1);
VA1:=EMA(上收,8);
VA2:=EMA(上收,20);
{DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),LOW*0.98,'★抄底有未来,牛市准') ,LINETHICK2,COLORRED;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.03,'★卖有未来,熊市卖准,高卖低补!'),COLORGREEN;}
DRAWTEXT(CROSS(VA1,VA2)AND(C>=O)AND 黄金线>REF(黄金线,1),VA1*0.985,'★追涨'),COLORYELLOW;
压力:MA(REF(HHV(上收,30),1),2),COLORABFF46,LINETHICK1;
支撑:MA(REF(LLV(上收,30),1),2),COLORMAGENTA,LINETHICK1;
{所以压力线是前期一个月甚至半年的最大阻力位。如果主力突然有一天突破了半年甚至以上的阻力位了,这就说明主力解放了前面很多被套投资者。这时个股可能还有涨幅!};
{老鼠仓}
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
DRAWTEXT(FF1,LOW*0.96,'老鼠仓'),COLOR4080FF;
{预测明天}
XXS:=MA(LOW,5)*(1-5/100);
XXS1:=MA(HIGH,5)*(1+5/100);
均线:=C,COLORGREEN;
AAAA:=CLOSE/REF(CLOSE,3)<=0.85 AND CROSS(C,XXS) AND C>REF(C,1),LINETHICK1 ;
DRAWTEXT(AAAA,LOW*0.95,'下影买'),COLORRED;
BBAA:=CROSS(XXS1,C);
DRAWTEXT(CROSS(XXS1,C),HIGH*1.04,'开盘逃'),COLORGREEN;
DDDD:=CROSS(C,XXS1);
DRAWTEXT(DDDD,HIGH*1.03,'明日走'),COLORYELLOW;
{加仓一出,当日就会出高点,在高点不能加仓,要当日逢高全出,所以把加仓改成了慎追涨,安全第一!}
MA5:MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA30:MA(CLOSE,30),LINETHICK1;
五日乖离率:=(C-MA5)/MA5*100;
BB05:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
SSR:=(C-MA30)/MA30*100,NODRAW;
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA5>REF(MA5,1)  AND SSR>REF(SSR,1) AND MA10>REF(MA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1)  ,10) ;
DRAWTEXT(加仓 ,LOW*0.96,'◆慎追涨'),COLORYELLOW;
{彩色攻击线}
攻击线:MA(C,5),LINETHICK2,COLOR00CCFF;
MA05:=MA(C,5);
IF(BB05>30 AND MA05>REF(MA05,1), MA05,DRAWNULL),LINETHICK2,COLORRED;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
IF(BB05<0 AND MA05<REF(MA05,1), MA05,DRAWNULL),LINETHICK2,COLORGREEN;
{精准买卖点主图}
MA18:=MA(CLOSE,18);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
DRAWTEXT(FILTER(买=1,5),LOW,'★精准买'),COLORRED;
加1:=MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18);
DRAWTEXT(加1,LOW,'★精准加'),COLORCC66FF;
卖一:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖一=1,1),HIGH*1.01,'★精准卖'),COLORGREEN;
{涨停标志线}
涨停:=IF((C-REF(C,1))/REF(C,1)>0.097,1,0);
STICKLINE(涨停,OPEN,CLOSE,0.5,0),COLORYELLOW;
{出水芙蓉倍量主图}
EMA20:EMA(C,20),COLORWHITE,NODRAW;
EMA40:EMA(C,40),COLORYELLOW,NODRAW;
EMA60:EMA(C,60),COLORFF00FF;
MA020:=EMA(CLOSE,20);
MA040:=EMA(CLOSE,40);
MA060:=EMA(CLOSE,60);
A1:=OPEN<MA020 OR OPEN<MA040 OR OPEN<MA060;
A2:=C>MAX(MA020,MAX(MA040,MA060));
A3:=V/MA(V,10)>1.2;
A4:=C/REF(C,1)>1.049;
A5:=VOL/REF(VOL,1)>=1.9;
出水芙蓉:=A1 AND A2 AND A3 AND A4 AND A5 AND O<MA060 AND C>MA060;
DRAWTEXT(出水芙蓉,H-0.20,'出水芙蓉');

上一篇:通达信源码:空中加油组合,清泉子低位进,超牛高位逃顶

下一篇:通达信公式下载:黄金macd金叉,翻倍标王,黄金坑-谷神