自用看大盘通达信公式 主图 源码附图
十日线:=MA(CLOSE,10),LINETHICK1,COLOR00FFFF;
DRAWNUMBER(ISLASTBAR,十日线,十日线),COLOR00FFFF;
二十日线:=MA(CLOSE,20),LINETHICK1,COLORFF00FF;
DRAWNUMBER(ISLASTBAR,二十日线,二十日线),COLORFF00FF;
三十日控仓线:=MA(C,30),LINETHICK1,COLORFF8000;
DRAWNUMBER(ISLASTBAR,三十日控仓线,三十日控仓线),COLORFF8000;
六十二日线:=MA(CLOSE,62),LINETHICK1,COLOR00FF00;
DRAWNUMBER(ISLASTBAR,六十二日线,六十二日线),COLOR00FF00;
八十九日线:=MA(CLOSE,89),LINETHICK1,COLOR8080FF;
DRAWNUMBER(ISLASTBAR,八十九日线,八十九日线),COLOR8080FF;
半年线:=MA(CLOSE,120),LINETHICK1,COLORRED;
DRAWNUMBER(ISLASTBAR,半年线,半年线),COLORRED;
年线:=MA(CLOSE,250),COLOR3299CC;
DRAWNUMBER(ISLASTBAR,年线,年线),COLOR3299CC;
进攻线:=MA(CLOSE,4),LINETHICK1,DOTLINE,COLOR4080FF;
DRAWNUMBER(ISLASTBAR,进攻线,进攻线),COLOR4080FF;
{逃顶}
X:=MA(C,120);
VAR5:=(MA(H,5)-X)/X;
VAR6:=MA((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100,3);
D41:DRAWTEXT(CROSS(95,VAR6) AND VAR5>0.3,H*1.003,'↙逃顶'),COLOR00FF00;
D5:DRAWTEXT( CROSS(93,VAR6) AND HHV(H,30)/LLV(L,30)>1.1 AND REF(X,1)/X>0.997 ,H*1.003,'↙逃顶'),COLOR00FF00;
D6:DRAWTEXT(CLOSE<X AND X<REF(X,1) AND REF(VAR6,1)>90 AND VAR6<REF(VAR6,1) AND REF(VAR6,1)>REF(VAR6,2) ,H*1.003,'↙逃顶'),COLOR00FF00;
{题材概念}
Z1:=STRCAT(DYBLOCK,' ');
Z2:=STRCAT(Z1,HYBLOCK);
Z3:=STRCAT(Z2,' ');
Z4:=STRCAT(Z3,GNBLOCK);
Z5:=STRCAT(Z4,' ');
Z6:=STRCAT(Z5,FGBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLOR00FFFF;
{金色涨停}
STICKLINE(C/REF(C,1)>1.095,C,O,1.8{金色涨停黄s芯宽度},0),COLORYELLOW;
{模块主图指标叠加首-------------------------------------------------}
{资本家建仓}
X1:=(C+L+H)/1.5;
X2:=EMA(X1,3);
X3:=EMA(X2,2.5);
DRAWICON(CROSS(X2,X3),L*0.98,DRAWNULL),CROSSDOT,LINETHICK7,COLORYELLOW;
DRAWTEXT(CROSS(X2,X3),L*0.993{数字大位置高},'↖加仓'),COLORRED,NODRAW;{不显示}{字色}
精:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - 精),0),3,1) / SMA(ABS((CLOSE -精)),3,1)) * 100);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'☆顶'),COLOR1880FF,NODRAW;{不显示}
STICKLINE(X2>=X3,LOW,HIGH,0,1),COLORRED,NODRAW;{不显示}
STICKLINE(X2>=X3,CLOSE,OPEN,2,2),COLORRED,NODRAW;{不显示}
STICKLINE(X2<X3,LOW,HIGH,0,1),COLOR00FF00,NODRAW;{不显示}
STICKLINE(X2<X3,CLOSE,OPEN,2,2),COLOR00FF00,NODRAW;{不显示}
STICKLINE(CROSS(X3,X2),OPEN,CLOSE,3,0),COLOR00FF00,NODRAW;{不显示}
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,3,0),COLORRED,NODRAW;{不显示}
STICKLINE((CLOSE>OPEN) AND (X2<X3),CLOSE,OPEN,3,2)COLOR00FF00,NODRAW;{不显示}
STICKLINE((CLOSE>OPEN) AND (X2>=X3),CLOSE,OPEN,3,2)COLORRED,NODRAW;{不显示}
STICKLINE((CLOSE<OPEN) AND (X2<X3),CLOSE,OPEN,3,0)COLOR00FF00,NODRAW;{不显示}
STICKLINE((CLOSE<OPEN) AND (X2>=X3),CLOSE,OPEN,1,0)COLORRED,NODRAW;{不显示}
O1:(SUM(EMA((CLOSE+LOW)/2,1)/3,3)),LINETHICK1,DOTLINE,COLOR404080,NODRAW;{不显示}{第一条线}
O2:EMA(O1,3),LINETHICK1,DOTLINE,COLOR404080,NODRAW;{不显示}{第二条线}
O3:EMA(O2,3),LINETHICK1,DOTLINE,COLOR404080,NODRAW;{不显示}{第三条线}
顶:=C-REF(C,1);
妹:=100*EMA(EMA(顶,6),6)/EMA(EMA(ABS(顶),6),6),NODRAW;{不显示}
哥:=IF(LLV(妹,2)=LLV(妹,7) AND COUNT(妹<0,2) AND CROSS(妹,MA(妹,2)),1,0);
DRAWTEXT(FILTER(哥=1,5),L*0.995{数字大位置高},'↖开火'),COLOR00FFFF;
H1:IF(FILTER(哥=1,5),L*0.96,DRAWNULL),CROSSDOT,LINETHICK7,COLORYELLOW,NODRAW;{不显示}
F1_:IF(FILTER(哥=1,5),L*0.96,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORRED,NODRAW;{不显示}
A:=BARSCOUNT(C);
打:=HHV(H,200);
吃:=LLV(L,200);
高:=(打-吃)/43;
B2:=L-高;
STICKLINE((A+0)/23=FLOOR((A+0)/23),B2,B2-1.5*高,2{方块宽度},0),COLOR00FFFF,NODRAW;{不显示}
DRAWTEXT((A+0)/23=FLOOR((A+0)/23),B2-1*高,'↖起飞'),COLOR00FFFF,NODRAW;{不显示}
BDGD:=C=HHV(C,13);
GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1;
G:REF(C,GDSJ),COLORFF00FF,POINTDOT;
破:CROSS(C,REF(G,1)),COLOR00FFFF,POINTDOT,NODRAW;
STICKLINE(GDSJ<=6,G,G,2,0),COLORFF00FF,NODRAW;{不显示}
DRAWTEXT(破,LOW,'突破'),COLORRED,NODRAW;{不显示}
BDDD:=C=LLV(C,13);
DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;
J点:REF(C,DDSJ),COLOR00FF00,POINTDOT,NODRAW;{不显示}
STICKLINE(DDSJ<=6,J点,J点,2,0),COLOR808080,NODRAW;{不显示}{虚线色};
{抄底}
Z:=MA(C,120);
VAR3:=(MA(C,5)-Z)/Z;
VAR4:=MA((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100,3);
D1:DRAWTEXT(CLOSE>Z AND REF(VAR4,1)<30 AND VAR4>REF(VAR4,1) AND REF(VAR4,1)<REF(VAR4,2) ,0.994*LOW ,'↖抄底'),COLOR80FFFF;
D2:DRAWTEXT(REF(VAR4,1)<7 AND VAR4>REF(VAR4,1) AND REF(VAR4,1)<REF(VAR4,2) AND VAR3<-0.1,0.994*LOW ,'↖抄底'),COLOR80FFFF;
D3:DRAWTEXT(CROSS(VAR4,5) AND VAR3<-0.3,0.994*LOW ,'↖抄底'),COLOR80FFFF;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
十日线赋值:收盘价的10日简单移动平均,LINETHICK1,COLOR00FFFF
DRAWNUMBER(ISLASTBAR,十日线,十日线),COLOR00FFFF
二十日线赋值:收盘价的20日简单移动平均,LINETHICK1,COLORFF00FF
DRAWNUMBER(ISLASTBAR,二十日线,二十日线),COLORFF00FF
三十日控仓线赋值:C的30日简单移动平均,LINETHICK1,COLORFF8000
DRAWNUMBER(ISLASTBAR,三十日控仓线,三十日控仓线),COLORFF8000
六十二日线赋值:收盘价的62日简单移动平均,LINETHICK1,COLOR00FF00
DRAWNUMBER(ISLASTBAR,六十二日线,六十二日线),COLOR00FF00
八十九日线赋值:收盘价的89日简单移动平均,LINETHICK1,COLOR8080FF
DRAWNUMBER(ISLASTBAR,八十九日线,八十九日线),COLOR8080FF
半年线赋值:收盘价的120日简单移动平均,LINETHICK1,画红色
DRAWNUMBER(ISLASTBAR,半年线,半年线),画红色
年线赋值:收盘价的250日简单移动平均,COLOR3299CC
DRAWNUMBER(ISLASTBAR,年线,年线),COLOR3299CC
进攻线赋值:收盘价的4日简单移动平均,LINETHICK1,DOTLINE,COLOR4080FF
DRAWNUMBER(ISLASTBAR,进攻线,进攻线),COLOR4080FF
{逃顶}
X赋值:C的120日简单移动平均
VAR5赋值:(H的5日简单移动平均-X)/X
VAR6赋值:MA((收盘价-10日内最低价最低值)/(10日内HIGH最高值-10日内最低价最低值)*100,3)
输出D41:DRAWTEXT(95上穿VAR6 AND VAR5>0.3,H*1.003,'↙逃顶'),COLOR00FF00
输出D5:DRAWTEXT( 93上穿VAR6 AND 30日内H最高值/30日内L最低值>1.1 AND 1日前的X/X>0.997 ,H*1.003,'↙逃顶'),COLOR00FF00
输出D6:DRAWTEXT(收盘价90 AND VAR6<1日前的VAR6 AND 1日前的VAR6>2日前的VAR6 ,H*1.003,'↙逃顶'),COLOR00FF00
{题材概念}
Z1赋值:STRCAT(DYBLOCK,' ')
Z2赋值:STRCAT(Z1,HYBLOCK)
Z3赋值:STRCAT(Z2,' ')
Z4赋值:STRCAT(Z3,GNBLOCK)
Z5赋值:STRCAT(Z4,' ')
Z6赋值:STRCAT(Z5,FGBLOCK)
DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLOR00FFFF
{金色涨停}
STICKLINE(C/1日前的C>1.095,C,O,1.8{金色涨停黄S芯宽度},0),画黄色
{模块主图指标叠加首-------------------------------------------------}
{资本家建仓}
X1赋值:(C+L+H)/1.5
X2赋值:X1的3日指数移动平均
X3赋值:X2的2.5日指数移动平均
DRAWICON(X2上穿X3,L*0.98,DRAWNULL),CROSSDOT,LINETHICK7,画黄色
DRAWTEXT(X2上穿X3,L*0.993{数字大位置高},'↖加仓'),画红色,NODRAW
{不显示}{字色}
精赋值:1日前的收盘价
RSI赋值:((SMA(MAX((收盘价 - 精),0),3,1) / SMA((收盘价 -精的绝对值),3,1)) * 100)
DRAWTEXT(88上穿RSI,(HIGH * 1.02),'☆顶'),COLOR1880FF,NODRAW
当满足条件X2>=X3时,在最低价和HIGH之间画柱状线
当满足条件X2>=X3时,在收盘价和开盘价之间画柱状线
当满足条件X2当满足条件X2{不显示}
STICKLINE(X3上穿X2,开盘价,收盘价,3,0),COLOR00FF00,NODRAW
{不显示}
STICKLINE(X2上穿X3,开盘价,收盘价,3,0),画红色,NODRAW
{不显示}
STICKLINE((收盘价>开盘价) AND (X2{不显示}
STICKLINE((收盘价>开盘价) AND (X2>=X3),收盘价,开盘价,3,2)画红色,NODRAW
{不显示}
STICKLINE((收盘价<开盘价) AND (X2{不显示}
STICKLINE((收盘价<开盘价) AND (X2>=X3),收盘价,开盘价,1,0)画红色,NODRAW
输出{不显示}
O1:(SUM(EMA((收盘价+最低价)/2,1)/3,3)),LINETHICK1,DOTLINE,COLOR404080,NODRAW
输出{不显示}{第一条线}
O2:O1的3日指数移动平均,LINETHICK1,DOTLINE,COLOR404080,NODRAW
输出{不显示}{第二条线}
O3:O2的3日指数移动平均,LINETHICK1,DOTLINE,COLOR404080,NODRAW
{不显示}{第三条线}
顶赋值:C-1日前的C
妹赋值:100*顶的6日指数移动平均,6)/EMA(EMA(顶的绝对值,6),6),NODRAW
{不显示}
哥赋值:IF(2日内妹最低值=7日内妹最低值 AND 统计2日满足妹<0的天数 AND CROSS(妹,妹的2日简单移动平均),1,0)
DRAWTEXT(哥=1的5过滤,L*0.995{数字大位置高},'↖开火'),COLOR00FFFF
输出H1:IF(哥=1的5过滤,L*0.96,DRAWNULL),CROSSDOT,LINETHICK7,画黄色,NODRAW
输出{不显示}
F1_:IF(哥=1的5过滤,L*0.96,DRAWNULL),CIRCLEDOT, 线宽为2,画红色,NODRAW
{不显示}
A赋值:C的有效数据周期数
打赋值:200日内H最高值
吃赋值:200日内L最低值
高赋值:(打-吃)/43
B2赋值:L-高
STICKLINE((A+0)/23=FLOOR((A+0)/23),B2,B2-1.5*高,2{方块宽度},0),COLOR00FFFF,NODRAW
{不显示}
DRAWTEXT((A+0)/23=FLOOR((A+0)/23),B2-1*高,'↖起飞'),COLOR00FFFF,NODRAW
{不显示}
BDGD赋值:C=13日内C最高值
GDSJ赋值:上次FILTER(0.8上穿BDGD,2距今天数)+1
输出G:GDSJ日前的C,COLORFF00FF,POINTDOT
输出破:CROSS(C,1日前的G),COLOR00FFFF,POINTDOT,NODRAW
当满足条件GDSJ<=6时,在G和G之间画柱状线
当满足条件破时,在最低价和'突破'位置书写文字
{不显示}
BDDD赋值:C=13日内C最低值
DDSJ赋值:上次FILTER(0.8上穿BDDD,2距今天数)+1
输出J点:DDSJ日前的C,COLOR00FF00,POINTDOT,NODRAW
当满足条件DDSJ<=6时,在J点和J点之间画柱状线
{不显示}{虚线色}
{抄底}
Z赋值:C的120日简单移动平均
VAR3赋值:(C的5日简单移动平均-Z)/Z
VAR4赋值:MA((收盘价-20日内最低价最低值)/(20日内HIGH最高值-20日内最低价最低值)*100,3)
输出D1:DRAWTEXT(收盘价>Z AND 1日前的VAR4<30 AND VAR4>1日前的VAR4 AND 1日前的VAR4<2日前的VAR4 ,0.994*最低价 ,'↖抄底'),COLOR80FFFF
输出D2:DRAWTEXT(1日前的VAR4<7 AND VAR4>1日前的VAR4 AND 1日前的VAR4<2日前的VAR4 AND VAR3<-0.1,0.994*最低价 ,'↖抄底'),COLOR80FFFF
输出D3:DRAWTEXT(VAR4上穿5 AND VAR3<-0.3,0.994*最低价 ,'↖抄底'),COLOR80FFFF