龙门获利自己常用的主图通达信公式 主图 源码附图
高:=REF(HHV(H,72),5);
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
周:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA30:MA(CLOSE,30);
季:MA(CLOSE,60);
半年:MA(CLOSE,120),COLORFFFF00;
年:MA(CLOSE,250),COLORRED,LINETHICK2;
获利筹码:IF(WINNER(CLOSE),WINNER(CLOSE)*100,0),NODRAW;
昨半:REF((C+O)/2,1),COLORYELLOW,NODRAW;
半分:(C+O)/2,NODRAW,COLORWHITE;
H2:=MAX(H,REF(H,1));
L2:=MIN(L,REF(L,1));
两日半:(H2+L2)/2,NODRAW;
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;{假阳};
首板:=ZT AND COUNT(ZT,3)=1;
二板:=REF(首板,1) AND ZT;
三板:=REF(二板,1) AND ZT;
四板:=REF(三板,1) AND ZT;
五板:=REF(四板,1) AND ZT;
六板:=REF(五板,1) AND ZT;
七板:=REF(六板,1) AND ZT;
八板:=REF(七板,1) AND ZT;
九板:=REF(八板,1) AND ZT;
十板:=REF(九板,1) AND ZT;
DRAWTEXT(首板,L,'1'),COLORWHITE;
DRAWTEXT(二板,L,'2'),COLORYELLOW;
DRAWTEXT(三板,L,'3'),COLOR00CC99;
DRAWTEXT(四板,L,'4'),COLORGREEN;
DRAWTEXT(五板,L,'5'),COLORLIGRAY;
DRAWTEXT(六板,L,'6'),COLORLIRED;
DRAWTEXT(七板,L,'7'),COLORLIBLUE;
DRAWTEXT(八板,L,'8'),COLORBLUE;
DRAWTEXT(九板,L,'9'),COLORWHITE;
DRAWTEXT(十板,L,'10'),COLORYELLOW;
DTP:=C>周 AND 周>MA10 AND MA10>MA30 AND 周>季;
妖线:=EMA(EMA(C,9)*1.11,5);
捉妖:=C>REF(C,1)*1.03 AND CROSS(C,龙门-0.05) AND CROSS(C,妖线) AND DTP;
DRAWICON(捉妖,(C+O)/2,23);
跟庄看盘:DRAWNULL,COLOR0088FF;
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
未来函数检测结果如下:
该公式包含未来函数:WINNER
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
高赋值:REF(72日内H最高值,5)
输出龙门:REFDATE(高,DATE),画白色, 线宽为2
输出周:收盘价的5日简单移动平均
输出MA10:收盘价的10日简单移动平均
输出MA30:收盘价的30日简单移动平均
输出季:收盘价的60日简单移动平均
输出半年:收盘价的120日简单移动平均,COLORFFFF00
输出年:收盘价的250日简单移动平均,画红色, 线宽为2
输出获利筹码:IF(收盘价计算的获利盘比例,收盘价计算的获利盘比例*100,0),NODRAW
输出昨半:REF((C+O)/2,1),画黄色,NODRAW
输出半分:(C+O)/2,NODRAW,画白色
H2赋值:H和1日前的H较大值
L2赋值:L和1日前的L的较小值
输出两日半:(H2+L2)/2,NODRAW
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之间画柱状线
{假阳}
首板赋值:ZT AND 统计3日满足ZT的天数=1
二板赋值:1日前的首板 AND ZT
三板赋值:1日前的二板 AND ZT
四板赋值:1日前的三板 AND ZT
五板赋值:1日前的四板 AND ZT
六板赋值:1日前的五板 AND ZT
七板赋值:1日前的六板 AND ZT
八板赋值:1日前的七板 AND ZT
九板赋值:1日前的八板 AND ZT
十板赋值:1日前的九板 AND ZT
当满足条件首板时,在L和'1'位置书写文字
当满足条件二板时,在L和'2'位置书写文字
当满足条件三板时,在L和'3'位置书写文字
当满足条件四板时,在L和'4'位置书写文字
当满足条件五板时,在L和'5'位置书写文字
当满足条件六板时,在L和'6'位置书写文字
当满足条件七板时,在L和'7'位置书写文字
当满足条件八板时,在L和'8'位置书写文字
当满足条件九板时,在L和'9'位置书写文字
当满足条件十板时,在L和'10'位置书写文字
DTP:=C>周 AND 周>MA10 AND MA10>MA30 AND 周>季
妖线赋值:C的9日指数移动平均*1.11,5)
捉妖赋值:C>1日前的C*1.03 AND C上穿龙门-0.05 AND C上穿妖线 AND DTP
DRAWICON(捉妖,(C+O)/2,23)
输出跟庄看盘:DRAWNULL,COLOR0088FF
输出现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY