牛牛指标网原创:通达信分时主图公式指标源码
{P= 0 , 2 , 2}
黄金卖点:=EMA(C+(H-L)*0.618,3);
黄金买点:=EMA((O+H+L)/3,4);
预测明买:=EMA((O+H+L)/3,4)+((H+L)/2-REF((O+H+L)/3,3))/4,NODRAW;
预测明卖:=EMA(C+(H-L)*0.618,3)+(EMA(C+(H-L)*0.618,3)-黄金买点)*0.618;
今买:=REF(预测明买,1),NODRAW;
今卖:=REF(预测明卖,1),NODRAW;
{分时_日线两用主图}
NN:=250;
最高:=CONST(HHV(H,NN));
最低:=CONST(LLV(L,NN));
RCC2:=最高*0.9-(最高-最低);
RCC1:=最高-(最高-最低)/2;
RHL:=RCC2;
HLMAX:=最高;
HLMIN:=最低;
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=(100-0)/2*1.3;
HLMN4:=(100-0)/1*1.3;
{时间设置}
CC:=CLOSE,COLORWHITE,LINETHICK2;
VAR7:=SMA(CC,6.18,1);
VAR8:=SMA(VAR7,3.14,1);
BB:=ATAN(VAR7-REF(VAR7,1))*3.1416*10,NODRAW,COLORWHITE;
EE:=ATAN(VAR8-REF(VAR8,1))*3.1416*10,NODRAW,COLORWHITE;
【立度】:BB+EE,NODRAW,COLORYELLOW;
TJ:=FILTER(C,239)>0,NODRAW;
TJJ:=SUM(TJ,0),NODRAW;
TJA:=CONST(TJJ),NODRAW;
LTA:=FINANCE(7)+300000000;
GB:=2*IF(FINANCE(7)<100000000000,FLOOR(ABS((FINANCE(7)/1000000000-1))),FLOOR(ABS((FINANCE(7)/1000000000-1)))/10),NODRAW ;
C1:=CLOSE;
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 );
T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;
TTA:=INTPART(2*T/5)+20;
{强弱界}
MMA30:=EMA(CLOSE,30);
强弱界定:=IF(PERIOD=0 ,EMA(CLOSE,900),DRAWNULL);
DRAWBAND(MMA30,RGB(100,0,0),强弱界定,RGB(95,120,115));
RCC:=IF(PERIOD=0 ,DYNAINFO(3),DYNAINFO(3)*0.9);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=4*(S2-S6);
KK:=1;
{分时MACD}
昨收:=RCC;
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24));
DEA:=(EMA(DIF,6));
MACD:=5*(DIF-DEA);
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),RCC*1,MACD*3+RCC*1,4,0),COLOR992299,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),RCC*1,MACD*3+RCC*1,4,0),COLOR774422,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),RCC*1,MACD*3+RCC*1,4,0),COLOR064499,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),RCC*1,MACD*3+RCC*1,4,0),COLOR774422,LINETHICK3;
STICKLINE(DK>0,RCC*KK,RCC*KK+DK,1,1),COLOR00AAAA;
STICKLINE(DK<0,RCC*KK,RCC*KK+DK,1,1),COLORBROWN;
{牛牛指标网提供 www.tdx001.com}
{多头MACD}
DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;
DEAA:=EMA(DIFF,18);
多头MACD:=(-3*(DIFF-DEAA))*20,NODRAW;
ZD:=HHV(多头MACD,0);
ZX:=LLV(多头MACD,0);
CZ:=(Q2-Q3)/6;
FDM:=MAX(ABS(ZD),ABS(ZX))*1.5;
RB:=IF(PERIOD=0 ,(Q2+Q3)/2+2*(Q2-Q3)/3/FDM*多头MACD,DRAWNULL);
{牛牛指标网提供 www.tdx001.com}
STICKLINE(PERIOD=0 AND 多头MACD>0,RB,(Q2+Q3)/2,4,1),LINETHICK1,COLORFF00FF;
STICKLINE(PERIOD=0 AND 多头MACD<0,RB,(Q2+Q3)/2,4,1),LINETHICK1,COLOR00FF00;
{火焰山及底部信号}
EEEE:=IF((P<2 AND PERIOD!=0) OR PERIOD=0 ,(RCC-ZS)/5,DRAWNULL);
FVAR1:=REF(LOW,1);
FVAR2:=SMA(ABS(LOW-FVAR1),13,1)/SMA(MAX(LOW-FVAR1,0),13,1);
FVAR3:=EMA(FVAR2,13);
FVAR4:=LLV(LOW,34);
FVAR51:=EMA(IF(LOW<=FVAR4,FVAR3,0),3);
FVAR5:=IF(FVAR51>20,20,FVAR51);
主力进场:STICKLINE(FVAR5>REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,4,0 ),COLORRED;
STICKLINE(C>0 AND PERIOD!=0 AND FVAR5>REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE*3,4,0 ),COLOR0000BB;
STICKLINE(FVAR5<REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,5,1),COLORGREEN;
STICKLINE(C>0 AND PERIOD!=0 AND FVAR5<REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE*3,5,1),COLORGREEN;
FVAR6:=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);
FVAR7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV
(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
FVAR8:=FVAR6<REF(FVAR7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(TJA<3 AND FVAR8 AND COUNT(FVAR8,30)=1,(Q2+Q3)/2+3*EEEE,'★牛牛指标');
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,(Q2+Q3)/2,(Q2+Q3)/2+3*EEEE,4,0),COLOR00FFFF;
DRAWTEXT(TJA<3 AND 二次金叉,(Q2+Q3)/2+4*EEEE,' 牛牛指标二金'),COLORYELLOW;
HHH:=MA(CLOSE,10);
GGG:=MA(CLOSE,12);
上:=EMA((MA(HIGH,3) * 1.05),30);
下:=EMA((MA(LOW,3) * 0.96),30);
决战:STICKLINE((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND
(DIF < 0)),(Q2+Q3)/2,(Q2+Q3)/2+4*EEEE,1,0),COLOR0000FF;
DRAWTEXT(TJA<3 AND (((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND (DIF
<= 0)),(Q2+Q3)/2+5*EEEE,'DIF金叉'),COLOR0000FF;
{两个买进信号}
RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100);
K:=SMA(SMA(RSV,18,1),3,1);
D:=MA(EMA(K,18),3);
短买:=CROSS(K,D) AND K>0 AND CLOSE<DYNAINFO(3)*1.07;
DRAWTEXT(TJA<3 AND 短买,(Q2+Q3)/2+(Q2-Q3)/1+3*EEEE,'短买'),COLORFF00FF;
YY:=SMA(VOL,30,1);
量1:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30));
量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.92;
短横:=((HHV(CLOSE,TTA)-LLV(CLOSE,TTA))/CLOSE)<0.03;
横后上涨:=(CLOSE/DYNAINFO(3))>=1.02=0 AND 短横 AND 量 AND CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2));
上涨:=FILTER((CROSS(横后上涨,0)AND 量 AND T>60
OR (T>60 AND CLOSE<DYNAINFO(3)*1.04 AND (量1<0.5 OR 量1=1) AND BARSLAST(CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2)))<3
AND CROSS(C,MA(HHV(C,TTA),1)))),30);
DRAWTEXT(TJA<3 AND 上涨,(Q2+Q3)/2+(Q2-Q3)/1+3*EEEE,'★涨'),COLORRED,LINETHICK3;
DRAWBAND(VAR7,RGB(250,250,50),VAR8,RGB(83,250,68));
ZF:=(EMA(SUM(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)),3),49) * 10)+EMA(C,20);
M20:IF(PERIOD!=0 ,MA(C,20),DRAWNULL),COLORWHITE;
★强势线★:IF(PERIOD!=0 ,EMA(ZF,34),DRAWNULL),LINETHICK2,COLOR00FFFF;
IF(PERIOD!=0 ,MA(C,120),DRAWNULL)COLORBLUE;
DRAWICON(C<200 AND PERIOD!=0 AND 【立度】>20,H,2);
B1:=REF(CLOSE,1);
B2:=REF(CLOSE,2);
B3:=REF(CLOSE,3);
B4:=REF(CLOSE,4);
CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);
CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);
持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND (B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR
(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);
变盘:=CLOSE=CMAX AND B1=CMIN;
下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND (B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR
(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);
买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR
(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);
抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR
(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);
STICKLINE(PERIOD!=0 AND 持股,B1,CLOSE,3,0),COLOR000099;
STICKLINE(PERIOD!=0 AND 变盘,B2,CLOSE,3,0),COLOR0099EF;
STICKLINE(PERIOD!=0 AND 下跌,B1,CLOSE,3,0),COLOR009900;
STICKLINE(PERIOD!=0 AND B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3.5,0),COLOR009900;
STICKLINE(PERIOD!=0 AND 买入,B1,B2,3,0),COLOR00FFFF;
STICKLINE(PERIOD!=0 AND 抛售,B1,B2,3,0),COLORFFFFFF;
STICKLINE(PERIOD!=0 AND C>=O,L,H,0,1),COLORRED;
STICKLINE(PERIOD!=0 AND C<O,H,L,0,1),COLORGREEN;
STICKLINE(PERIOD!=0 AND 持股 OR 买入,O,C,1.5,0),COLORRED;
STICKLINE(PERIOD!=0 AND 下跌 OR 抛售,O,C,1.5,0),COLORGREEN;
STICKLINE(PERIOD!=0 AND C>0,O,C,0,0),COLORFFFFFF;
DRAWTEXT_FIX(P=0 AND PERIOD!=0 AND ISLASTBAR ,0,0.0,0,STRCAT('今日买点:',CON2STR(REF(预测明买,1),2))),COLORCYAN;
DRAWTEXT_FIX(P=0 AND PERIOD!=0 AND ISLASTBAR ,0,0.08,0,STRCAT('今日卖点:',CON2STR(REF(预测明卖,1),2))),COLORCYAN;
DRAWTEXT_FIX(P=0 AND PERIOD!=0 AND ISLASTBAR ,0.20,0,0,STRCAT('预测明日买点:',CON2STR(预测明买,2))),COLORWHITE;
DRAWTEXT_FIX(P=0 AND PERIOD!=0 AND ISLASTBAR ,0.20,0.08,0,STRCAT('预测明日卖点:',CON2STR(预测明卖,2))),COLORWHITE;
DRAWTEXT_FIX(P=0 AND PERIOD!=0 ,0,0.16,0,'黄持股、绿持币、 强势线上多关注、黄带立度送你金。'),COLORYELLOW;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDD1:=((3 * RRRSV) - (2 * KKK));
JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
RSV24:=SMA(JJ12,3,1);
K24:=SMA(RSV24,3,1);
D24:=((3 * RSV24) - (2 * K24));
压力:=IF(CROSS(D24,DDD1),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDD1)))),COLORFFFFFF;
决策:=IF(ISLASTBAR,压力,DRAWNULL),COLORMAGENTA;
STICKLINE(ISLASTBAR ,决策,决策,60,1),LINETHICK3,COLORMAGENTA;
底部:=LLV(HIGH,30),COLOR00FF00;
超跌:=IF(ISLASTBAR,底部,DRAWNULL),COLORRED;
STICKLINE(ISLASTBAR ,超跌,超跌,60,1),LINETHICK3,COLORRED;
IF(PERIOD=0 ,C,DRAWNULL)LINETHICK1,COLORFFFFFF;
分时均价线:IF(PERIOD=0 ,SUM(C*V,240)/SUM(V,240),DRAWNULL),COLORYELLOW;
IF(PERIOD!=0,EMA((O+H+L)/3,4)+((H+L)/2-REF((O+H+L)/3,3))/4,DRAWNULL)COLORGREEN;
1756222313.jpg
|