资金暗流涌动通达信副图源码分享
N1:=9;
N2:=5;
AVPRICE:=(2*OPEN+2*CLOSE+2*HIGH+2*LOW)/8;
INDEXAVP:=(2*INDEXH+2*INDEXL+2*INDEXO+2*INDEXC)/8;
F:=(AVPRICE - REF(AVPRICE,1))/REF(AVPRICE,1);
F1:=(INDEXAVP - REF(INDEXAVP,1))/REF(INDEXAVP,1);
AA:=AVPRICE;
BB:=((VOL)*((AA)*(2) - HIGH - LOW))/(HIGH - LOW);
CC:=IF((HIGH = LOW) AND (AA < REF(AA,1)),((-1))*(VOL),VOL);
A:=IF((HIGH = LOW),CC,BB);
B:=SUM(A,11);
BBD:=(((B)/((CAPITAL)*(11)))*(10000));
BB1:=IF((BBD < 150) AND (BBD > (-150)),BBD,150);
买方能量指标:=IF((BB1 > 0),BB1,0);
STICKLINE((BB1 > 0),0,买方能量指标,2,0),COLOR00FFFF;
主动买量:IF((BB1 > 0),BB1,0),COLOR00FFFF,NODRAW;
主动卖量:IF((BB1< 0),BB1,0),COLOR00FF00,NODRAW;
A16:=(SUM((AVPRICE)*(VOL),16))/(SUM(VOL,16));
A11:=(SUM((AVPRICE)*(VOL),11))/(SUM(VOL,11));
A6:=(SUM((AVPRICE)*(VOL),6))/(SUM(VOL,6));
A7:=(SUM((AVPRICE)*(VOL),7) - (AVPRICE)*(VOL))/(SUM(VOL,7) - VOL);
A0:=((A11 - A16)/(AVPRICE))*(1000);
A00:=IF((A0 > 50),50,IF((A0 < (-50)),(-50),A0));
A1:=((A6 - A11)/(AVPRICE))*(1000);
AA11:=IF((A1 > 50),50,IF((A1 < (-50)),(-50),A1));
A2:=((((A6 - A7)/(A7))*(5))/(4))*(1000);
A22:=IF((A2 > 50),50,IF((A2 < (-50)),(-50),A2));
主力资金:EMA(100*(C-LLV(LOW,30))/(HHV(H,30)-LLV(LOW,30)),3), COLORRED,LINETHICK2;
即将爆发线: 65,COLOR00FF00;
起爆线:80,COLORWHITE,LINETHICK1;
DRAWTEXT(CROSS(主力资金,起爆线),主力资金,'◆爆发!') ,COLORYELLOW;
TMD:=C-REF(C,1);
金线:100*EMA(EMA(TMD,N1),N1)/EMA(EMA(ABS(TMD),N1),N1),COLORWHITE,LINETHICK1;
银线:MA(金线,N2),COLOR00FF00,LINETHICK1;
STICKLINE(金线>银线 , 金线,银线 ,1.5,0),COLORRED,LINETHICK2;
STICKLINE(银线>金线,金线,银线,1.5,0),COLORGREEN,LINETHICK2;
爆发线:30,COLORFF00FF,LINETHICK1;
起步线:0,COLORWHITE,LINETHICK1;
DRAWTEXT(CROSS(起爆线,主力资金),起爆线,'●空仓!') ,COLORYELLOW;
抄底线:-25,COLORWHITE,LINETHICK1;
DRAWTEXT(CROSS(金线,爆发线),金线,'◆爆发!') ,COLORWHITE;
DRAWTEXT(CROSS(主力资金,即将爆发线),主力资金,'■再加仓') ,COLORWHITE;
DRAWTEXT(CROSS(金线,起步线),金线,'■加仓!') ,COLORWHITE;
DRAWTEXT(CROSS(金线,抄底线),金线,'●半仓!') ,COLORWHITE;
LC:= REF(C,1);
顶:=85;
中:=50;
底:=20;
VAR11:=HHV(HIGH,9)-LLV(LOW,9);
VAR12:=HHV(HIGH,9)-CLOSE;
VAR13:=CLOSE-LLV(LOW,9);
VAR14:=VAR12/VAR11*100-70;
VAR15:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR7:=SMA(VAR13/VAR11*100,3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR14,9,1);
VARA:=IF(VAR9>100,VAR9-100,0);
VARB:=HHV(HIGH,34);
AA1:= VARA*2;
BB5:= EMA((VAR6-VAR8)/(VARB-VAR8)*100,13);
VARC:=EMA(0.667*REF(BB5,1)+0.333*BB5,2);
CC5:SMA(VAR15,20,1),COLOR000000;
CC1:SMA(CC5,5,1),COLOR000000;
出击:IF((CROSS(CC5,CC1) AND (CC1 < 顶) ),80,0),COLOR00FF00;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N1赋值:9
N2赋值:5
AVPRICE赋值:(2*开盘价+2*收盘价+2*最高价+2*最低价)/8
INDEXAVP赋值:(2*INDEXH+2*INDEXL+2*INDEXO+2*INDEXC)/8
F赋值:(AVPRICE - 1日前的AVPRICE)/1日前的AVPRICE
F1:=(INDEXAVP - 1日前的INDEXAVP)/1日前的INDEXAVP
AA赋值:AVPRICE
BB赋值:((成交量)*((AA)*(2) - 最高价 - 最低价))/(最高价 - 最低价)
CC赋值:IF((最高价 = 最低价) AND (AA < 1日前的AA),((-1))*(成交量),成交量)
A赋值:IF((最高价 = 最低价),CC,BB)
B赋值:11的A日累和
BBD:=(((B)/((CAPITAL)*(11)))*(10000))
BB1:=IF((BBD < 150) AND (BBD > (-150)),BBD,150)
买方能量指标赋值:IF((BB1 > 0),BB1,0)
STICKLINE((BB1 > 0),0,买方能量指标,2,0),COLOR00FFFF
输出主动买量:IF((BB1 > 0),BB1,0),COLOR00FFFF,NODRAW
输出主动卖量:IF((BB1< 0),BB1,0),COLOR00FF00,NODRAW
A16:=(SUM((AVPRICE)*(成交量),16))/(SUM(成交量,16))
A11:=(SUM((AVPRICE)*(成交量),11))/(SUM(成交量,11))
A6:=(SUM((AVPRICE)*(成交量),6))/(SUM(成交量,6))
A7:=(SUM((AVPRICE)*(成交量),7) - (AVPRICE)*(成交量))/(SUM(成交量,7) - 成交量)
A0:=((A11 - A16)/(AVPRICE))*(1000)
A00:=IF((A0 > 50),50,IF((A0 < (-50)),(-50),A0))
A1:=((A6 - A11)/(AVPRICE))*(1000)
AA11:=IF((A1 > 50),50,IF((A1 < (-50)),(-50),A1))
A2:=((((A6 - A7)/(A7))*(5))/(4))*(1000)
A22:=IF((A2 > 50),50,IF((A2 < (-50)),(-50),A2))
输出主力资金:EMA(100*(C-30日内最低价最低值)/(30日内H最高值-30日内最低价最低值),3), 画红色, 线宽为2
输出即将爆发线: 65,COLOR00FF00
输出起爆线:80,画白色,LINETHICK1
DRAWTEXT(主力资金上穿起爆线,主力资金,'◆爆发!') ,画黄色
TMD赋值:C-1日前的C
输出金线:100*TMD的N1日指数移动平均,N1)/EMA(EMA(TMD的绝对值,N1),N1),画白色,LINETHICK1
输出银线:金线的N2日简单移动平均,COLOR00FF00,LINETHICK1
当满足条件金线>银线 时,在 金线和银线 之间画柱状线
当满足条件银线>金线时,在金线和银线之间画柱状线
输出爆发线:30,COLORFF00FF,LINETHICK1
输出起步线:0,画白色,LINETHICK1
DRAWTEXT(起爆线上穿主力资金,起爆线,'●空仓!') ,画黄色
输出抄底线:-25,画白色,LINETHICK1
DRAWTEXT(金线上穿爆发线,金线,'◆爆发!') ,画白色
DRAWTEXT(主力资金上穿即将爆发线,主力资金,'■再加仓') ,画白色
DRAWTEXT(金线上穿起步线,金线,'■加仓!') ,画白色
DRAWTEXT(金线上穿抄底线,金线,'●半仓!') ,画白色
LC赋值: 1日前的C
顶赋值:85
中赋值:50
底赋值:20
VAR11:=9日内最高价最高值-9日内最低价最低值
VAR12:=9日内最高价最高值-收盘价
VAR13:=收盘价-9日内最低价最低值
VAR14:=VAR12/VAR11*100-70
VAR15:=(收盘价-60日内最低价最低值)/(60日内最高价最高值-60日内最低价最低值)*100
VAR6:=(2*收盘价+最高价+最低价)/4
VAR13/VAR11*100的3日[1日权重]移动平均
VAR8:=34日内最低价最低值
VAR7的3日[1日权重]移动平均
如果VAR9>100返回VAR9-100否则返回0
VARB赋值:34日内最高价最高值
AA1:= VARA*2
BB5:= EMA((VAR6-VAR8)/(VARB-VAR8)*100,13)
VARC:=E0.667*1日前的BB5+0.333*BB5的2日简单移动平均
VAR15的20日[1日权重]移动平均
CC5的5日[1日权重]移动平均
输出出击:IF((CC5上穿CC1 AND (CC1 < 顶) ),80,0),COLOR00FF00