地球引力主图-精品通达信指标公式源码分享
TS:=550;N:=95;R:=14;
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);
AA1:=-100*(趋势线-CLOSE)/趋势线;
AC:=(EMA(AA1,5) );
SSL:=EMA(CLOSE,3);
MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
M1M:=MA(MMV,1);
{STICKLINE(((SSL>MM)),SSL,MM,0.01,0),COLORRED;}
SA:=(M1M*0.985);
SS1:=(MA(CLOSE,5));
DD:=(MA(CLOSE,13));
GG:=(MA(CLOSE,21));
捞钱手:=IF(((SSL>M1M)),M1M,SA),LINETHICK2,COLORRED;
{IF(SSL<MM,捞钱手,DRAWNULL),LINETHICK2,COLORFFFFFF;}
能量线:=DMA(((CLOSE + OPEN) / 2),(VOL / (SMA(VOL,4,1) *4)));
上开:=O;
上收:=C;
上高:=H;
上低:=L;
JJ:=(上开+上高+上低)/3;
A:=EMA(JJ,4);
智能黄金线:A,COLORYELLOW,LINETHICK2;
MA3:=EMA(CLOSE,3);
SLOPE1:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
VV1:=IF(((MA3>SLOPE1)),SLOPE1,SLOPE1*0.985),LINETHICK2,COLORYELLOW;
箱顶:=MA(REF(HHV(C,30),1),2),COLOR0000FF,LINETHICK2;
箱底:=MA(REF(LLV(C,30),1),2),COLOR00FF00,LINETHICK2;
箱中:=(箱顶+箱底)/2,COLORFFFFFF,LINETHICK2;
AA:=VV1;
STICKLINE(C<AA,C,O,4,1),COLORFFFF00;
STICKLINE(C<AA,C,O,4,1),COLOR00FF00;
STICKLINE(C<AA,C,O,0.1,1),COLOR00FF00;
STICKLINE(C>A,C,O,0.1,1),COLORRED;
HH:=MA(C,1),COLORWHITE;
一硝:=(HHV(HIGH,9)+LLV(LOW,9))/2,COLORRED;
二黄:=(HHV(HIGH,26)+LLV(LOW,26))/2,COLORYELLOW;
硝酸钾:=MA(C,3);
硫磺:=MA(硝酸钾,5);
木炭:=MA(硝酸钾,60);
三木炭:=3*木炭-2*硫磺;
AAQ:=CROSS(二黄,三木炭);
BB:=CROSS(一硝,二黄);
C1C:=MA(C,30);
DDQ:=MA(C,72);
地球引力:(C1C+DDQ)/2,LINETHICK2,COLORWHITE;
上引力线:=地球引力+地球引力*0.1,COLORRED;
下引力线:=地球引力-地球引力*0.1,COLORFF00FF;
AAZ:=FORCAST((C+L+H)/3,5);
趋势:=EMA(3*AAZ-2*SMA(AAZ,2,1),15),COLORYELLOW,LINETHICK2;
BBZ:=FORCAST(趋势,40);
做多:3*趋势-2*BBZ,LINETHICK2,COLORFF00FF;
做空:3*BBZ-2*趋势,LINETHICK2,COLORC0C0C0;
VV:=做多>=REF(做多,1) AND 趋势>=REF(趋势,1) AND 做多>趋势;
B1A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));
BS:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水岭:=IF(MA(CLOSE,17)<BS,BS,MA(CLOSE,17)),COLORRED,LINETHICK3;
MA30:MA(C,30),COLORRED,LINETHICK2;
MA75:MA(C,75),COLOR00FF00,LINETHICK2;
HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
A1A:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(A1A,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;
AA11:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA11,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
低点支撑:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLOR00FF00,LINETHICK2;
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:=DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHITE,LINETHICK2;
A0:=(L+H+C*2)/4;
A1:=EMA(A0,14)COLORBLUE,LINETHICK2;
A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
出击:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA,LINETHICK2;
逃遁:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORWHITE,LINETHICK2;
买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);
DRAWICON(BU,L-0.1,5);DRAWICON(SEL,H+0.1,6);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORGREEN;
{R,1,100,4}
ZF:=(C-REF(C,1))/REF(C,1);
TJ:=ZF>=R/100 OR ZF<=-R/100;
下限:=IF(BARSLAST(TJ),REF(LOW,BARSLAST(TJ)),DRAWNULL),COLOREA91B5;
上限:=IF(BARSLAST(TJ),REF(HIGH,BARSLAST(TJ)),DRAWNULL),COLORYELLOW;
A1AA:=IF(REF(H,BARSLAST(TJ))<REF(C,BARSLAST(TJ)+1),
REF(C,BARSLAST(TJ)+1),REF(H,BARSLAST(TJ)));
C1AC:=IF(REF(LOW,BARSLAST(TJ))>REF(C,BARSLAST(TJ)+1),
REF(C,BARSLAST(TJ)+1),REF(LOW,BARSLAST(TJ)));
重心:=IF(BARSLAST(TJ),(A1AA+C1AC)/2,DRAWNULL),COLOR00FF00;
止损:MAX(MAX((HHV(C,20)+LLV(C,20))/2,(HHV(C,30)+LLV(C,30))/2),(HHV(C,60)+LLV(C,60))/2);
MA125:MA(C,125),COLORYELLOW;
沪股均价:"SH000002$AMOUNT"/"SH000002$VOL"/10000,COLORYELLOW,NODRAW;
深股均价:"SZ399107$AMOUNT"/"SZ399107$VOL"/10000,COLORYELLOW,NODRAW;
市场均价:("SH000002$AMOUNT"+"SZ399107$AMOUNT")/("SH000002$VOL"+"SZ399107$VOL")/10000,NODRAW;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!