狩猎者主图指标 (源码)
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
牛熊:MA(CLOSE,60),COLORBLUE,LINETHICK1;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,1.95,0,'==【截短亏损,让利润奔跑。】=='),COLOR0000FF;
VAR3:=(O+H+C)/3;
持股线:= EMA(VAR3,3),COLORYELLOW,LINETHICK1;
VAR2:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));
趋势线:=EMA(((VAR2 / 10) + EMA(CLOSE,10)),3);
A11:=持股线,COLOR00FFFF,LINETHICK2;
B11:=趋势线,COLOR00FF00,LINETHICK2;
AA:=A11>=B11;
BB:=B11>A11;
买入:DRAWICON(CROSS(AA,BB),L,1);
卖出:DRAWICON(CROSS(BB,AA),H,2);
STICKLINE(AA,C,O,3,0),COLORFFBBFF;
STICKLINE(AA,H,L,0,0),COLOR00FFFF;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0,0),COLORFF0000;
STICKLINE(AA,CLOSE,OPEN,3.0,0),COLORFF00FF;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLORFF44FF;
STICKLINE(AA,CLOSE,OPEN,1.4,0),COLORFF88FF;
STICKLINE(AA,CLOSE,OPEN,0.5,0),COLORFFAAFF;
STICKLINE(BB,CLOSE,OPEN,3,0),COLOR008800;
STICKLINE(BB,CLOSE,OPEN,2.2,0),COLOR00AA00;
STICKLINE(BB,CLOSE,OPEN,1.4,0),COLOR00CC00;
STICKLINE(BB,CLOSE,OPEN,0.6,0),COLOR00EE00;
STICKLINE(买入,O,(C-O)/2+O,3,0),COLOR335555;
STICKLINE(买入,O,(C-O)/2+O,2.2,0),COLOR338888;
STICKLINE(买入,O,(C-O)/2+O,1.5,0),COLOR33AAAA;
STICKLINE(买入,O,(C-O)/2+O,1,0),COLOR33CCCC;
STICKLINE(买入,O,(C-O)/2+O,0,0),COLOR33EEEE;
STICKLINE(卖出,O,(C-O)/2+O,3,0),COLOR550055;
STICKLINE(卖出,O,(C-O)/2+O,2.2,0),COLOR880088;
STICKLINE(卖出,O,(C-O)/2+O,1.5,0),COLORAA00AA;
STICKLINE(卖出,O,(C-O)/2+O,1,0),COLORCC00CC;
STICKLINE(卖出,O,(C-O)/2+O,0.5,0),COLOREE00EE;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
趋势:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORBLUE,LINETHICK1;
AA2:=EMA(MID,25)COLORLIBLUE,LINETHICK1;
趋势X:=(趋势-REF(趋势,1))/REF(趋势,1)*100,NODRAW;
A2X:=(AA2-REF(AA2,1))/REF(AA2,1)*100,NODRAW;
买入持股:IF(趋势X>=0,趋势,DRAWNULL)COLORRED,LINETHICK2;
卖出空仓:IF(趋势X<0 AND A2X<0,趋势,DRAWNULL)COLORGREEN,LINETHICK1;
STICKLINE(CROSS(趋势X,0),H,L,0,0 ),COLOR9933FF;
STICKLINE(CROSS(趋势X,0),C,O,2,0 ),COLOR0000CC;
STICKLINE(CROSS(趋势X,0),C,O,0.5,0 ),COLOR00FFFF;
STICKLINE(CROSS(0,趋势X),L,H,0,0 ),COLORFFFFFF;
DKX:MA(趋势,6),COLORFF00FF,LINETHICK1;
上开:=O;
上收:=C;
上高:=H;
上低:=L;
JJ:=(上开+上高+上低)/3;
A:=EMA(JJ,4);
B:=REF(A,1),POINTDOT,COLORYELLOW;
黄金线:=A,COLORWHITE,LINETHICK1;
IF(牛熊>REF(牛熊,1),牛熊,DRAWNULL),COLORRED,LINETHICK1;
IF(牛熊<REF(牛熊,1),牛熊,DRAWNULL),COLORBLUE,LINETHICK1;
VA1:=EMA(上收,8);
VA2:=EMA(上收,20);
{DRAWTEXT(CROSS(VA2,VA1),VA1*1.10,'止损'),COLORYELLOW; }
DRAWTEXT(CROSS(VA1,VA2)AND(C>=O)AND 黄金线>REF(黄金线,1),VA1*0.98,'↖★买入'),COLORYELLOW;
KSD:=IF(O>C,O,C);
底1:=IF(TROUGHBARS(KSD,10,1)=1,1,0);
底:DRAWTEXT(底1,L,'↖底准备'),COLORRED;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
XH:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,1,0);
选股:=REF(XH,1)=1 AND C>REF(C,1);
DRAWTEXT(选股,LOW,'↖短进');
P:=9;
WH1:=IF(L=LLV(L,P),L,DRAWNULL);
WH2:=CONST(BARSLAST(WH1!=DRAWNULL));
WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));
WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);
WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));
WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);
阻力:IF(CURRBARSCOUNT<=WH2+10,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL);
DRAWTEXT(ISLASTBAR,阻力,'阻力'),COLORRED;
H1:=IF(H=HHV(H,P),H,DRAWNULL);
H2:=CONST(BARSLAST(H1!=DRAWNULL));
H3:=CONST(IF(H2=0,L,REF(L,H2)));
H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1);
H5:=CONST(IF(H4=0,L,REF(L,H4)));
H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1);
支撑:IF(CURRBARSCOUNT<=H2+10,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL);
DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLORYELLOW;
- 上一篇公式:精确波段主图指标 (源码)
- 下一篇公式:量加均线主图指标 (源码)