一、指标源码
{智胜先锋主图}
MA5:MA(CLOSE,5),LINETHICK2;
MA10:MA(CLOSE,10),LINETHICK2;
MA20:MA(CLOSE,20),LINETHICK2,COLOR00FF00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,2,0),COLORRED;
STICKLINE(ZDF<-9.8,O,C,2,0),COLORBLUE;
TOP1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
TOP2:=REF(TOP1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP3:=REF(TOP2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP4:=REF(TOP3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP5:=REF(TOP4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP6:=REF(TOP5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP7:=REF(TOP6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP8:=REF(TOP7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP9:=REF(TOP8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOPA:=REF(TOP9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOPB:=REF(TOPA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOPC:=REF(TOPB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(TOP1 OR TOP2 OR TOP3 OR TOP4 OR TOP5 OR TOP6 OR TOP7 OR
TOP8 OR TOP9 OR TOPA OR TOPB OR TOPC,CLOSE,O,3,0),COLORRED;
TOPD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
TOPE:=REF(TOPD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOPF:=REF(TOPE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP10:=REF(TOPF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP11:=REF(TOP10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP12:=REF(TOP11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP13:=REF(TOP12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP14:=REF(TOP13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP15:=REF(TOP14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP16:=REF(TOP15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP17:=REF(TOP16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP18:=REF(TOP17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(TOPD OR TOPE OR TOPF OR TOP10 OR TOP11 OR TOP12 OR TOP13 OR
TOP14 OR TOP15 OR TOP16 OR TOP17 OR
TOP18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
TOP19:=REF(TOPD OR TOPE OR TOPF OR TOP10 OR TOP11 OR TOP12 OR TOP13 OR
TOP14 OR TOP15 OR TOP16 OR TOP17 OR TOP18,1) AND TOP1;
STICKLINE(TOP19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORYELLOW;
TOP1A:=REF(TOP1 OR TOP2 OR TOP3 OR TOP4 OR TOP5 OR TOP6 OR TOP7 OR
TOP8 OR TOP9 OR TOPA OR TOPB OR TOPC,1) AND TOPD;
STICKLINE(TOP1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00FF00{98FD};
STICKLINE(TOP19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORRED;
STICKLINE(TOP1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;
IF(MA5>=REF(MA5,1) AND MA5>=MA10,MA5,DRAWNULL),COLORRED,LINETHICK3;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND
REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND
H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1)),COLORYELLOW;
STICKLINE(买,O,C,1,0),COLORRED;
DRAWTEXT(买,L*0.95, '★买'),COLORRED;
DRAWICON(买,L,5);
TOP3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND
IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(TOP3P>90,L,L*0.92,0.1,0),COLORFF00FF;
DRAWTEXT(TOP3P>90,LOW*0.92,'追涨'),COLORFF00FF;
DRAWICON(TOP3P>90,L,9);
{资金异动进场副图}
TOP1:=REF(LOW,1);
TOP2:=SMA(ABS(LOW-TOP1),3,1)/SMA(MAX(LOW-TOP1,0),3,1)*100;
TOP3:=EMA(IF(CLOSE*1.2,TOP2*10,TOP2/10),3);
TOP4:=LLV(LOW,38);
TOP5:=HHV(TOP3,38);
TOP6:=IF(LLV(LOW,90),1,0);
TOP7:=EMA(IF(LOW<=TOP4,(TOP3+TOP5*2)/2,0),3)/618*TOP6;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
VA1:=MACD>0;
VA2:=C>MA(C,60);
TOP8:=MA(CLOSE,5);
TOP9:=MA(CLOSE,10);
TOP10:=MA(CLOSE,30);
TOP11:=MA(CLOSE,60);
TOP12:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
TOP13:=INTPART(TOP12*100)/100;
TOP14:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
TOP15:=INTPART(TOP14*100)/100;
TOP16:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
TOP17:=INTPART(TOP16*100)/100;
TOP18:=EMA(CLOSE,5)-EMA(CLOSE,10);
TOP19:=EMA(TOP18,9);
TOP20:=0-100*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100;
TOP21:=0-100*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
TOP22:=0-100*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100;
TOP23:=0-100*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100;
TOP24:=REF(TOP19,1);
TOP25:=TOP19;
TOP26:=TOP25-TOP24;
TOP27:=REF(TOP18,1);
TOP28:=TOP18;
TOP29:=TOP28-TOP27;
TOP30:=OPEN;
TOP31:=CLOSE;
资金异动:IF(VA1 AND VA2 AND TOP30<=TOP8 AND TOP30<=TOP9 AND TOP30<=TOP10 AND TOP31>=TOP8 AND TOP31>=TOP17 AND TOP26>0 AND TOP29>0,(10),0) COLORRED LINETHICK2;
STICKLINE(资金异动,6,0,1,1),COLORLIRED ;
STICKLINE(资金异动,4,0,2,0),COLORYELLOW;
STICKLINE(资金异动,2,0,3,0),COLORMAGENTA;
{钱袋子信号选股}
TOP1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
TOP2:=REF(TOP1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP3:=REF(TOP2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP4:=REF(TOP3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP5:=REF(TOP4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
TOP6:=REF(TOP5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
TOP3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND
IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
QXS:=NOT(CODELIKE('4'));
QKC:=NOT(CODELIKE('688'));
QST:=IF(NAMELIKE('S'),0,1);
QXX:=IF(NAMELIKE('*'),0,1);
QBJ:=NOT(CODELIKE('8'));
TOPD:=QXS AND QST AND QKC AND QXX AND QBJ;
钱袋子:TOP3P>90 AND TOPD;
{笑脸信号选股}
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND
REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND
H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1));
QXS:=NOT(CODELIKE('4'));
QKC:=NOT(CODELIKE('688'));
QST:=IF(NAMELIKE('S'),0,1);
QXX:=IF(NAMELIKE('*'),0,1);
QBJ:=NOT(CODELIKE('8'));
AXD:=QXS AND QST AND QKC AND QXX AND QBJ;
笑脸:买 AND AXD;
{资金异动进场选股}
TOP1:=REF(LOW,1);
TOP2:=SMA(ABS(LOW-TOP1),3,1)/SMA(MAX(LOW-TOP1,0),3,1)*100;
TOP3:=EMA(IF(CLOSE*1.2,TOP2*10,TOP2/10),3);
TOP4:=LLV(LOW,38);
TOP5:=HHV(TOP3,38);
TOP6:=IF(LLV(LOW,90),1,0);
TOP7:=EMA(IF(LOW<=TOP4,(TOP3+TOP5*2)/2,0),3)/618*TOP6;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
VA1:=MACD>0;
VA2:=C>MA(C,60);
TOP8:=MA(CLOSE,5);
TOP9:=MA(CLOSE,10);
TOP10:=MA(CLOSE,30);
TOP11:=MA(CLOSE,60);
TOP12:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
TOP13:=INTPART(TOP12*100)/100;
TOP14:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
TOP15:=INTPART(TOP14*100)/100;
TOP16:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
TOP17:=INTPART(TOP16*100)/100;
TOP18:=EMA(CLOSE,5)-EMA(CLOSE,10);
TOP19:=EMA(TOP18,9);
TOP20:=0-100*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100;
TOP21:=0-100*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
TOP22:=0-100*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100;
TOP23:=0-100*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100;
TOP24:=REF(TOP19,1);
TOP25:=TOP19;
TOP26:=TOP25-TOP24;
TOP27:=REF(TOP18,1);
TOP28:=TOP18;
TOP29:=TOP28-TOP27;
TOP30:=OPEN;
TOP31:=CLOSE;
资金异动:IF(VA1 AND VA2 AND TOP30<=TOP8 AND TOP30<=TOP9 AND TOP30<=TOP10 AND TOP31>=TOP8 AND TOP31>=TOP17 AND TOP26>0 AND TOP29>0,(10),0);
二、指标介绍
1、指标概述
核心构成与目标:通达信【智胜先锋】是一款功能强大的主/副/选指标套装,其源码融合移动平均线、价格变动百分比、特定 K 线形态识别以及复杂价格行为模式分析。核心目标是通过多维度监控市场动态,为投资者提供精确的买卖信号与可靠的趋势判断依据,助力投资者在复杂的金融市场中做出明智决策。
信号呈现与功能定位:该指标以直观的方式在主图展示各类信号,包括 “笑脸” 买入信号、“钱袋子” 追涨信号以及通过蓝色 K 线间接呈现的卖出信号,同时具备选股功能,能从众多股票中筛选出符合特定条件的投资标的,在投资分析与决策流程中扮演关键角色。
2、设计逻辑
趋势监控逻辑:移动平均线反映市场平均成本与趋势方向,价格变动百分比突出短期价格波动。二者结合,使投资者能从长期和短期视角洞察市场趋势,如移动平均线多头排列且价格变动百分比为正且增大,预示上升趋势;反之则为下降趋势。
买卖信号识别逻辑:通过对特定 K 线形态(如十字星、锤子线等蕴含多空力量转变信息的形态)和价格行为模式(关注价格波动节奏、成交量配合等)的综合分析,精准识别买卖信号。当满足特定条件,如多空力量达到特定平衡或转变状态时,发出相应买卖信号。
信号触发逻辑:满足特定条件时发出 “笑脸” 买入信号,预示市场可能进入上涨阶段;市场急剧上涨且收盘价接近当日最高价时,发出 “钱袋子” 追涨信号,表明市场动能强劲。通过对 ZDF 值(价格变动幅度)判断,当 ZDF 值小于 - 9.8% 时,以蓝色 K 线展示大幅下跌,间接提示卖出机会。
3、使用方法
趋势判断:密切关注移动平均线排列与价格变动百分比数值。移动平均线多头排列且价格变动百分比为正且上升,积极关注市场上升趋势;反之则警惕下降趋势。
买入操作:主图出现红色竖线、“买” 字提示及笑脸图标,即 “笑脸” 买入信号触发,结合其他技术指标(如 MACD 金叉、KDJ 超卖区拐头向上)和基本面分析(公司业绩良好、行业前景乐观),确认买入时机。
追涨操作:看到紫色竖线、“追涨” 字提示及钱袋子图标,即 “钱袋子” 追涨信号出现,评估市场动能持续性与自身风险承受能力,谨慎追涨,设好止损位。
卖出判断:图表出现蓝色 K 线且 ZDF 值小于 - 9.8%,结合成交量放大(表明恐慌抛售)、技术指标走弱(如 MACD 死叉、KDJ 超买区拐头向下),综合判断是否卖出。
选股操作:利用选股功能,设置 “笑脸” 买入信号或 “钱袋子” 追涨信号等条件,筛选潜在投资标的,再结合其他分析进一步筛选。
4、优势分析
多维度分析:融合多种分析维度,全面考量市场趋势、价格变动、K 线形态和价格行为模式,提供丰富、准确市场信息,避免单一指标分析的片面性。
信号明确直观:具有清晰直观的买卖信号提示,“笑脸” 买入、“钱袋子” 追涨及蓝色 K 线间接提示卖出,便于投资者快速理解和做出决策。
辅助决策有力:能为投资者提供明确趋势判断依据,辅助制定投资策略,尤其对缺乏经验投资者有引导作用。
可拓展性强:可与资金异动进场副图等其他指标配合,加强共振选股,提升选股准确性与投资成功率。
5、可提升空间
优化算法:运用机器学习、深度学习算法,对海量历史数据深度挖掘,优化信号识别算法,提高对虚假信号过滤能力,减少误判。
增强市场适应性:针对不同市场(A 股、港股、美股等)和交易品种(股票、期货、外汇等)特性,开发自适应功能,使指标能在不同市场环境有效应用。
深化指标融合:与更多技术指标(如 BOLL、RSI 等)深度融合,结合基本面分析、宏观经济分析,形成更全面、强大分析体系。
6、总结
通达信【智胜先锋】指标凭借独特设计和多维度分析能力,为投资者提供了极具价值的市场分析工具。明确的信号提示和趋势判断功能有助于投资者把握投资机会。但面对复杂多变市场,需不断优化完善。投资者使用时,应充分认识其优势与不足,结合其他分析方法和个人经验,合理运用,做好风险管理,实现更稳健投资收益
三、指标图示