{黄金起爆点主图源码如下}
EMA12:EXPMA(CLOSE,12),DOTLINE,COLORGREEN;
EMA17:EXPMA(CLOSE,17),COLORWHITE;
MA25:MA(CLOSE,25),COLORLIRED;
MA99:MA(CLOSE,99),COLORBLUE;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
X_2:=REF(CLOSE,1);
X_3:=IF((CLOSE-X_2)*100/X_2>=5-0.01*100/X_2,1,0);
MACD:=(DIF-DEA)*2;
红天数:=IF(MACD>0,BARSLAST(CROSS(MACD,0)),DRAWNULL);
绿天数:=IF(MACD<0,BARSLAST(CROSS(0,MACD)),DRAWNULL);
DFV:=(CLOSE-LLV(LOW,37))/(HHV(HIGH,37)-LLV(LOW,37))*100;
CBT:=(SMA(DFV,5,1)+2*STD(CLOSE,37))<50;
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1);
红柱:BARSSINCEN(红天数=0,5)=0 AND REF(绿天数,3)>0 AND HIGH/REF(EMA(CLOSE,5),1)>0 AND C/REF(C,1)>1,COLORRED,NODRAW;
黄柱:BARSSINCEN(MACD>QG,8)=0 AND HIGH/REF(EMA(CLOSE,5),1)>0 AND C/REF(C,1)>1,COLORYELLOW,NODRAW;
XG:红柱 AND 黄柱 AND C/REF(C,1)>1.018,COLORWHITE,NODRAW;
STICKLINE(红柱,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(红柱,HIGH,LOW,0,0),COLORRED;
DRAWTEXT(红柱,LOW*0.99,'↖'),COLORLIMAGENTA;
DRAWTEXT(红柱,LOW*0.99,' 起'),COLORLIMAGENTA;
DRAWTEXT(红柱,LOW*0.99,' 爆'),COLORLIMAGENTA;
STICKLINE(黄柱,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(黄柱,HIGH,LOW,0,0),COLORYELLOW;
DRAWTEXT(黄柱,LOW*0.99,'↖'),COLORYELLOW;
DRAWTEXT(黄柱,LOW*0.99,' 起'),COLORYELLOW;
DRAWTEXT(黄柱,LOW*0.99,' 爆'),COLORYELLOW;
{报警器 K线图上变成蓝色,立马出局,别犹豫,切记};
VAR1:=ZIG(3,13);
STICKLINE((REF(VAR1,2) < REF(VAR1,1)) AND (VAR1 < REF(VAR1,1)),
CLOSE,OPEN,3,0),COLORBLUE;
DRAWICON(CROSS(REF(ZIG(3,12),1),ZIG(3,12)),HIGH*1.03,15);
{K线图着重显示涨跌停}
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
XA_1:=IF(DATE<=1200823,1,0);
旧涨停:=(C>=ZTPRICE(REF(CLOSE,1),0.1) AND C=H) AND XA_1=1;
旧跌停:=(C<=DTPRICE(REF(CLOSE,1),0.1) AND C=L) AND XA_1=1;
涨停:=C>=ZTPRICE(REF(C,1),BK) AND C=H;
跌停:=C<=DTPRICE(REF(C,1),BK) AND C=L;
曾涨停:=(H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1) AND C<H AND XA_1=1);
曾跌停:=(L<=DTPRICE(REF(C,1),BK) AND C>L) OR (L<=DTPRICE(REF(CLOSE,1),0.1) AND C>L AND XA_1=1);
{STICKLINE(旧涨停 AND PERIOD=5,O,C,4,0),COLORYELLOW;
STICKLINE(旧跌停 AND PERIOD=5,O,C,4,0),COLORGREEN;
STICKLINE(涨停 AND PERIOD=5,C,O,4,0),COLORMAGENTA;
{STICKLINE(跌停 AND PERIOD=5,C,O,4,0),COLORGREEN;}
{STICKLINE(曾涨停 AND PERIOD=5,H,L,0.1,0),COLORYELLOW;{涨停后回落}
{STICKLINE(曾跌停 AND PERIOD=5,L,H,0.1,0),COLORGREEN;{跌停后回升}
{DRAWTEXT(旧涨停 AND PERIOD=5,L-0.1,'涨停'),COLORYELLOW;
DRAWTEXT(旧跌停 AND PERIOD=5,H+0.2,'跌停'),COLORGREEN;}
DRAWTEXT(涨停 AND PERIOD=5,L-0.2,'↖涨停'),COLORYELLOW;
DRAWTEXT(跌停 AND PERIOD=5,L-0.2,'↖跌停'),COLORGREEN;
DRAWTEXT(曾涨停 AND PERIOD=5,L-0.2,'↖炸板'),COLORGREEN;
DRAWTEXT(曾跌停 AND PERIOD=5,L-0.2,'↖撬板'),COLORYELLOW;
DRAWTEXT_FIX(1,0.3,1,0,'主图首次出现红黄柱和“起爆”字眼,副图首次出现红箭头(或钱袋子),同时XG:1,可以买入。
主图当天14.55后K柱变成蓝色或出现小人,立马出局'),COLORFFDD44;
{黄金起爆点副图源码如下}
X_2:=REF(CLOSE,1);
X_3:=IF((CLOSE-X_2)*100/X_2>=5-0.01*100/X_2,1,0);
KVD1:=IF(CLOSE>REF(CLOSE,1),88,0);
KVD2:=IF(CLOSE/REF(CLOSE,1)>1.01 AND HIGH/CLOSE<1.010 AND KVD1>0,91,0)>1;
KVD3:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)/4;
KVD4:=(KVD3-REF(KVD3,1))>1;
KVD5:=C/REF(C,1)<1.2;
GP:=KVD2 AND KVD4 AND KVD5;
DFV:=(CLOSE-LLV(LOW,37))/(HHV(HIGH,37)-LLV(LOW,37))*100;
CBT:=(SMA(DFV,5,1)+2*STD(CLOSE,37))<50;
RVL:=X_3;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
红天数:=IF(MACD>0,BARSLAST(CROSS(MACD,0)),DRAWNULL);
绿天数:=IF(MACD<0,BARSLAST(CROSS(0,MACD)),DRAWNULL);
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1);
红柱:=BARSSINCEN(红天数=0,5)=0 AND REF(绿天数,3)>0 AND HIGH/REF(EMA(CLOSE,5),1)>0;
黄柱:=BARSSINCEN(MACD>QG,8)=0 AND HIGH/REF(EMA(CLOSE,5),1)>0;
XG: 黄柱 AND C/REF(C,1)>1 ;
STICKLINE(IF(XG,-120,0),+12,0,4,0),COLOR000088;
STICKLINE(IF(XG,-120,0),+12,0,3,0),COLOR0000AA;
STICKLINE(IF(XG,-120,0),+12,0,2,0),COLOR0000CC;
STICKLINE(IF(XG,-120,0),+12,0,1.4,0),COLOR0000EE;
STICKLINE(IF(XG,-120,0),+12,0,0.9,0),COLOR0000EE;
STICKLINE(IF(XG,-120,0),+12,0,0.3,0),COLORLIMAGENTA;
STICKLINE(IF(XG,-120,0),+9,0,7,0),COLOR770077;
STICKLINE(IF(XG,-120,0),+9,0,6,0),COLOR990099;
STICKLINE(IF(XG,-120,0),+9,0,5,0),COLORBB00BB;
STICKLINE(IF(XG,-120,0),+9,0,4,0),COLORDD00DD;
STICKLINE(IF(XG,-120,0),+9,0,3,0),COLORFF00FF;
STICKLINE(IF(XG,-120,0),+9,0,2,0),COLORDD00DD;
STICKLINE(IF(XG,-120,0),+6,0,7,0),COLOR003300;
STICKLINE(IF(XG,-120,0),+6,0,6,0),COLOR005500;
STICKLINE(IF(XG,-120,0),+6,0,5,0),COLOR007700;
STICKLINE(IF(XG,-120,0),+6,0,3.5,0),COLOR009900;
STICKLINE(IF(XG,-120,0),+6,0,2,0),COLOR00CC00;
STICKLINE(IF(XG,-120,0),+3,0,7,0),COLOR666666;
STICKLINE(IF(XG,-120,0),+3,0,6,0),COLOR777777;
STICKLINE(IF(XG,-120,0),+3,0,5,0),COLOR888888;
STICKLINE(IF(XG,-120,0),+3,0,4,0),COLOR999999;
STICKLINE(IF(XG,-120,0),+3,0,3,0),COLORDDDDDD;
STICKLINE(IF(XG,-120,0),+3,0,2,0),COLORFFFFFF;
STICKLINE(IF(XG,-120,0),-3,0,7,0),COLOR000044;
STICKLINE(IF(XG,-120,0),-3,0,6,0),COLOR000033;
STICKLINE(IF(XG,-120,0),-3,0,5,0),COLOR000055;
STICKLINE(IF(XG,-120,0),-3,0,4,0),COLOR000077;
STICKLINE(IF(XG,-120,0),-3,0,3,0),COLOR000099;
STICKLINE(IF(XG,-120,0),-3,0,2,0),COLORLIMAGENTA;
DRAWTEXT(XG,10.5,'黄'),COLORYELLOW;
DRAWTEXT(XG,7.5,'金'),COLORYELLOW;
DRAWTEXT(XG,4.5,'起'),COLORRED;
DRAWTEXT(XG,1.5,'爆'),COLORRED;
DRAWTEXT(XG,-1.5,'点'),COLORYELLOW;