通达信机构仓位波段分析副图指标 绿蓝柱持币 红粉柱持股 源码附图
HJ_1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
HJ_2:=EMA(EMA(EMA(HJ_1,4),4),4);
HJ_3:=(HJ_2-REF(HJ_2,1))/REF(HJ_2,1)*100;
HJ_4:=MA(HJ_3,2);
HJ_5:=(HJ_3-HJ_4)*30000+40000;
资金:(HJ_3-HJ_4)>0,VOLSTICK NODRAW;
资金2:(HJ_3-HJ_4)<0,VOLSTICK NODRAW;
HJ_6:=EMA(CLOSE,5)-EMA(CLOSE,55);
HJ_7:=EMA(HJ_6,10);
HJ_8:=(HJ_6-HJ_7)*20000+20000;
资金3:(HJ_6-HJ_7)>0,VOLSTICK NODRAW;
资金4:(HJ_6-HJ_7)<0,VOLSTICK NODRAW;
STICKLINE(资金3 AND 资金,0,100,3,0), COLORYELLOW;
STICKLINE(资金3 AND 资金,0,100,2.6,0), COLORRED;
STICKLINE(资金2,0,100,3,0), COLORGREEN;
STICKLINE(资金4,0,100,3,0), COLORGREEN;
机构资金:(HJ_3-HJ_4)*30000+40000,COLORYELLOW NODRAW;
DRAWTEXT(ISLASTBAR,90,' 红加'),COLOR7800FF ;
敢死队资金:(HJ_6-HJ_7)*20000+20000,COLORMAGENTA NODRAW;
DRAWTEXT(ISLASTBAR,40,' 机构'),COLOR7800FF ;
AAV:=VOL/((H-L)*2-ABS(C-O))NODRAW;
KKPU1:=IF(C>OPEN,AAV*(HIGH-LOW),IF(C<OPEN,AAV*((HIGH-OPEN)+(C-LOW)),VOL/2)),NODRAW;
KKPU2:=IF(C>OPEN,0-AAV*((HIGH-C)+(OPEN-LOW)),IF(C<OPEN,0-AAV*(HIGH-LOW),0-VOL/2)),NODRAW;
净流入:=(KKPU1+KKPU2)/99,NODRAW;
KKPU3:=(C/REF(C,1)-1)*100;
A进:DRAWTEXT(净流入>=200 AND KKPU3>=3,L*0.995,VARCAT(VARCAT('净买:',VAR2STR(净流入,0)),'万')),COLORYELLOW NODRAW;
B出:DRAWTEXT(净流入<-200 AND KKPU3<=-2,H*1.01,VARCAT(VARCAT('流出:',VAR2STR(净流入,0)),'万')),COLORGREEN NODRAW;
STICKLINE(A进,0,60,3,0),COLORRED;
STICKLINE(A进,0,60,2.5,0),COLORYELLOW;
STICKLINE(B出,0,100,3,0),COLORGREEN;
VAR2:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*200*10 NODRAW;
能量: SMA(VAR2,5,1)/100,COLORRED NODRAW;
DRAWBAND(能量>REF(能量,1),RGB(250,0,120),0,RGB(0,180,180))NODRAW;
STICKLINE(能量>REF(能量,1),0,30,3.2,0),COLOR7800FF;
STICKLINE(能量<REF(能量,1),0,30,3.2,0),COLORFF7800;
X_1:=(CLOSE-EMA(CLOSE,5))/EMA(CLOSE,5)*100;
X_2:=(CLOSE-EMA(CLOSE,10))/EMA(CLOSE,10)*100;
X_3:=(CLOSE-EMA(CLOSE,20))/EMA(CLOSE,20)*100;
X_4:=(CLOSE-EMA(CLOSE,60))/EMA(CLOSE,60)*100;
X_5:=(CLOSE-EMA(CLOSE,120))/EMA(CLOSE,120)*100;
X_6:=X_1>1 AND X_2>2 AND X_3>3 AND X_4>4;
X_7:=X_1>2 AND X_2>4 AND X_3>6 AND X_4>8;
X_8:=X_1>3 AND X_2>5 AND X_3>7 AND X_4>9;
X_9:=X_1>4 AND X_2>6 AND X_3>8 AND X_4>10 AND X_5>12;
X_10:=BARSLASTCOUNT(X_7)=1 AND CROSS(CLOSE,EMA(CLOSE,50)*3.19) AND HIGH/CLOSE<1.05;
小鱼:BARSLASTCOUNT(X_6)*3.5,NODRAW,COLORWHITE;
红鱼:BARSLASTCOUNT(X_7)*3.5,NODRAW,COLORRED;
紫鱼:BARSLASTCOUNT(X_8)*3.5,NODRAW,COLORMAGENTA;
黄鱼:BARSLASTCOUNT(X_9)*3.5,NODRAW,COLORYELLOW;
DRAWBAND(0,RGB(0,235,235),0,RGB(0,0,0));
STICKLINE(X_6,0,小鱼*3,(-3),(-3)),COLORCYAN;
STICKLINE(X_7,0,红鱼*3.5,(-3),0),COLORRED;
STICKLINE(X_8,0,紫鱼*3.5,(-3),0),COLORMAGENTA;
STICKLINE(X_8,0,黄鱼*3.5,(-3),0),COLOR00AAAA;
STICKLINE(X_8,0,黄鱼*3.5,1,0),COLORYELLOW;
STICKLINE(X_10,小鱼*3.5+1,小鱼*3.5+2,(-3),0),COLOR00AA00;
STICKLINE(X_10,小鱼*3.5+1,小鱼*3.5+2,1,0),COLORGREEN;
A5:=34;B5:=3;
RRR1:=EMA(100*(CLOSE-LLV(LOW,A5))/(HHV(HIGH,A5)-LLV(LOW,A5)),B5)/4,COLORFFFF00,LINETHICK2;
分界线:RRR1, NODRAW;
STICKLINE((CROSS(21.5,分界线)),0,100,3,0), COLORGREEN NODRAW;
DRAWICON(CROSS(21.5,分界线),21.H*2.8,8);
STICKLINE((CROSS(23.16,分界线)),0,45,3,0), COLORGREEN;
STICKLINE((CROSS(23.16,分界线)),0,45,1.5,0), COLORBLUE;
DRAWICON(CROSS(23.16,分界线),23.L*3.5,15);
B:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C<O,100,2)DRAWABOVE,COLORRED;
STICKLINE(B,0,45,3,0),COLORBLUE;
B2:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C<O,100,2)DRAWABOVE,COLORRED;
沪A涨家数:="999999$ADVANCE",COLORRED,NODRAW;
沪A跌家数:="999999$DECLINE",COLORGREEN,NODRAW;
深A涨家数:="399001$ADVANCE",COLORRED,NODRAW;
深A跌家数:="399001$DECLINE",COLORGREEN,NODRAW;
上涨总家数:=沪A涨家数+深A涨家数,COLORRED,NODRAW;
下跌总家数:=沪A跌家数+深A跌家数,COLORGREEN,NODRAW;
上涨总家数比:=上涨总家数/(上涨总家数+下跌总家数)*100,COLORRED,NODRAW;
下跌总家数比:=下跌总家数/(上涨总家数+下跌总家数)*100,COLORGREEN,NODRAW;
AAA1B:=STRCAT(STRCAT('上涨总家数比 ',CON2STR(上涨总家数比,0)),' %');
DRAWTEXT_FIX(ISLASTBAR,0.01,0.69,0,AAA1B),COLORWHITE;
AAA2B:=STRCAT(STRCAT('下跌总家数比 ',CON2STR(下跌总家数比,0)),' %');
DRAWTEXT_FIX(ISLASTBAR,0.01,0.89,0,AAA2B),COLORBLUE;
A:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
首板:FILTER(A,28);
A00:=SUM(IF((CLOSE> REF(CLOSE,1.000)),VOL,IF((CLOSE<REF(CLOSE,1.000)),(0-VOL),0)),0);
A01:=SUMBARS(VOL,CAPITAL);
A02:=IF((CLOSE>LLV(CLOSE,A01)),1.000,(0-1.000))*IF((A00 >LLV(A00,A01)),1.000,(0-1.000));
A03:=(COUNT((IF((A02=(0-1.000)),1.000,0)=1.000),8.000)>2.000);
A04:=((CLOSE-DMA((((3.000 * HIGH + LOW)+OPEN)+2.000 * CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
AMOUNT/VOL/100.000/100.000))/DMA((((3.000*HIGH+LOW)+OPEN)+2.000*CLOSE)/7.000,VOL/SUM(AMOUNT,13.000)/
AMOUNT/VOL/100.000/100.000)*100.000<(0-18.000));
A05:=((CLOSE-MIN(REF(CLOSE,5.000)*0.865,REF(CLOSE,21.000)*0.772))/CLOSE<0.009);
A06:=((A03 AND A04) AND A05)NODRAW;
STICKLINE(A06,0,100,8,0),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HJ_1赋值:(2*收盘价+最高价+最低价+开盘价)/5
HJ_2赋值:HJ_1的4日指数移动平均,4),4)
HJ_3赋值:(HJ_2-1日前的HJ_2)/1日前的HJ_2*100
HJ_4赋值:HJ_3的2日简单移动平均
HJ_5赋值:(HJ_3-HJ_4)*30000+40000
输出资金:(HJ_3-HJ_4)>0,成交量STICK NODRAW
资金2:(HJ_3-HJ_4)<0,成交量STICK NODRAW
HJ_6赋值:收盘价的5日指数移动平均-收盘价的55日指数移动平均
HJ_7赋值:HJ_6的10日指数移动平均
HJ_8赋值:(HJ_6-HJ_7)*20000+20000
资金3:(HJ_6-HJ_7)>0,成交量STICK NODRAW
资金4:(HJ_6-HJ_7)<0,成交量STICK NODRAW
当满足条件资金3 AND 资金时,在0和100之间画柱状线
当满足条件资金3 AND 资金时,在0和100之间画柱状线
当满足条件资金2时,在0和100之间画柱状线
当满足条件资金4时,在0和100之间画柱状线
机构输出资金:(HJ_3-HJ_4)*30000+40000,画黄色 NODRAW
当满足条件ISLASTBAR时,在90和' 红加'位置书写文字
敢死队输出资金:(HJ_6-HJ_7)*20000+20000,COLORMAGENTA NODRAW
当满足条件ISLASTBAR时,在40和' 机构'位置书写文字
AAV赋值:成交量/((H-L)*2-C-O的绝对值)NODRAW
KKPU1赋值:IF(C>开盘价,AAV*(最高价-最低价),IF(C<开盘价,AAV*((最高价-开盘价)+(C-最低价)),成交量/2)),NODRAW
KKPU2赋值:IF(C>开盘价,0-AAV*((最高价-C)+(开盘价-最低价)),IF(C<开盘价,0-AAV*(最高价-最低价),0-成交量/2)),NODRAW
净流入赋值:(KKPU1+KKPU2)/99,NODRAW
KKPU3赋值:(C/1日前的C-1)*100
A进:DRAWTEXT(净流入>=200 AND KKPU3>=3,L*0.995,VARCAT(VARCAT('净买:',VAR2STR(净流入,0)),'万')),画黄色 NODRAW
B出:DRAWTEXT(净流入<-200 AND KKPU3<=-2,H*1.01,VARCAT(VARCAT('流出:',VAR2STR(净流入,0)),'万')),画绿色 NODRAW
当满足条件A进时,在0和60之间画柱状线
当满足条件A进时,在0和60之间画柱状线
当满足条件B出时,在0和100之间画柱状线
VAR2赋值:(收盘价-24日内最低价最低值)/(24日内最高价最高值-24日内最低价最低值)*200*10 NODRAW
VAR2的5日[1日权重]移动平均
DRAWBAND(能量>1日前的能量,RGB(250,0,120),0,RGB(0,180,180))NODRAW
STICKLINE(能量>1日前的能量,0,30,3.2,0),COLOR7800FF
STICKLINE(能量<1日前的能量,0,30,3.2,0),COLORFF7800
X_1赋值:(收盘价-收盘价的5日指数移动平均)/收盘价的5日指数移动平均*100
X_2赋值:(收盘价-收盘价的10日指数移动平均)/收盘价的10日指数移动平均*100
X_3赋值:(收盘价-收盘价的20日指数移动平均)/收盘价的20日指数移动平均*100
X_4赋值:(收盘价-收盘价的60日指数移动平均)/收盘价的60日指数移动平均*100
X_5赋值:(收盘价-收盘价的120日指数移动平均)/收盘价的120日指数移动平均*100
X_6赋值:X_1>1 AND X_2>2 AND X_3>3 AND X_4>4
X_7赋值:X_1>2 AND X_2>4 AND X_3>6 AND X_4>8
X_8赋值:X_1>3 AND X_2>5 AND X_3>7 AND X_4>9
X_9赋值:X_1>4 AND X_2>6 AND X_3>8 AND X_4>10 AND X_5>12
X_10:=BARSLASTCOUNT(X_7)=1 AND CROSS(收盘价,收盘价的50日指数移动平均*3.19) AND 最高价/收盘价<1.05
输出小鱼:BARSLASTCOUNT(X_6)*3.5,NODRAW,画白色
输出红鱼:BARSLASTCOUNT(X_7)*3.5,NODRAW,画红色
输出紫鱼:BARSLASTCOUNT(X_8)*3.5,NODRAW,COLORMAGENTA
输出黄鱼:BARSLASTCOUNT(X_9)*3.5,NODRAW,画黄色
DRAWBAND(0,RGB(0,235,235),0,RGB(0,0,0))
STICKLINE(X_6,0,小鱼*3,(-3),(-3)),COLORCYAN
STICKLINE(X_7,0,红鱼*3.5,(-3),0),画红色
STICKLINE(X_8,0,紫鱼*3.5,(-3),0),COLORMAGENTA
STICKLINE(X_8,0,黄鱼*3.5,(-3),0),COLOR00AAAA
当满足条件X_8时,在0和黄鱼*3.5之间画柱状线
STICKLINE(X_10,小鱼*3.5+1,小鱼*3.5+2,(-3),0),COLOR00AA00
当满足条件X_10时,在小鱼*3.5+1和小鱼*3.5+2之间画柱状线
A5赋值:34
B5赋值:3
RRR1赋值:EMA(100*(收盘价-A5日内最低价最低值)/(A5日内最高价最高值-A5日内最低价最低值),B5)/4,COLORFFFF00, 线宽为2
输出分界线:RRR1, NODRAW
STICKLINE((21.5上穿分界线),0,100,3,0), 画绿色 NODRAW
DRAWICON(21.5上穿分界线,21.H*2.8,8)
STICKLINE((23.16上穿分界线),0,45,3,0), 画绿色
STICKLINE((23.16上穿分界线),0,45,1.5,0), COLORBLUE
DRAWICON(23.16上穿分界线,23.L*3.5,15)
输出B:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C当满足条件B时,在0和45之间画柱状线
B2:DRAWICON(RANGE(TOPRANGE(V),87,50000) AND C沪A涨家数赋值:"999999$ADVANCE",画红色,NODRAW
沪A跌家数赋值:"999999$DECLINE",画绿色,NODRAW
深A涨家数赋值:"399001$ADVANCE",画红色,NODRAW
深A跌家数赋值:"399001$DECLINE",画绿色,NODRAW
上涨总家数赋值:沪A涨家数+深A涨家数,画红色,NODRAW
下跌总家数赋值:沪A跌家数+深A跌家数,画绿色,NODRAW
上涨总家数比:=上涨总家数/(上涨总家数+下跌总家数)*100,画红色,NODRAW
下跌总家数比:=下跌总家数/(上涨总家数+下跌总家数)*100,画绿色,NODRAW
AAA1B赋值:STRCAT(STRCAT('上涨总家数比 ',CON2STR(上涨总家数比,0)),' %')
当满足条件ISLASTBAR时,在横轴0.01纵轴0.69位置书写文字
AAA2B赋值:STRCAT(STRCAT('下跌总家数比 ',CON2STR(下跌总家数比,0)),' %')
当满足条件ISLASTBAR时,在横轴0.01纵轴0.89位置书写文字
A赋值:C/1日前的C>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12))
输出首板:A的28过滤
A00:=SUM(IF((收盘价> 1.000日前的收盘价),成交量,IF((收盘价<1.000日前的收盘价),(0-成交量),0)),0)
A01:=成交量累加至CAPITAL的天数
A02:=IF((收盘价>A01日内收盘价最低值),1.000,(0-1.000))*IF((A00 >A01日内A00最低值),1.000,(0-1.000))
A03:=(COUNT((IF((A02=(0-1.000)),1.000,0)=1.000),8.000)>2.000)
A04:=((收盘价-DMA((((3.000 * 最高价 + 最低价)+开盘价)+2.000 * 收盘价)/7.000,成交量/13.000的AMOUNT日累和/AMOUNT/成交量/100.000/100.000))/DMA((((3.000*最高价+最低价)+开盘价)+2.000*收盘价)/7.000,成交量/13.000的AMOUNT日累和/AMOUNT/成交量/100.000/100.000)*100.000<(0-18.000))
A05:=((收盘价-5.000日前的收盘价*0.865和21.000日前的收盘价*0.772的较小值)/收盘价<0.009)
A06:=((A03 AND A04) AND A05)NODRAW
当满足条件A06时,在0和100之间画柱状线