通达信短线箱体主图指标公式源码
通达信短线箱体主图指标公式源码
AB:=Ema(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
BA:=EMA(AB,5);
A18:=REFDATE(REF(HHV(H,96),5),DATE);{高}
B1:=REFDATE(REF(LLV(L,96),5),DATE);{低}
DY:=((A18)+(B1))/2;{中}
顶:IF(AB>0 AND AB-BA<=0,A18,A18),DOTLINE,COLORCYAN;
腰:IF(AB>0 AND AB-BA<=0,DY,DY),DOTLINE,COLORCYAN;
底:IF(AB>0 AND AB-BA<=0,B1,B1),DOTLINE,COLORCYAN;
MC:=C#MONTH,NODRAW;
MO1:=IF(DAYMO:=HHV(MO1,DAY),NODRAW;
stICKLINE(MC>=MO,MO,MC,4,-1)COLOR00009C;
STICKLINE(MC
AAQ:=H#WEEK;BB:=L#WEEK;
STICKLINE(B>=AQ,AAQ,BB,4,0),COLOR00006B;
STICKLINE(B
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),COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,赢,' YW'),COLORMAGENTA;
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
H6:=CONST(REF(BARSLAST(L损:IF(CURRBARSCOUNT<=H2+10,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(ISLASTBAR,损,' SW'),COLORGREEN;
{九线}
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
A1
A2:EMA(A1,2),COLOR3355BB;
A3:EMA(A2,2),COLOR4455BB;
A4:EMA(A3,2),COLOR5555BB;
A5:EMA(A4,2),COLOR6655BB;
A6:EMA(A5,2),COLOR7755BB;
A7:EMA(A6,2),COLOR8855BB;
DRAWKLINE(H,O,L,C);
STICKLINE(C>=O,C,O,3,0),COLOR1F1ac5;
STICKLINE(C>=O,C,O,1.3,0),COLOR1F1AD5;
STICKLINE(C>=O,C,O,0,0),COLOR1F1AF5;
STICKLINE(C
A9:MA(OPEN,3.2)*1.028,COLORYELLOW,LINETHICK1;
{涨停显示}
C6:=REF(C,1);
涨停:=IF((C-C6)*100/C6>=(10-0.01*100/C6),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(涨停,H,L,0,0),COLORLIRED;
{高位}
VAR2:=(REF(HIGH,1)+REF(LOW,1))/2;
VAR3:=MA(CLOSE,20)+2*STD(CLOSE,20);