通达信大资金介入主图指标
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA60:MA(CLOSE,60);
成本价:=MCST,COLORLICYAN;{市场成本,无未来}
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);{主体K线,无未来}
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
{STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8
OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
{STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14
OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),1.0,0),COLORFFCC66;}
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13
OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
黄柱体选股:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,0),COLORYELLOW;
趋势线:=MA((CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100 ,2);{抄大底,无未来}
抄大底十字选股:DRAWICON((FILTER(趋势线<-20,5)),L-0.6,23);
支撑线:=TROUGH(CLOSE,10,1)*1.02,LINETHICK2;
VAR24:=IF(TROUGHBARS{波谷位置,未来函数}(3,16,1)=0 AND HIGH>L+0.04,10,0);
VAR25:=ZIG{未来函数}(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR26:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR27:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR28:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR29:=CLOSE/MA(CLOSE,40)*100<78;
VAR30:=CLOSE/MA(CLOSE,60)*100<74;
VAR31:=HIGH>LOW*1.051;
VAR32:=VAR28 AND COUNT(VAR31,5)>1;
VAR33:=(C=L AND H=L);
VAR34:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
单枪出击选股:{无未来}DRAWICON((VAR32 AND (VAR29 OR VAR30) AND NOT(VAR33) AND L<支撑线),L-0.4,27)COLORLIMAGENTA;
组合买1选股:{有未来}DRAWICON((VAR24 AND L<支撑线),L-0.2,26)COLORYELLOW;
组合买2选股:{有未来}DRAWICON(((VAR25+VAR26+VAR27+VAR28) AND L<支撑线),L-0.3,25)COLORRED;
DRAWTEXT(VAR26,L-0.4,'★')COLORRED;
VAR35:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);{大资金活动有未来}
大资金买进A选:{有未来}DRAWTEXT(VAR35 AND COUNT(VAR35,30)=1,LOW*0.98,'⊙大资金买进A'),LINETHICK1,COLORFF00FF;
VAR36:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR37:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
AABB:=IF(CROSS(VAR36,MA(VAR37,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;
大资金买进B选:{无未来+有未来}DRAWTEXT((CROSS(VAR36,MA(VAR37,5)) AND (VAR35 AND COUNT(VAR35,30)=1)),L*0.96,'⊙大资金活动B');
WZ:=CURRBARSCOUNT;{主图画面文字}
{DRAWTEXT(WZ=1,HHV(C,50)*0.99,' ★红钻=组合买2 有')COLORRED;
DRAWTEXT(WZ=1,HHV(C,50)*0.97,' 黄钻=组合买1 有')COLORYELLOW;
DRAWTEXT(WZ=1,HHV(C,50)*0.95,' 绿钻=单枪出击 无')COLORGREEN;
DRAWTEXT(WZ=1,HHV(C,50)*0.93,' 十字=抄大底 无'),COLORWHITE;}
{注1:上面的“有”于“无”代表有未来函数和无未来函数};
{注2:本指标包含了11项选股功能};
VAR001:=REF(H,5)=HHV(H,2*5+1);
VAR002:=BACKSET(VAR001,5+1);
VAR003:=FILTER(VAR002,5) AND H=HHV(H,5+1);
VAR004:=IF(VAR003,CURRBARSCOUNT,0);
VAR005:=BARSLAST(VAR003);
VAR006:=IF(VAR005,REF(VAR004,VAR005),VAR004);
VAR007:=BACKSET(ISLASTBAR,VAR006);
VAR008:=CONST(REF(H,VAR006-1));
VAR009:=REF(VAR006,VAR005+1);
VAR0010:=BACKSET(ISLASTBAR,VAR009);
VAR0011:=CONST(REF(H,VAR009-1));
VAR0012:=FILTER((VAR003 AND VAR0010),50);
VAR0001:=REF(L,5)=LLV(L,2*5+1);
VAR0002:=BACKSET(VAR0001,5+1);
VAR0003:=FILTER(VAR0002,5) AND L=LLV(L,5+1);
VAR0004:=IF(VAR0003,CURRBARSCOUNT,0);
VAR0005:=BARSLAST(VAR0003);
VAR0006:=IF(VAR0005,REF(VAR0004,VAR0005),VAR0004);
VAR0007:=CONST(VAR0006);
VAR0008:=BACKSET(ISLASTBAR,VAR0007);
VAR0009:=CONST(REF(L,VAR0007-1));
VAR00010:=VAR0003*L*VAR0008;
VAR00011:=REF(VAR0006,VAR0005+1);
VAR00012:=BACKSET(ISLASTBAR,VAR00011);
VAR00013:=CONST(REF(L,VAR00011-1));
STICKLINE(VAR00012,VAR00013,VAR00013,0.5,1),COLORCYAN,LINETHICK3;
{STICKLINE(VAR010,L,L/1.02,3.5,0),COLORYELLOW,LINETHICK3;}
STICKLINE(VAR0008,VAR0009,VAR0009,0.5,0),COLORYELLOW,LINETHICK3;
参考线一:DRAWLINE(VAR003,H,CROSS(C,VAR008) AND VAR007,VAR008,0)COLORYELLOW;
参考线二:=DRAWLINE(VAR0012,H,CROSS(C,VAR0011),VAR0011,0)COLORLIBLUE;
{选股一:DRAWICON(SUM(单枪,2),参考线一*1.1,25);
选股二:DRAWICON(SUM(匹马,2),参考线二*1.1,26);};
QQ:=C/REF(C,1)>=1.05;
DRAWTEXT(QQ,L*1.03,'5%')COLORYELLOW;
AH:=((REF(H,1)+REF(L,1)+REF(C,1)*2)/4)+(REF(H,1)-REF(L,1));
STICKLINE(C>AH,AH,AH,3,0)COLORYELLOW;
VAR000011:=REF(CLOSE,1);
VAR000012:=SMA(MAX(CLOSE-VAR000011,0),7,1)/SMA(ABS(CLOSE-VAR000011),7,1)*100,COLORYELLOW;
底进:=(FILTER(REF(VAR000012,1)<20 AND VAR000012>REF(VAR000012,1),5)),COLORRED;
高出:=(FILTER(REF(VAR000012,1)>80 AND VAR000012<REF(VAR000012,1),5)),COLORFFFF50;
DRAWICON(FILTER(REF(VAR000012,1)<20 AND VAR000012>REF(VAR000012,1),5),L-0.5,13 );
DRAWICON(FILTER(REF(VAR000012,1)>80 AND VAR000012<REF(VAR000012,1),5),H+0.3,2);
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:BACKSET
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出MA10:收盘价的10日简单移动平均
输出MA20:收盘价的20日简单移动平均
MA30赋值:收盘价的30日简单移动平均
输出MA60:收盘价的60日简单移动平均
成本价赋值:MCST,COLORLICYAN
{市场成本,无未来}
VAR1赋值:收盘价>1日前的收盘价 AND 收盘价>2日前的收盘价
{主体K线,无未来}
VAR2赋值:1日前的VAR1 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR3赋值:1日前的VAR2 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR4赋值:1日前的VAR3 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR5赋值:1日前的VAR4 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR6赋值:1日前的VAR5 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR7赋值:1日前的VAR6 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR8赋值:1日前的VAR7 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR9赋值:1日前的VAR8 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VARA赋值:1日前的VAR9 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VARB赋值:1日前的VARA AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VARC赋值:1日前的VARB AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
{STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8
OR VAR9 OR VARA OR VARB OR VARC,收盘价,1日前的收盘价,3,1),画红色
{红1}
VARD赋值:收盘价<1日前的收盘价 AND 收盘价<2日前的收盘价
VARE赋值:1日前的VARD AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VARF赋值:1日前的VARE AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR10赋值:1日前的VARF AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR11赋值:1日前的VAR10 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR12赋值:1日前的VAR11 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR13赋值:1日前的VAR12 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR14赋值:1日前的VAR13 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR15赋值:1日前的VAR14 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR16赋值:1日前的VAR15 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR17赋值:1日前的VAR16 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR18赋值:1日前的VAR17 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
{STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14
OR VAR15 OR VAR16 OR VAR17 OR VAR18,收盘价,1日前的收盘价,1.0,0),COLORFFCC66
}
VAR19赋值:1日前的VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13
OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18 AND VAR1
输出黄柱体选股:STICKLINE(VAR19,1日前的收盘价,2日前的收盘价,4,0),画黄色
趋势线赋值:MA((收盘价-MA(收盘价,40))/MA(收盘价,40)*100 ,2)
输出{抄大底,无未来}
抄大底十字选股:DRAWICON((趋势线<-20的5过滤),L-0.6,23)
支撑线赋值:TROUGH(收盘价,10,1)*1.02, 线宽为2
VAR24赋值:IF(TROUGHBARS{波谷位置,未来函数}(3,16,1)=0 AND 最高价>L+0.04,10,0)
VAR25赋值:ZIG{未来函数}(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
VAR26赋值:ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3)
VAR27赋值:ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3)
VAR28赋值:ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3)
VAR29赋值:收盘价/收盘价的40日简单移动平均*100<78
VAR30:=收盘价/收盘价的60日简单移动平均*100<74
VAR31:=最高价>最低价*1.051
VAR32:=VAR28 AND 统计5日满足VAR31的天数>1
VAR33:=(C=L AND H=L)
VAR34:=ZIG(3,72)[=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3)]
输出单枪出击选股:{无未来}DRAWICON((VAR32 AND (VAR29 OR VAR30) AND NOT(VAR33) AND L<支撑线),L-0.4,27)COLORLIMAGENTA
输出组合买1选股:{有未来}DRAWICON((VAR24 AND L<支撑线),L-0.2,26)画黄色
输出组合买2选股:{有未来}DRAWICON(((VAR25+VAR26+VAR27+VAR28) AND L<支撑线),L-0.3,25)画红色
当满足条件VAR26时,在L-0.4和'★'位置书写文字
VAR35:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
输出{大资金活动有未来}
大资金买进A选:{有未来}DRAWTEXT(VAR35 AND 统计30日满足VAR35的天数=1,最低价*0.98,'⊙大资金买进A'),LINETHICK1,COLORFF00FF
VAR36:=(100 - ((90 * (20日内最高价最高值 - 收盘价)) / (20日内最高价最高值 - 20日内最低价最低值)))
VAR37:=(100 - MA(((100 * (5日内最高价最高值 - 收盘价)) / (5日内最高价最高值 - 5日内最低价最低值)),34))
AABB赋值:IF(CROSS(VAR36,VAR37的5日简单移动平均),最低价 * 0.98,DRAWNULL),CROSSDOT, 线宽为3,COLOREE00EE
输出大资金买进B选:{无未来+有未来}DRAWTEXT((CROSS(VAR36,VAR37的5日简单移动平均) AND (VAR35 AND 统计30日满足VAR35的天数=1)),L*0.96,'⊙大资金活动B')
WZ赋值: 到最后交易的周期
{主图画面文字}
{DRAWTEXT(WZ=1,50日内C最高值*0.99,' ★红钻=组合买2 有')画红色
DRAWTEXT(WZ=1,50日内C最高值*0.97,' 黄钻=组合买1 有')画黄色
DRAWTEXT(WZ=1,50日内C最高值*0.95,' 绿钻=单枪出击 无')画绿色
DRAWTEXT(WZ=1,50日内C最高值*0.93,' 十字=抄大底 无'),画白色
输出}
{注1:上面的“有”于“无”代表有未来函数和无未来函数}
输出{注2:本指标包含了11项选股功能}
VAR001赋值:5日前的H=2*5+1日内H最高值
VAR002赋值:BACKSET(VAR001,5+1)
VAR003赋值:VAR002的5过滤 AND H=5+1日内H最高值
如果VAR003返回 到最后交易的周期否则返回0
VAR005赋值:上次VAR003距今天数
VAR006赋值:IF(VAR005,VAR005日前的VAR004,VAR004)
VAR007赋值:BACKSET(ISLASTBAR,VAR006)
VAR008赋值:CONST(VAR006-1日前的H)
VAR009赋值:VAR005+1日前的VAR006
VAR0010:=BACKSET(ISLASTBAR,VAR009)
VAR0011:=CONST(VAR009-1日前的H)
VAR0012:=FILTER((VAR003 AND VAR0010),50)
VAR0001赋值:5日前的L=2*5+1日内L最低值
VAR0002赋值:BACKSET(VAR0001,5+1)
VAR0003赋值:VAR0002的5过滤 AND L=5+1日内L最低值
如果VAR0003返回 到最后交易的周期否则返回0
VAR0005赋值:上次VAR0003距今天数
VAR0006赋值:IF(VAR0005,VAR0005日前的VAR0004,VAR0004)
VAR0007赋值:CONST(VAR0006)
VAR0008赋值:BACKSET(ISLASTBAR,VAR0007)
VAR0009赋值:CONST(VAR0007-1日前的L)
VAR00010:=VAR0003*L*VAR0008
VAR00011:=VAR0005+1日前的VAR0006
VAR00012:=BACKSET(ISLASTBAR,VAR00011)
VAR00013:=CONST(VAR00011-1日前的L)
当满足条件VAR00012时,在VAR00013和VAR00013之间画柱状线
当满足条件VAR010时,在L和L/1.02之间画柱状线
当满足条件VAR0008时,在VAR0009和VAR0009之间画柱状线
输出参考线一:DRAWLINE(VAR003,H,C上穿VAR008 AND VAR007,VAR008,0)画黄色
参考线二赋值:DRAWLINE(VAR0012,H,C上穿VAR0011,VAR0011,0)COLORLIBLUE
输出{选股一:DRAWICON(2的单枪日累和,参考线一*1.1,25)
输出选股二:DRAWICON(2的匹马日累和,参考线二*1.1,26)
}
QQ赋值:C/1日前的C>=1.05
当满足条件QQ时,在L*1.03和'5%'位置书写文字
AH赋值:((1日前的H+1日前的L+1日前的C*2)/4)+(1日前的H-1日前的L)
当满足条件C>AH时,在AH和AH之间画柱状线
VAR000011赋值:1日前的收盘价
VAR000012赋值:SMA(收盘价-VAR000011和0较大值,7,1)/SMA(收盘价-VAR000011的绝对值,7,1)*100,画黄色
底进赋值:(FILTER(1日前的VAR000012<20 AND VAR000012>1日前的VAR000012,5)),画红色
高出赋值:(FILTER(1日前的VAR000012>80 AND VAR000012<1日前的VAR000012,5)),COLORFFFF50
DRAWICON(FILTER(1日前的VAR000012<20 AND VAR000012>1日前的VAR000012,5),L-0.5,13 )
DRAWICON(FILTER(1日前的VAR000012>80 AND VAR000012<1日前的VAR000012,5),H+0.3,2)