生死界主图通达信公式 主图 源码附图
阴线:=C<O;
STICKLINE(阴线,O,C,2.8,0),COLOR009933;
STICKLINE(阴线,H,L,0,0),COLOR009933;
阳线:=C>O;
STICKLINE(阳线,O,C,2.8,1),COLOR0000CC;
STICKLINE(阳线,C,H,0,1),COLOR0000CC;
STICKLINE(阳线,O,L,0,1),COLOR0000CC;
十字线:=C=O AND H>L;
STICKLINE(十字线,O,C,2.8,1),COLORWHITE;
STICKLINE(十字线,L,H,0,1),COLORWHITE;
现价:=REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
昨半:REF((C+O)/2,1),NODRAW;
半分:(C+O)/2,NODRAW,COLORWHITE;
高H:=REF(HHV(H,72),5);
龙门:REFDATE(高H,DATE),COLORWHITE,LINETHICK2;
{以下是主题特色参数}
N:=100;
高1:=REFDATE(HHV(H,N),DATE);
低1:=REFDATE(LLV(L,N),DATE);
高:=REF(HHV(H,N),DATE);
低:=REF(LLV(L,N),DATE);
HH1:=高1-(高1-低1)*0.191;
HH2:=高1-(高1-低1)*0.382;
HH3:=高1-(高1-低1)*0.5;
HH4:=高1-(高1-低1)*0.618;
HH5:=高1-(高1-低1)*0.809;
一809:REFDATE(HH1,DATE),COLOR444444,DOTLINE;
二618:REFDATE(HH2,DATE),COLOR444444,DOTLINE;
生死界:REFDATE(HH3,DATE),COLORRED,DOTLINE;
四382:REFDATE(HH4,DATE),COLOR444444,DOTLINE;
五191:REFDATE(HH5,DATE),COLOR444444,DOTLINE;
DRAWNUMBER(ISLASTBAR,一809,一809),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,二618,二618),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,生死界,生死界),COLORRED;
DRAWNUMBER(ISLASTBAR,四382,四382),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,五191,五191),COLORYELLOW;
TM:=1200823;
涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE<TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE<TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ZT:=C=涨停 AND PERIOD=5 AND H=C;
ZT1:=H=涨停 AND PERIOD=5 AND H>C;
DT:=C=跌停 AND PERIOD=5 AND L=C;
DT1:=L=跌停 AND PERIOD=5 AND L<C;
{涨停K线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,'地天板'),COLORCC00CC;{从跌停到涨停}
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
DRAWTEXT(DT1,L-0.09,'撬板'),COLORCC00CC;{从涨停到跌停};
DRAWTEXT(ZT1,H+0.03,'炸板'),COLOR00CC00;{从涨停到跌停};
假阴:=REF(C>=O,1) AND AMOUNT/V/100>REF(C,1) AND C<O;
假阳:=REF(C<=O,1) AND H<REF(O,1) AND C<(REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100<REF(C,1) AND C>O;
STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳柱};
连阴:=COUNT((C<REF(C,1) OR L<REF(L,1)),10)>=5;
间谍柱:=REF(连阴,1) AND (DT OR DT1) ;
DRAWLINE(间谍柱,(C+O)/2,REF(间谍柱,1),REF((C+O)/2,1),1),COLOR55FFCC;
STICKLINE(L>REF(H,1),L-0.02,REF(H,1)+0.02,3,0),COLORLIGRAY;
STICKLINE(REF(L,1)>H,REF(L,1)-0.02,H+0.02,3,0),COLORLIGRAY;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
阴线赋值:C当满足条件阴线时,在O和C之间画柱状线
当满足条件阴线时,在H和L之间画柱状线
阳线赋值:C>O
当满足条件阳线时,在O和C之间画柱状线
当满足条件阳线时,在C和H之间画柱状线
当满足条件阳线时,在O和L之间画柱状线
十字线赋值:C=O AND H>L
当满足条件十字线时,在O和C之间画柱状线
当满足条件十字线时,在L和H之间画柱状线
现价赋值:REFDATE(C,DATE),DOTLINE,COLORLIGRAY
输出昨半:REF((C+O)/2,1),NODRAW
输出半分:(C+O)/2,NODRAW,画白色
高H赋值:REF(72日内H最高值,5)
输出龙门:REFDATE(高H,DATE),画白色, 线宽为2
{以下是主题特色参数}
N赋值:100
高1赋值:REFDATE(N日内H最高值,DATE)
低1赋值:REFDATE(N日内L最低值,DATE)
高赋值:REF(N日内H最高值,DATE)
低赋值:REF(N日内L最低值,DATE)
HH1赋值:高1-(高1-低1)*0.191
HH2赋值:高1-(高1-低1)*0.382
HH3赋值:高1-(高1-低1)*0.5
HH4赋值:高1-(高1-低1)*0.618
HH5赋值:高1-(高1-低1)*0.809
输出一809:REFDATE(HH1,DATE),COLOR444444,DOTLINE
输出二618:REFDATE(HH2,DATE),COLOR444444,DOTLINE
输出生死界:REFDATE(HH3,DATE),画红色,DOTLINE
输出四382:REFDATE(HH4,DATE),COLOR444444,DOTLINE
输出五191:REFDATE(HH5,DATE),COLOR444444,DOTLINE
DRAWNUMBER(ISLASTBAR,一809,一809),画黄色
DRAWNUMBER(ISLASTBAR,二618,二618),画黄色
DRAWNUMBER(ISLASTBAR,生死界,生死界),画红色
DRAWNUMBER(ISLASTBAR,四382,四382),画黄色
DRAWNUMBER(ISLASTBAR,五191,五191),画黄色
TM赋值:1200823
输出涨停:IF(DATE
输出跌停:IF(DATE
明输出涨停:IF(DATE
明输出跌停:IF(DATE
ZT赋值:C=涨停 AND PERIOD=5 AND H=C
ZT1:=H=涨停 AND PERIOD=5 AND H>C
DT赋值:C=跌停 AND PERIOD=5 AND L=C
DT1:=L=跌停 AND PERIOD=5 AND L
{涨停K线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00
当满足条件ZT AND DT1 AND PERIOD=5时,在L-0.03和'地天板'位置书写文字
当满足条件DT AND ZT1 AND PERIOD=5时,在H+0.03和'天地板'位置书写文字
{从涨停到跌停}
当满足条件DT1时,在L-0.09和'撬板'位置书写文字
{从涨停到跌停}
当满足条件ZT1时,在H+0.03和'炸板'位置书写文字
{从涨停到跌停}
假阴赋值:1日前的C>=O AND 成交额/V/100>1日前的C AND C
假阳赋值:1日前的C<=O AND H<1日前的O AND C<(1日前的O-C)/3+1日前的C AND 成交额/V/100<1日前的C AND C>O
当满足条件假阴时,在O和C之间画柱状线
{假阴柱}
当满足条件假阳时,在O和C之间画柱状线
{假阳柱}
连阴赋值:COUNT((C<1日前的C OR L<1日前的L),10)>=5
间谍柱赋值:1日前的连阴 AND (DT OR DT1)
DRAWLINE(间谍柱,(C+O)/2,1日前的间谍柱,REF((C+O)/2,1),1),COLOR55FFCC
STICKLINE(L>1日前的H,L-0.02,1日前的H+0.02,3,0),COLORLIGRAY
STICKLINE(1日前的L>H,1日前的L-0.02,H+0.02,3,0),COLORLIGRAY