金多宝主图画线
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) /
SMA(ABS((CLOSE - LC)),3,1)) * 100);
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.236;
H3:=高1-(高1-低1)*0.382;
H4:=高1-(高1-低1)*0.5;
H5:=高1-(高1-低1)*0.618;
H6:=高1-(高1-低1)*0.764;
H7:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED,LINETHICK3;
低:REFDATE(低1,DATE),COLORGREEN,LINETHICK3;
一:REFDATE(H1,DATE),COLORRED;
二:REFDATE(H2,DATE),COLORWHITE,DOTLINE;
阻一:REFDATE(H3,DATE),COLORGREEN;
中:REFDATE(H4,DATE),COLORYELLOW;
阻二:REFDATE(H5,DATE),COLORGREEN;
六:REFDATE(H6,DATE),COLORWHITE,DOTLINE;
七:REFDATE(H7,DATE),COLORRED;
DRAWTEXT(ISLASTBAR,顶,'顶'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,低,'底'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,一,'一19.1'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,二,'二23.6'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,阻一,'阻一38.2'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,中,'中50'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,阻二,'阻二61.8'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,六,'六76.4'),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,七,'七80.9'),COLORLIGREEN;
HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
DRAWICON(CC,H*1.02,2);
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;
第二顶:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLORRED,DOTLINE;
第一顶:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,DOTLINE;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DRAWICON(CC1,L*0.98,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) COLORRED,LINETHICK2;
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
第一底:DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORBLUE,DOTLINE;
第二底:DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORGREEN,DOTLINE;
- 上一篇公式:自动画线主图(主图,源码,副图)
- 下一篇公式:自编均线+简单BOLL主图,很直观!!买卖提示!