最牛抓板分时和谐源码分享 通达信分时副图 源码附图
VAR1:=STRCAT(HYBLOCK,1);
VAR2:=STRCAT(VAR1,DYBLOCK);
VAR3:=STRCAT(VAR2,1);
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(VAR3,GNBLOCK)),COLORYELLOW;
VAR4:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),(-VOL)/CAPITAL*100,0)),0);
VAR5:=VOL*CLOSE/100;
VAR6:=SUM(IF(VAR5/8>20 AND CLOSE>REF(CLOSE,1),VAR5,0),0);
VAR7:=SUM(IF(VAR5/8>20 AND CLOSE<REF(CLOSE,1),VAR5,0),0);
VAR8:=SUM(IF(VAR5/8<20 AND CLOSE>REF(CLOSE,1),VAR5,0),0);
VAR9:=SUM(IF(VAR5/8<20 AND CLOSE<REF(CLOSE,1),VAR5,0),0);
VAR10:=VAR6+VAR7+VAR8+VAR9;
VAR11:=IF(ISLASTBAR,100*VAR6/VAR10,0);
VAR12:=IF(ISLASTBAR,100*VAR7/VAR10,0);
VAR13:=IF(ISLASTBAR,100*VAR8/VAR10,0);
VAR14:=IF(ISLASTBAR,100*VAR9/VAR10,0);
机构买:VAR6,COLORRED,LINETHICK6;
机构卖:VAR7,COLORGREEN,LINETHICK6;
机构进出:机构买-机构卖,NODRAW;
散户买:VAR8,COLOR5555FF;
散户卖:VAR9,COLOR55FF55;
强势:100*VAR6/VAR10>50;
拉升:100*VAR6/VAR10-100*VAR7/VAR10>18 AND 100*VAR6/VAR10-100*VAR9/VAR10>18;
DRAWTEXT(ISLASTBAR=1,机构买*0.95,2),COLORRED,LINETHICK2;
DRAWTEXT(ISLASTBAR=1,机构卖*0.95,2),COLORFFFF55,LINETHICK2;
VAR15:=BETWEEN(CLOSE/(SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE))),1.05,0.95);
VAR16:=IF(VAR15=0,MA(CLOSE,BARSCOUNT(CLOSE)),SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE)));
DRAWICON(CROSS(CLOSE/VAR16,1.03),机构买*1.01,17);
VAR17:=1;
VAR18:=STRCAT(STRCAT(3,CON2STR(100*VAR6/VAR10,0)),4);
VAR19:=STRCAT(STRCAT(5,CON2STR(100*VAR7/VAR10,0)),4);
VAR20:=STRCAT(STRCAT(6,CON2STR(100*(VAR6-VAR7)/VAR10,0)),4);
VAR21:=STRCAT(STRCAT(7,CON2STR(100*VAR8/VAR10,0)),4);
VAR22:=STRCAT(STRCAT(8,CON2STR(100*VAR9/VAR10,0)),4);
VAR23:=STRCAT(STRCAT(9,CON2STR(100*(VAR8-VAR9)/VAR10,0)),4);
DRAWTEXT_FIX(VAR17=1,0.35,0.25,0,VAR18),COLORRED;
DRAWTEXT_FIX(VAR17=1,0.35,0.45,0,VAR20),COLORCYAN,LINETHICK5;
VAR24:=IF(DATE<=1590301,1,0);
VAR25:=BETWEEN(CLOSE*VAR24/(SUM(AMOUNT,BARSCOUNT(CLOSE*VAR24))/SUM(VOL*100,BARSCOUNT(CLOSE*VAR24))),1.05,0.95);
VAR26:=IF(VAR25=0,MA(CLOSE*VAR24,BARSCOUNT(CLOSE*VAR24)),SUM(AMOUNT,BARSCOUNT(CLOSE*VAR24))/SUM(VOL*100,BARSCOUNT(CLOSE*VAR24)));
{股票指标网 整理}
VAR27:=CROSS(EMA(CLOSE/VAR26,120),1.02);
VAR28:=CROSS(EMA(CLOSE/VAR26,120),1.04);
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.0029),机构买*1.01,10),COLORWHITE;
DRAWICON(CROSS(EMA(CLOSE/VAR26,120),1.0029),机构买*0.95,9);
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.08),机构买*1.015,11),COLORYELLOW;
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.04),机构买*1.02,12),COLORYELLOW;
DRAWICON(CROSS(EMA(CLOSE/VAR26,120),1.04),机构买*1.015,9);
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:STRCAT(HYBLOCK,1)
VAR2赋值:STRCAT(VAR1,DYBLOCK)
VAR3赋值:STRCAT(VAR2,1)
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(VAR3,GNBLOCK)),画黄色
VAR4赋值:SUM(IF(收盘价>1日前的收盘价,成交量/当前流通股本*100,IF(收盘价<1日前的收盘价,(-成交量)/当前流通股本*100,0)),0)
VAR5赋值:成交量*收盘价/100
VAR6赋值:SUM(IF(VAR5/8>20 AND 收盘价>1日前的收盘价,VAR5,0),0)
VAR7赋值:SUM(IF(VAR5/8>20 AND 收盘价<1日前的收盘价,VAR5,0),0)
VAR8赋值:SUM(IF(VAR5/8<20 AND 收盘价>1日前的收盘价,VAR5,0),0)
VAR9赋值:SUM(IF(VAR5/8<20 AND 收盘价<1日前的收盘价,VAR5,0),0)
VAR10:=VAR6+VAR7+VAR8+VAR9
如果ISLASTBAR返回100*VAR6/VAR10否则返回0
如果ISLASTBAR返回100*VAR7/VAR10否则返回0
如果ISLASTBAR返回100*VAR8/VAR10否则返回0
如果ISLASTBAR返回100*VAR9/VAR10否则返回0
输出机构买:VAR6,画红色,LINETHICK6
输出机构卖:VAR7,画绿色,LINETHICK6
输出机构进出:机构买-机构卖,NODRAW
输出散户买:VAR8,COLOR5555FF
输出散户卖:VAR9,COLOR55FF55
输出强势:100*VAR6/VAR10>50
输出拉升:100*VAR6/VAR10-100*VAR7/VAR10>18 AND 100*VAR6/VAR10-100*VAR9/VAR10>18
当满足条件ISLASTBAR=1时,在机构买*0.95和2位置书写文字
当满足条件ISLASTBAR=1时,在机构卖*0.95和2位置书写文字
VAR15:=BETWEEN(收盘价/(SUM(成交额,收盘价的有效数据周期数)/SUM(成交量*100,收盘价的有效数据周期数)),1.05,0.95)
VAR16:=IF(VAR15=0,MA(收盘价,收盘价的有效数据周期数),SUM(成交额,收盘价的有效数据周期数)/SUM(成交量*100,收盘价的有效数据周期数))
DRAWICON(收盘价/VAR16上穿1.03,机构买*1.01,17)
VAR17:=1
VAR18:=STRCAT(STRCAT(3,CON2STR(100*VAR6/VAR10,0)),4)
VAR19:=STRCAT(STRCAT(5,CON2STR(100*VAR7/VAR10,0)),4)
VAR20:=STRCAT(STRCAT(6,CON2STR(100*(VAR6-VAR7)/VAR10,0)),4)
VAR21:=STRCAT(STRCAT(7,CON2STR(100*VAR8/VAR10,0)),4)
VAR22:=STRCAT(STRCAT(8,CON2STR(100*VAR9/VAR10,0)),4)
VAR23:=STRCAT(STRCAT(9,CON2STR(100*(VAR8-VAR9)/VAR10,0)),4)
当满足条件VAR17=1时,在横轴0.35纵轴0.25位置书写文字
当满足条件VAR17=1时,在横轴0.35纵轴0.45位置书写文字
如果DATE<=1590301返回1否则返回0
VAR25:=BETWEEN(收盘价*VAR24/(SUM(成交额,收盘价*VAR24的有效数据周期数)/SUM(成交量*100,收盘价*VAR24的有效数据周期数)),1.05,0.95)
VAR26:=IF(VAR25=0,MA(收盘价*VAR24,收盘价*VAR24的有效数据周期数),SUM(成交额,收盘价*VAR24的有效数据周期数)/SUM(成交量*100,收盘价*VAR24的有效数据周期数))
{股票指标网 整理}
VAR27:=CROSS(收盘价/VAR26的120日指数移动平均,1.02)
VAR28:=CROSS(收盘价/VAR26的120日指数移动平均,1.04)
DRAWTEXT(CROSS(收盘价/VAR26的120日指数移动平均,1.0029),机构买*1.01,10),画白色
DRAWICON(CROSS(收盘价/VAR26的120日指数移动平均,1.0029),机构买*0.95,9)
DRAWTEXT(CROSS(收盘价/VAR26的120日指数移动平均,1.08),机构买*1.015,11),画黄色
DRAWTEXT(CROSS(收盘价/VAR26的120日指数移动平均,1.04),机构买*1.02,12),画黄色
DRAWICON(CROSS(收盘价/VAR26的120日指数移动平均,1.04),机构买*1.015,9)