您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:空明8号 指标共振、背离尽在其中(源码)

空明8号 指标共振、背离尽在其中(源码)


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:8.00 KB
更新时间:2010-08-16 09:42:00
公式简介:

M1:=MA(C,21)COLORCFB53B;
M2:=MA(C,62)COLOR3399FF;
M4:EMA(C,3);
攻击线:EMA(C,5);
DRAWBAND(M1,RGB(255,153,204),M2,RGB(153,204,204));
VAR17:=SMA(((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20)))*(100),4,1);
VAR1D:=((CLOSE-MA(CLOSE,13))/(MA(CLOSE,13)))*(100);
VAR1E:=100-ABS(VAR1D);
DD:=((3)*(VAR17-50))*(2)-(2)*(SMA((VAR17-50)*(2),3,1)),COLOR00FFFF;
警1:=IF((BARSCOUNT(CLOSE)<13),100,IF((VAR1E<88) AND (VAR1D>0),85,100)),COLORCCFFCC;
警2:=IF((BARSCOUNT(CLOSE)<13),(-100),0-IF((VAR1E<92) AND (VAR1D<0),85,100)),COLORGREEN;

VAR22:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*200*10;
能量:= SMA(VAR22,5,1);
次险区:=1500;
底部区:=200;

操盘线:MA(C,12),LINETHICK2,COLORYELLOW;
生命线:EMA(C,34),POINTDOT,LINETHICK4,COLORYELLOW;
MA3:EMA(CLOSE,144),LINETHICK2,COLORGRAY;
上升:IF(操盘线>REF(操盘线,1),操盘线,DRAWNULL),LINETHICK2,COLORRED;
下降:IF(操盘线<=REF(操盘线,1),操盘线,DRAWNULL),LINETHICK2,COLORGREEN;
YY:=(H+L+C)/3;
MA1:=MA(C,21);

JB:=C;
WW:=CURRBARSCOUNT<=5;
WW1:=CURRBARSCOUNT<=1;
WW2:=CURRBARSCOUNT=60;
HH:=CONST(HHV(JB,144));
LL:=CONST(LLV(JB,144));
①:HH,NODRAW,;
③:CONST(HH-(HH-LL)*1/2),NODRAW;
⑤:LL,NODRAW;
STICKLINE(WW,①,①,2,0),COLORYELLOW;
STICKLINE(WW,⑤,⑤,2,0),COLORYELLOW;
STICKLINE(WW,③,③,2,0),COLORYELLOW;
DRAWTEXT(WW1,①*1.01,'1');
DRAWTEXT(WW1,③*1.01,'3');
DRAWTEXT(WW1,⑤*1.01,'5');
STICKLINE(DD>=警1 AND 能量>=次险区,⑤*1.618,⑤*1.309,3.5,0),COLOR999999;
STICKLINE(DD<=警2 AND 能量<=(底部区+100),⑤*1.5,⑤*1.236,3.5,0),COLORFF80FF;
DRAWTEXT(WW2,①*1.0382,'股道至简: 【避 免 风 险 ,保 住 本 金 , 遵 守 纪 律】');
KM1:=CONST(IF(M4>攻击线,1,0));
KM3:=CONST(IF(M4<攻击线,1,0));
DRAWTEXT(KM1 AND WW2,①*1.0191,' (*^__^*) ┨ 操 做 区┠ ');
DRAWTEXT(KM3 AND WW2,①*1.0191,' ~(>_<)~ ┨ 观 望 区┠');

DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEA:=EMA(DIF,9);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,3),COLORYELLOW;
D:=SMA(K,9,3),COLORWHITE;
J:=3*K-2*D,COLORMAGENTA;
A22:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A22+1)>C AND REF("KDJ.K"(9,3,3),A22+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
DRAWICON(B2,L/1.0382,25);
A222:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
B22:=REF(C,A222+1)<C AND REF("KDJ.K"(9,3,3),A222+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
DRAWICON(B22,H*1.0382,24);
B4:=CROSS(DIF,DEA) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
B5:=CROSS(DEA,DIF) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));

VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);
VAR2:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+
(CLOSE-LOW)),VOL/2)),POINTDOT,COLORRED;
卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,
0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;
BB:=(买盘+卖盘);
BB1:=MA(BB,3);
BB2:=MA(BB,5);
V11:=BARSLAST(REF(CROSS(BB2,BB1),1));
V12:=REF(C,V11+1)<C AND REF(BB2,V11+1)>BB2 AND CROSS(BB2,BB1);
DRAWICON(V12,H*1.0236,14),COLORWHITE;
V21:=BARSLAST(REF(CROSS(BB1,BB2),1));
V22:=REF(C,V21+1)>C AND REF(BB1,V21+1)>BB1 AND CROSS(BB1,BB2);
DRAWICON(V22,L/1.0236,13);

A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
DRAWICON(B3,L/1.0618,11);
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
DRAWICON(D3,H*1.0618,12);

B6:=CROSS(DIF,DEA) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
B7:=CROSS(DEA,DIF) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
B8:=CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
B9:=CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));

STICKLINE(C>O,H,L,0,1),COLORRED; {红色}
STICKLINE(C>O,O,C,2.9,1),COLORDD33FF;

STICKLINE(C<=O,H,L,0,1),COLOR555500;{淡蓝色}
STICKLINE(C<=O,O,C,2.9,0),COLORAAAA00;
STICKLINE(C<=O,O,C,1.6,0),COLOREEEE00;
STICKLINE(C<=O,O,C,0.8,0),COLOREEEE00;

STICKLINE(B4 OR B6 OR B8,H,L,0,1),COLOR009999;{黄色}
STICKLINE(B4 OR B6 OR B8,O,C,2.9,0),COLOR00BBBB;
STICKLINE(B4 OR B6 OR B8,O,C,1.6,0),COLOR00DDDD;
STICKLINE(B4 OR B6 OR B8,O,C,0.8,0),COLOR00FFFF;

STICKLINE(B5 OR B7 OR B9,H,L,0,1),COLOR009900;{绿色}
STICKLINE(B5 OR B7 OR B9,O,C,2.9,0),COLOR00BB00;
STICKLINE(B5 OR B7 OR B9,O,C,1.6,0),COLOR00DD00;
STICKLINE(B5 OR B7 OR B9,O,C,0.8,0),COLOR00FF00;

DRAWBAND(M4,RGB(255,255,0),攻击线,RGB(0,153,103));
STICKLINE(YY,YY,YY,1.5,0),COLORWHITE;

JX1:=IF(CAPITAL=0,IF(PERIOD=7,1.09,IF(PERIOD=8,1.25,1.05)),IF(PERIOD=7,1.15,IF(PERIOD=8,1.33,1.11)));
JX2:=IF(CAPITAL=0,IF(PERIOD=7,0.88,IF(PERIOD=8,0.75,0.93)),IF(PERIOD=7,0.85,IF(PERIOD=8,0.75,0.90)));
压力:MA1*JX1,COLOR00FF00,POINTDOT;
支撑:MA1*JX2,COLORMAGENTA,POINTDOT;
 


[url=http://www.goodgupiao.com/gupiaogongshi/9212.html][B]空明8号 指标共振、背离尽在其中(源码)[/B][/url]