短线线箱快速操作赢利主图-精品通达信指标公式源码分享

image.png

文/指点迷金

2025年3月12日,沪指在3300点附近反复震荡,科技板块集体回调,散户们哀鸿遍野。但就在这一天,我的账户逆势飘红——杭钢股份(600126)突破箱体后强势封板,3天内收益率超25%!而这一切,都源于一套被散户称为“箱体雷达”的通达信主图指标。

今天,我将毫无保留地分享这套指标的底层逻辑、实战用法,以及近期AI算力龙头股的经典案例。文末附完整源码,建议收藏!


📖 指标原理:用“箱体思维”破解主力行为

这套指标的核心逻辑在于“三点共振”:

1️⃣ 箱体定位:通过计算近30日最高价(A18)、最低价(B1)及中轨(DY),动态绘制股价运行的“压力-支撑-中轴”区间,锁定主力成本带。

2️⃣ 量价突破:结合EMA均线系统(A1-A9)与MACD动能柱,识别缩量调整后的放量突破信号。

3️⃣ 多周期共振:引入周线(AAQ-BB)与月线(MC-MO)趋势线,避免单一周期误判。

举个栗子🌰

3月初,**青木科技(300204)**因“人形机器人”概念爆火,但多数散户被洗出局。而指标在3月8日发出信号:周线站稳中轨(腰线),日线MACD金叉,且月线突破箱体上沿(顶线)。随后3天,股价涨幅超40%!


📊 实战技巧:3步抓住主升浪

1️⃣ 信号过滤

  • 买点:当“赢”线(紫色)上穿“损”线(绿色),且日K线突破顶线(CYAN虚线)时,视为主力启动信号。

  • 卖点:若“逃顶”提示(↓逃)出现,或股价跌破中轨(腰线)并伴随成交量萎缩,果断离场。

2️⃣ 热点叠加

近期市场主线集中在AI算力、机器人、低空经济。例如,力王股份(300883)在3月10日突破箱体时,指标同步发出“★马”信号(黑马启动标志),叠加“具身智能”政策利好,次日直接20cm涨停!

3️⃣ 仓位管理

  • 首次突破顶线:轻仓试水(30%);

  • 回踩中轨不破:加仓至50%;

  • 周线放量确认:满仓持有。


🛠 指标源码(文末附导入教程)

AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);

BA:=EMA(AB,5);

A18:=REFDATE(REF(HHV(H,96),5),DATE);{高}

B1:=REFDATE(REF(LLV(L,96),5),DATE);{低}

DY:=((A18)+(B1))/2;{中} 

顶:IF(AB>0 AND AB-BA<=0,A18,A18),DOTLINE,COLORCYAN;

腰:IF(AB>0 AND AB-BA<=0,DY,DY),DOTLINE,COLORCYAN;

底:IF(AB>0 AND AB-BA<=0,B1,B1),DOTLINE,COLORCYAN;

MC:=C#MONTH,NODRAW;

 MO1:=IF(DAY<REF(DAY,1),O,DRAWNULL);

 MO:=HHV(MO1,DAY),NODRAW;

 STICKLINE(MC>=MO,MO,MC,4,-1)COLOR00009C;

 STICKLINE(MC<MO,MO,MC,4,-1),COLOR4F2F4F;

 AQ:=O#WEEK;B:=C#WEEK;

 AAQ:=H#WEEK;BB:=L#WEEK;

 STICKLINE(B>=AQ,AAQ,BB,4,0),COLOR00006B;

 STICKLINE(B<AQ,AAQ,BB,4,0),COLOR663300;

 P:=9;

 WH1:=IF(L=LLV(L,P),L,DRAWNULL);

 WH2:=CONST(BARSLAST(WH1!=DRAWNULL));

 WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));

 WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);

 WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));

 WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);

 赢:IF(CURRBARSCOUNT<=WH2+10,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORMAGENTA,LINETHICK2;

 DRAWTEXT(ISLASTBAR,赢,'    YW'),COLORMAGENTA;

 H1:=IF(H=HHV(H,P),H,DRAWNULL);

 H2:=CONST(BARSLAST(H1!=DRAWNULL));

 H3:=CONST(IF(H2=0,L,REF(L,H2)));

 H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1);

 H5:=CONST(IF(H4=0,L,REF(L,H4)));

 H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1);

 损:IF(CURRBARSCOUNT<=H2+10,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL),COLORGREEN,LINETHICK2;

 DRAWTEXT(ISLASTBAR,损,'    SW'),COLORGREEN;

 {九线}

 VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;

 A1:(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4,COLOR0044BB;

 A2:EMA(A1,2),COLOR3355BB;

 A3:EMA(A2,2),COLOR4455BB;

 A4:EMA(A3,2),COLOR5555BB;

 A5:EMA(A4,2),COLOR6655BB;

 A6:EMA(A5,2),COLOR7755BB;

 A7:EMA(A6,2),COLOR8855BB;

 DRAWKLINE(H,O,L,C);

 STICKLINE(C>=O,C,O,3,0),COLOR1F1AC5;

 STICKLINE(C>=O,C,O,1.3,0),COLOR1F1AD5;

 STICKLINE(C>=O,C,O,0,0),COLOR1F1AF5;

 STICKLINE(C<O,C,O,3,0),COLORBBBB00;

 STICKLINE(C<O,C,O,1.3,0),COLORDDDD00;

 STICKLINE(C<O,H,L,0,0),COLORFFFF00;

 A8:EMA(VAR1,2.78)*1.028,COLORWHITE,LINETHICK1;

 A9:MA(OPEN,3.2)*1.028,COLORYELLOW,LINETHICK1;

 {涨停显示}

 C6:=REF(C,1);

涨停:=IF((C-C6)*100/C6>=(10-0.01*100/C6),1,0);

STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;

STICKLINE(涨停,H,L,0,0),COLORLIRED;

 {高位}

 VAR2:=(REF(HIGH,1)+REF(LOW,1))/2;

 VAR3:=MA(CLOSE,20)+2*STD(CLOSE,20);

 DRAWTEXT(CROSS(VAR2,VAR3),HIGH*1.045,'↓高'),COLORCYAN;

 {逃顶}

 VAR7:=REF(C,1);

 VAR8:=SMA(MAX(C-VAR7,0),6,1)/SMA(ABS(C-VAR7),6,1)*100;

 DRAWTEXT(CROSS(82,VAR8),H*1.025,'↓逃'),COLORCYAN;

 {KDJ金叉}

 VAR4:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));

 VAR5:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));

 VAR6:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));

 DRAWICON(CROSS(VAR5,MA(VAR6,6)),(LOW - (LOW*0.015)),38);

 DRAWICON(CROSS(MA(VAR6,6),VAR4),(HIGH+(HIGH*0.015)),39);

 STICKLINE(CROSS("KDJ.K"(3,5,3),"KDJ.D"(3,5,3)),O,C,0.6,0),COLORYELLOW;

 STICKLINE(CROSS("KDJ.D"(3,5,3),"KDJ.K"(3,5,3)),O,C,0.6,0),COLORBLUE;

 {黑马}

 VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);

 VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);

 DRAWTEXT(FILTER((VAR4AA>90),45),(LOW)*(0.95),'★马'),COLORMAGENTA;

 DRAWTEXT(FILTER((VAR4AA>90),35),(LOW)*(0.97),'★加'),COLORMAGENTA;

 {主力进场}

 VAR9:=((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100);

 VAR10:=SMA(VAR9,3,1);

 VAR11:=SMA(VAR10,3,1);

 VAR12:=SMA(VAR11,3,1);

 主力出现:DRAWICON(CROSS(VAR11,VAR12) AND (VAR11<40),L*0.98,23);

 {突破追涨}

 A10:=HHV(H,73);

 A11:=LLV(L,73);

 M1:=MA(C,13);

 M2:=MA(C,36);

 M3:=MA(C,73);

 K1:=(0.618*A10+0.382*A11),COLORGREEN;

 K2:=(0.5*A10+0.5*A11),COLORGREEN;

 K3:=(0.382*A10+0.618*A11),COLORGREEN;

 K4:=(0.191*A10+0.809*A11),COLORRED;

 K5:=(0.809*A10+0.191*A11),COLORRED;

 牛:=V=HHV(V,64) AND V>REF(V,1)*1.5;

 单阳:=C AND 牛;

 单阳收:=C;

 单阳开:=O;

 高不破价:=REF(C,BARSLAST(单阳));

 前高:=HHV(高不破价,13);

 STICKLINE(前高,高不破价,高不破价,5,0)DOTLINE,COLORBLUE;

 突破:=CROSS(C,前高) AND C>MA(C,36) AND (C-O)/O>0.030  AND MA(C,13)>REF(MA(C,13),1) AND C>K5;

 DRAWTEXT(CROSS(C,前高) AND C>MA(C,36) AND (C-O)/O>0.035  AND MA(C,13)>REF(MA(C,13),1) AND MA(C,36)>REF(MA(C,36),1) ,L*1.00,'☆突') ,COLORMAGENTA;

 DRAWTEXT(单阳 >REF(单阳,1) AND (C-O)/O>0.0455,L*1.00,'★追') ,COLORMAGENTA;

 所属地域:DRAWTEXT_FIX(ISLASTBAR ,0.05,0.01,1,DYBLOCK),COLORYELLOW;

 所属行业:DRAWTEXT_FIX(ISLASTBAR ,0.06,0.01,0,HYBLOCK),COLORYELLOW;

 DRAWTEXT_FIX(CURRBARSCOUNT=60,0.002,1,0,'====【牛金追涨杀跌】===='),COLORYELLOW;

低:IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L*0.98,DRAWNULL),DRAWNULL),COLORRED,CIRCLEDOT,LINETHICK6;

高:IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H*1.012,DRAWNULL),DRAWNULL),COLORGREEN,CIRCLEDOT,LINETHICK6;

导入方法

  1. 打开通达信APP→任意个股K线界面→点击“我的指标”→粘贴源码→测试保存;

  2. 重点关注:紫色“赢”线(压力位)、绿色“损”线(支撑位)、黄色“突破”信号。


⚠️ 风险提示

  1. 技术面局限:指标在单边下跌行情中可能失效(如3月5日新能源板块破位);

  2. 量能验证:突破需伴随成交量放大(至少前5日均量1.5倍);

  3. 政策黑天鹅:如遇突发利空(如3月10日欧盟对华AI芯片限制),需手动止损。


(风险提示:以上内容仅为个人经验分享,不构成投资建议。股市有风险,入市需谨慎。)

相关阅读

服务热线

18020657357

微信客服

微信客服