通达信牛回头主图源码
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
H2:=MAX(H,REF(H,1));
两日半:=(H2+L2)/2,NODRAW;
MA5角:ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.1416,NODRAW,COLOR5588FF;
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
N:=100;
低1:=REFDATE(LLV(L,N),DATE);
MA10:=MA(C,10),COLORYELLOW;
MA30:=MA(C,30);
H3:=高1-(高1-低1)*0.5;
DRAWTEXT(分水岭 AND ISLASTBAR,分水岭,'界'),COLORFF99DD;
STICKLINE(ISLASTBAR,昨半,昨半,8,2),COLORLIRED;
涨停: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,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;
ZT1:=H=涨停 AND PERIOD=5 AND H>C;
DT1:=L=跌停 AND PERIOD=5 AND L<C;
DRAWTEXT(ZT1,H+0.03,'炸板'),COLOR00CC00;{从涨停到跌停};
LBQ:=BARSLAST(LB);
金线:=1;
K2:=SUMBARS(REFX(SLB,1),1);
龙回头天数:SUMBARS(REFX(SLB,1),1)-2,NODRAW,COLORFF00FF;
跟庄线:DMA(AMOUNT/(100*V),V/CAPITAL),COLORFC9F99;
DRAWTEXT(妖股,L*0.98,'妖'),COLOR55FF99;
STICKLINE(阴线,O,C,2.8,0),COLOR009933;
阳线:=C>O;
STICKLINE(阳线,C,H,0,1),COLOR0000CC;
十字线:=C=O AND H>L;
STICKLINE(十字线,L,H,0,1),COLORWHITE;
高K:=C>MA5 AND C>MA10 AND H>MA20 AND H>MA30 AND H>MA60;
STICKLINE(选股,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(选股,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(选股,OPEN,CLOSE,0.5,0),COLORYELLOW;
Q3:=STRCAT(CON2STR(打折,2),'打折线');
STICKLINE(CURRBARSCOUNT=4,C,C,25,0),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=4,L*0.99,C),COLORWHITE;
假阳:=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.7,0),COLORLIGREEN;{假阳柱};
Z2:=STRCAT(Z1,DYBLOCK);
板块所属:DRAWTEXT_FIX(1,0,0.21,0,'板块所属:'),COLORWHITE;
DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLORWHITE;
DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:')COLORWHITE;
DRAWTEXT_FIX(1,0,0.15,0,'股票风格:')COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0,1,0,STRCAT('牛股形态:',ZDBLOCK)),COLORFFFF00;
DRAWTEXT_FIX(1,0.79,0.99,0,EXTERNSTR(0,3))COLORYELLOW;
首板:=ZT AND COUNT(ZT,2)=1;
三板:=REF(二板,1) AND ZT;
五板:=REF(四板,1) AND ZT;
七板:=REF(六板,1) AND ZT;
九板:=REF(八板,1) AND ZT;
DRAWTEXT(二板,0.1+(C+O)/2,'2'),COLORYELLOW;
DRAWTEXT(四板,0.1+(C+O)/2,'4'),COLORGREEN;
DRAWTEXT(六板,0.1+(C+O)/2,'6'),COLORLIRED;
DRAWTEXT(八板,0.1+(C+O)/2,'8'),COLORBLUE;
DRAWTEXT(十板,0.1+(C+O)/2,'10'),COLORYELLOW;
多阴:=EVERY(收阴,2);
宝莲灯:=REF(多阴,1) AND 小阳;
STICKLINE(宝莲灯,(O+C)/2-0.02,(O+C)/2+0.02,2,0),COLORWHITE;
A2:=DMA(((2.15*CLOSE+LOW+HIGH)/4),A1);
金线王2:EMA(A2,200)*1.118,LINETHICK1,COLORRED;
条件:=(C-REF(C,1))/REF(C,1)*100>5;
DRAWTEXT(金K线,L*0.98,'↖=金K线'),COLORRED;
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY
H2赋值:H和1日前的H较大值
两日半赋值:(H2+L2)/2,NODRAW
输出MA5角:ATAN((C的5日简单移动平均/REF(C的5日简单移动平均,1)-1)*100)*180/3.1416,NODRAW,COLOR5588FF
输出龙门:REFDATE(高,DATE),画白色,LINETHICK2
N赋值:100
低1赋值:REFDATE(N日内L最低值,DATE)
MA10赋值:C的10日简单移动平均,画黄色
MA30赋值:C的30日简单移动平均
H3赋值:高1-(高1-低1)*0.5
当满足条件分水岭 AND ISLASTBAR时,在分水岭和'界'位置书写文字
当满足条件ISLASTBAR时,在昨半和昨半之间画柱状线
输出涨停:IF(DATE
明输出涨停:IF(DATE
ZT1赋值:H=涨停 AND PERIOD=5 AND H>C
DT1赋值:L=跌停 AND PERIOD=5 AND L当满足条件ZT1时,在H+0.03和'炸板'位置书写文字
{从涨停到跌停}
LBQ赋值:上次LB距今天数
金线赋值:1
K2赋值:SUMBARS(REFX(SLB,1),1)
输出龙回头天数:SUMBARS(REFX(SLB,1),1)-2,NODRAW,COLORFF00FF
输出跟庄线:DMA(AMOUNT/(100*V),V/当前流通股本),COLORFC9F99
当满足条件妖股时,在L*0.98和'妖'位置书写文字
当满足条件阴线时,在O和C之间画柱状线
阳线赋值:C>O
当满足条件阳线时,在C和H之间画柱状线
十字线赋值:C=O AND H>L
当满足条件十字线时,在L和H之间画柱状线
高K赋值:C>MA5 AND C>MA10 AND H>MA20 AND H>MA30 AND H>MA60
当满足条件选股时,在收盘价和OPEN之间画柱状线
当满足条件选股时,在收盘价和OPEN之间画柱状线
当满足条件选股时,在OPEN和收盘价之间画柱状线
Q3赋值:STRCAT(CON2STR(打折,2),'打折线')
当满足条件CURRBARSCOUNT=4时,在C和C之间画柱状线
DRAWNUMBER(CURRBARSCOUNT=4,L*0.99,C),画白色
假阳赋值:1日前的C<=O AND H<1日前的O AND C<(1日前的O-C)/3+1日前的C AND AMOUNT/V/100<1日前的C AND C>O
当满足条件假阳时,在O和C之间画柱状线
{假阳柱}
Z2赋值:STRCAT(Z1,DYBLOCK)
当满足条件1时,在横轴0纵轴0.21位置书写文字
当满足条件1时,在横轴0.00纵轴0.00位置书写文字
当满足条件1时,在横轴0.00纵轴0.08位置书写文字
当满足条件1时,在横轴0纵轴0.15位置书写文字
DRAWTEXT_FIX(ISLASTBAR,0,1,0,STRCAT('牛股形态:',ZDBLOCK)),COLORFFFF00
DRAWTEXT_FIX(1,0.79,0.99,0,EXTERNSTR(0,3))画黄色
首板赋值:ZT AND 统计2日满足ZT的天数=1
三板赋值:1日前的二板 AND ZT
五板赋值:1日前的四板 AND ZT
七板赋值:1日前的六板 AND ZT
九板赋值:1日前的八板 AND ZT
DRAWTEXT(二板,0.1+(C+O)/2,'2'),画黄色
DRAWTEXT(四板,0.1+(C+O)/2,'4'),COLORGREEN
DRAWTEXT(六板,0.1+(C+O)/2,'6'),COLORLIRED
DRAWTEXT(八板,0.1+(C+O)/2,'8'), 画蓝色
DRAWTEXT(十板,0.1+(C+O)/2,'10'),画黄色
多阴赋值:收阴最近2日一直存在
宝莲灯赋值:1日前的多阴 AND 小阳
STICKLINE(宝莲灯,(O+C)/2-0.02,(O+C)/2+0.02,2,0),画白色
A2赋值:DMA(((2.15*收盘价+最低价+最高价)/4),A1)
金线王2:A2的200日指数移动平均*1.118,LINETHICK1,画红色
条件赋值:(C-1日前的C)/1日前的C*100>5
当满足条件金K线时,在L*0.98和'↖=金K线'位置书写文字
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00
当满足条件DT AND ZT1 AND PERIOD=5时,在H+0.03和'天地板'位置书写文字
{从涨停到跌停}