【通達(dá)信】多空黃金九轉(zhuǎn)主圖指標(biāo)公式
攻城獅 2015.11.08 02:06
DRAWTEXT_FIX(1,0.01,0.01,0,’【★★倉(cāng)位控制的量化標(biāo)準(zhǔn)★★】’),COLORMAGENTA;
DRAWTEXT_FIX(1,0.01,0.08,0,’【★★1、粉+紅=滿(mǎn),2、粉+綠=6,3、藍(lán)+紅=4 ,4、藍(lán)+綠=空★★】’),COLORYELLOW;
E1:=EXPMA(C,5);
E2:=EXPMA(C,10);
E3:=EXPMA(C,20);
E4:=EXPMA(C,30);
E5:=EXPMA(C,60);
VARE1:=(E1+E2+E3+E4)/4;
VARE2:=(E1+E2+E3+E5)/4;
N:=IF(CODELIKE(‘9999’)OR CODELIKE(‘3990’)OR CODELIKE(‘880’)OR CODELIKE(‘0000’),1,0);
D1:=IF(N=1,0.013,0.03);
D2:=IF(N=1,0.018,0.03);
C1:=IF(N=1,0.015,0.03);
C2:=IF(N=1,0.015,0.03);
短線(xiàn)多:EXPMA(VARE1,5)+EXPMA(VARE1,5)*D1,COLORRED;
短線(xiàn)空:EXPMA(VARE1,5)-EXPMA(VARE1,5)*D2,COLORRED;
長(zhǎng)線(xiàn)多:EXPMA(VARE2,70)+EXPMA(VARE2,70)*C1,COLORMAGENTA;
長(zhǎng)線(xiàn)空:EXPMA(VARE2,70)-EXPMA(VARE2,70)*C2,COLORMAGENTA;
{DRAWKLINE(H,O,L,C);}
TJ1:=RANGE(C,短線(xiàn)空,短線(xiàn)多);
TJ2:=RANGE(C,長(zhǎng)線(xiàn)空,長(zhǎng)線(xiàn)多);
STICKLINE(短線(xiàn)多>REF(短線(xiàn)多,1) AND TJ1=0,短線(xiàn)多,短線(xiàn)空,0.1,1),COLORRED;
STICKLINE(短線(xiàn)多 STICKLINE(長(zhǎng)線(xiàn)多>REF(長(zhǎng)線(xiàn)多,1) AND TJ2=0,長(zhǎng)線(xiàn)多,長(zhǎng)線(xiàn)空,0.1,1),COLORMAGENTA;
STICKLINE(長(zhǎng)線(xiàn)多 NOTEXT短線(xiàn)多:IF(短線(xiàn)多 NOTEXT短線(xiàn)空:IF(短線(xiàn)空 NOTEXT長(zhǎng)線(xiàn)多:IF(長(zhǎng)線(xiàn)多 NOTEXT長(zhǎng)線(xiàn)空:IF(長(zhǎng)線(xiàn)空 空:=REF(C,1)>REF(短線(xiàn)空,1) AND C<短線(xiàn)空 AND C短線(xiàn)多,5)>0};
多:=REF(C,1)短線(xiàn)多 AND C>REF(C,1){ AND COUNT(C<長(zhǎng)線(xiàn)多,5)>0};
空1:=TFILTER(多,空,2);
多1:=TFILTER(多,空,1);
DRAWTEXT(空1,短線(xiàn)多*1.04,’空’),COLORGREEN;
DRAWTEXT(多1,短線(xiàn)空*0.96,’多’),COLORRED;
DRAWICON(空1,短線(xiàn)多*1.02,2);
DRAWICON(多1,短線(xiàn)空*0.98,1);
A1:=C>REF(C,4);
A2:=BARSLASTCOUNT(A1);
A3:=REF(A2,1)=8 AND A2>REF(A2,1);
A4:=REF(BETWEEN(A2,5,8),1) AND A2 A5:=ISLASTBAR AND BETWEEN(A2,6,8);
A6:=(BACKSET(A3>0,9) OR BACKSET(A4>0,A2+1)*0 OR BACKSET(A5>0,A2))*A2;
DRAWTEXT(A6>0,H+H*0.02,VAR2STR(A6,0)),COLORFF00FF{COLOR00FFFF};
DRAWTEXT(A2=9,H+H*0.02,’9′),COLOR00FF00;
B1:=C B2:=BARSLASTCOUNT(B1);
B3:=REF(B2,1)=8 AND B2>REF(B2,1);
B4:=REF(BETWEEN(B2,5,8),1) AND B2 B5:=ISLASTBAR AND BETWEEN(B2,6,8);
B6:=(BACKSET(B3>0,9) OR BACKSET(B4>0,B2+1)*0 OR BACKSET(B5>0,B2))*B2;
DRAWTEXT(B6>0,L-L*0.02,VAR2STR(B6,0)),COLOR00FF00{COLORFFFFFF};
DRAWTEXT(B2=9,L-L*0.02,’9′),COLORFF00FF;
買(mǎi)線(xiàn):=EMA(C,2);
賣(mài)線(xiàn):=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(買(mǎi)線(xiàn),賣(mài)線(xiàn));
SEL:=CROSS(賣(mài)線(xiàn),買(mǎi)線(xiàn));
DRAWICON(BU,L-0.1,1);
DRAWICON(SEL,H+0.1,2);
STICKLINE(買(mǎi)線(xiàn)>=賣(mài)線(xiàn),LOW,HIGH,0.0,1),COLORRED;
STICKLINE(買(mǎi)線(xiàn)>=賣(mài)線(xiàn),CLOSE,OPEN,2,1),COLORRED;
STICKLINE(買(mǎi)線(xiàn)<賣(mài)線(xiàn),LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(買(mǎi)線(xiàn)<賣(mài)線(xiàn),CLOSE,OPEN,2,1),COLORGREEN;
散戶(hù):=EMA(CLOSE,5),COLORWHITE;
操盤(pán):=MA(CLOSE,9),COLORCYAN,LINETHICK2;
界點(diǎn):=MA(CLOSE,20),COLORMAGENTA;
LC:=REF(CLOSE,1);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
頂:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORYELLOW;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://m.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀(guān)點(diǎn)。不代表本網(wǎng)立場(chǎng),不代表本網(wǎng)贊同其觀(guān)點(diǎn),亦不對(duì)其真實(shí)性負(fù)責(zé),投資決策請(qǐng)建立在獨(dú)立思考之上。