通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信看清主力资金指标公式

  

LCM:=EMA(WINNER(CLOSE)*70,3);  

SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);  

ZSHTL:=SHCM/(ZLCM+SHCM)*100;  

ZZLKP:=ZLCM/(ZLCM+SHCM)*100;  

ZCMZL:=MA(ZLCM+SHCM,13);  

ZZNTS:=BARSLAST(ZSHTL<90ANDREF(ZSHTL,1)>90);  

ZSHJJ:=EMA(ZSHTL,89);  

ZZLJJ:=EMA(ZZLKP,89);  

ZJLRQD:=INTPART(ZZLKP-ZZLJJ);  

SH8:=EMA(ZSHTL,8);  

DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);  

STICKLINE(REF(ZSHTL,1)>90ANDZSHTL<90,ZSHTL,0,4,0),COLOR9966FF;  

STICKLINE(C>0,ZSHTL,ZZLKP,0,0),COLOREEEEEE;  

STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),COLORAAAAAA;  

STICKLINE(C>0,ZZLKP,0,3,0),COLORBLUE;  

STICKLINE(ZZLKP>75,ZZLKP,0,3,0),COLORFFFFFF;  

STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,3,0),COLORRED;  

STICKLINE(ZSHTL>=90,ZZLKP,0,3,0),COLORYELLOW;  

散户套牢系数:INTPART(ZSHTL),NODRAW;  

主力控盘系数:INTPART(ZZLKP),COLORCYAN,NODRAW;  

资金流入强度:ZJLRQD,NODRAW;  

RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;  

K1:=SMA(RSV,10,1);  

D1:=SMA(K1,5,1);  

KK:=INTPART(K1);  

DD:=INTPART(D1);  

TFXXS:=KK+DD;  

TGLD:=MOD(TFXXS,10);  

TGLXS:=(TFXXS-REF(TFXXS,1))*10;  

TYCFX:=TFXXS+TGLXS;  

乖离系数:TGLXS,NODRAW,COLORGREEN;  

STICKLINE(TGLXS>0,150,150+TGLXS,3,0),COLOR000088;  

STICKLINE(TGLXS>0,150,150+TGLXS,2.5,0),COLOR000099;  

STICKLINE(TGLXS>0,150,150+TGLXS,2,0),COLOR0000AA;  

STICKLINE(TGLXS>0,150,150+TGLXS,1.5,0),COLOR0000BB;  

STICKLINE(TGLXS>0,150,150+TGLXS,1.0,0),COLOR0000DD;  

STICKLINE(TGLXS>0,150,150+TGLXS,0.5,0),COLOR0000FF;  

STICKLINE(TGLXS<0,150,150+TGLXS,3,0),COLOR008800;  

STICKLINE(TGLXS<0,150,150+TGLXS,2.5,0),COLOR00AA00;  

STICKLINE(TGLXS<0,150,150+TGLXS,2,0),COLOR00BB00;  

STICKLINE(TGLXS<0,150,150+TGLXS,1.5,0),COLOR00DD00;  

STICKLINE(TGLXS<0,150,150+TGLXS,1,0),COLOR00FF00;  

STICKLINE(TGLXS=0ANDREF(TGLXS,1)>=0,150,150+TGLXS,8,0),COLORRED;  

STICKLINE(TGLXS=0ANDREF(TGLXS,1)<0,150,150+TGLXS,8,0),COLORGREEN;  

风险系数:TFXXS,LINETHICK2,COLORYELLOW;  

预测风险:TYCFX,LINETHICK1,COLORCYAN;  

市场筹码总量:ZCMZL,COLORGREEN,LINETHICK1;  

上市:FINANCE(42)/10000,NODRAW,COLORYELLOW;  

STICKLINE(TGLXS>0AND100+TGLXS<TYCFXAND100+REF(TGLXS,1)>=REF(TYCFX,1),0,(100+ABS(TGLXS)),0,0),COLORYELLOW;  

STICKLINE(TGLXS<0AND100+TGLXS>=TYCFXAND100+REF(TGLXS,1)<REF(TYCFX,1),0,(100+ABS(TGLXS)),0,0),COLORYELLOW;  

T1:=CONST(ZCMZL>REF(ZCMZL,1)ANDDKB=1);  

T2:=CONST(ZCMZL>REF(ZCMZL,1)ANDDKB=0);  

T3:=CONST(ZCMZL=REF(ZCMZL,1));  

T4:=CONST(ZCMZL<REF(ZCMZL,1)ANDDKB=1);  

T5:=CONST(ZCMZL<REF(ZCMZL,1)ANDDKB=0);  

T6:=CONST(TFXXS<=50);  

T7:=CONST(TFXXS>=160);  

T8:=CONST(TFXXS>50ANDTFXXS<160ANDTFXXS>=REF(TFXXS,1)ANDTFXXS<=100);  

T9:=CONST(TFXXS>50ANDTFXXS<160ANDTFXXS>=REF(TFXXS,1)ANDTFXXS>100);  

T10:=CONST(TFXXS>50ANDTFXXS<160ANDTFXXS<REF(TFXXS,1)ANDTFXXS>100);  

T11:=CONST(TFXXS>50ANDTFXXS<160ANDTFXXS<REF(TFXXS,1)ANDTFXXS<=100);  

T12:=CONST(ZSHTL>90);  

T13:=CONST(ZZLKP>75);  

T14:=CONST(CROSS(ZCMZL,ZZLJJ)ANDZZLKP>ZZLJJANDZZLKP>10ANDZZLJJ>REF(ZZLJJ,1)ANDZCMZL>REF(ZCMZL,1));  

T15:=CONST(CROSS(ZCMZL,ZZLKP)ANDZZLKP>ZZLJJANDZZLKP<ZSHTLANDZZLKP>10ANDZZLJJ>REF(ZZLJJ,1)ANDZCMZL>REF(ZCMZL,1));  

T16:=CONST(CROSS(ZCMZL,ZSHTL)ANDZSHTL>ZZLKPANDZCMZL>REF(ZCMZL,1));  

T17:=CONST(CROSS(ZCMZL,100)ANDZCMZL>REF(ZCMZL,1));  

T18:=CONST(REF(ZSHTL,1)>90ANDZSHTL<90);  

TS1:=IF(T1=1,0+0.03,0);  

TS2:=IF(T2=1,TS1+0.03,TS1);  

TS3:=IF(T3=1,TS2+0.03,TS2);  

TS4:=IF(T4=1,TS3+0.03,TS3);  

TS5:=IF(T5=1,TS4+0.03,TS4);  

TS6:=IF(T6=1,0+0.73,0);  

TS7:=IF(T7=1,TS6+0.03,TS6);  

TS8:=IF(T8=1,TS7+0.03,TS7);  

TS9:=IF(T9=1,TS8+0.03,TS8);  

TS10:=IF(T10=1,TS9+0.03,TS9);  

TS11:=IF(T11=1,TS10+0.03,TS10);  

TS12:=IF(T12,0+0.03,0);  

TS13:=IF(T13=1,TS12+0.03,TS12);  

TS14:=IF(T14=1,TS13+0.03,TS13);  

TS15:=IF(T15=1,TS14+0.03,TS14);  

TS16:=IF(T16=1,TS15+0.03,TS15);  

TS17:=IF(T17=1,TS16+0.03,TS16);  

TS18:=IF(T8=1,TS17+0.03,TS17);  

DRAWTEXT_FIX(T1,0.58,TS1,0,'★主力动向监控:主力增仓'),COLORRED;  

DRAWTEXT_FIX(T2,0.58,TS2,0,'★主力动向监控:主力减仓'),COLORMAGENTA;  

DRAWTEXT_FIX(T3,0.58,TS3,0,'★主力动向监控:多空平衡'),COLORGRAY;  

DRAWTEXT_FIX(T4,0.58,TS4,0,'★主力动向监控:主力回补'),COLORFF9933;  

DRAWTEXT_FIX(T5,0.58,TS5,0,'★主力动向监控:主力出逃'),COLORGREEN;  

DRAWTEXT_FIX(T6,0.78,TS6,0,'★操作风险提示:买入风险'),COLORYELLOW;  

DRAWTEXT_FIX(T7,0.78,TS7,0,'★操作风险提示:卖出风险'),COLORCYAN;  

DRAWTEXT_FIX(T8,0.78,TS8,0,'★操作风险提示:追涨博弈'),COLORRED;  

DRAWTEXT_FIX(T9,0.78,TS9,0,'★操作风险提示:稳健持股'),COLORMAGENTA;  

DRAWTEXT_FIX(T10,0.76,TS10,0,'★操作风险提示:盘跌减仓'),COLORWHITE;  

DRAWTEXT_FIX(T11,0.76,TS11,0,'★操作风险提示:杀跌空仓'),COLORGREEN;  

DRAWTEXT_FIX(T12,0.36,TS12,0,'☆特别信号提示:筑底散兵坑'),COLOR66FFCC;  

DRAWTEXT_FIX(T13,0.36,TS13,0,'☆特别信号提示:铸顶风险区'),COLORCYAN;  

DRAWTEXT_FIX(T14,0.36,TS14,0,'☆特别信号提示:穿越主力'),COLORRED;  

DRAWTEXT_FIX(T15,0.36,TS15,0,'☆特别信号提示:穿越主力'),COLORYELLOW;  

DRAWTEXT_FIX(T16,0.36,TS16,0,'☆特别信号提示:穿越散户'),COLORGREEN;  

DRAWTEXT_FIX(T17,0.36,TS17,0,'☆特别信号提示:全盘穿越'),COLOR3399FF;  

A股:CAPITAL/1000000,LINETHICK0,COLORWHITE;  

实际量:VOL,LINETHICK0;  

{VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);  

VAR2:=DYNAINFO(7)=CLOSEANDDYNAINFO(10)=AMOUNT;  

预测:=IF(DYNAINFO(7)=CLOSEANDDYNAINFO(10)=AMOUNT,VAR1,VAR2)/10000;  

预测量:STICKLINE(IF(DYNAINFO(7)=CLOSEANDDYNAINFO(10)=AMOUNT,VAR1,VAR2),VAR1,0,7,1),COLORGRAY;}  

AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));  

主买:IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),POINTDOT,COLORRED;  

主卖:IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;  

换手率%:VOL/CAPITAL*100,POINTDOT,COLORWHITE;  

STICKLINE(C>=REF(C,1),0,VOL,2.5,1),COLORRED;  

STICKLINE(C<REF(C,1),0,VOL,2.5,1),COLORGREEN;  

STICKLINE(主买>0,0,主买,2.5,0),COLORRED;  

STICKLINE(主卖<0,0,主卖,2.5,0),COLORGREEN;  

资金异动:VOL/MA(VOL,55)*100,COLORYELLOW;  

STICKLINE(资金异动>100,0,VOL,0.6,0),COLORYELLOW;  

MA5:MA(V,5),COLORWHITE;  

MA13:MA(V,13),COLORRED;  

DRAWTEXT(CROSS(MA5,MA13),(V*1.05),'★关注'),COLORYELLOW;  

N:=34;M:=3;  

个股资金指数:EMA(((100*(CLOSE-LLV(LOW,N)))/(HHV(HIGH,N)-LLV(LOW,N))),M);  

stickline(个股资金指数>(0-5),100,(0-5),2,2),color000000;  

stickline(个股资金指数>20,个股资金指数,20,2,2),ColorDB43E7;  

DRAWICON(CROSS(个股资金指数,50),个股资金指数,10);  

DRAWICON(CROSS(50,个股资金指数),个股资金指数,11);  

市场资金指数:EMA(((100*(INDEXC-LLV(INDEXL,N)))/(HHV(INDEXH,N)-LLV(INDEXL,N))),M),colorwhite;  

DRAWICON(CROSS(50,市场资金指数),50,5);  

DRAWICON(CROSS(市场资金指数,50),50,4);  

资金运作安全区:stickline((市场资金指数>50),20,5,5,0),Color7BBEB2;  

博弈线:80;  

20;  

50;  

{cci}  

{cci卖点对于短期内暴涨的股票卖出非常适合}  

TYP:=(HIGH+LOW+CLOSE)/3;  

CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORRED,LINETHICK0;  

cci高度关注:if(ref(cci,1)<-99andcci>-98,1,0),colorwhite;  

stickline(cci高度关注,20,40,6,1),linethick3,colorwhite;  

cci逃逸:if(ref(cci,1)>99andcci<98and个股资金指数>45,1,0),colorgreen;  

stickline(cci逃逸,80,95,6,0),linethick3,colorgreen;  

弱势1:=if(cci<-100,cci/5+20,20);  

stickline(弱势1,20,弱势1,1,0),linethick1,Color47FD6F;  

弱势2:=if(cci<-50andcci>-101,cci/5+20,20);  

stickline(弱势2,20,弱势2,1,0),linethick1,coloryellow;  

买入1:if(ref(cci高度关注,1)=1andcci>-50,1,0);  

买入2:if(ref(cci高度关注,2)=1andcci>-50andref(cci,1)>-50,1,0);  

买入3:if(ref(cci高度关注,3)=1andcci>-50andref(cci,1)>-50,1,0);  

买入4:if(ref(cci高度关注,4)=1andcci>-50andref(cci,1)>-50andref(cci,2)>-50,1,0);  

stickline(买入1,20,60,3,0),linethick1,colorred;  

stickline(买入2,20,65,3,0),linethick1,colorred;  

stickline(买入3,20,70,3,0),linethick1,colorred;  

stickline(买入4,20,75,3,0),linethick1,colorred;  

买入选股:if(买入1or买入2or买入3or买入4,1,0);

image.png

二、通达信主力资金进入指标公式

    NOTEXT1:-100,COLORGRAY,DOTLINE;

    NOTEXT2:100,COLORGRAY,DOTLINE;

    TYP:=(HIGH+LOW+CLOSE)/3;

    CCI:(TYP-MA(TYP,5))/(0.015*AVEDEV(TYP,5))LINETHICK1,COLORYELLOW;

    {STICKLINE(CCI1>100,CCI1,100,4,0),COLOR00CC66;

    STICKLINE(CCI1<-100,CCI1,-100,4,0),COLORCC00EE;

    CCI:CCI1,LINETHICK1,COLORYELLOW;}

    VAR1:=EMA(EMA(CLOSE,3),1);

    控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;

    A10:=CROSS(控盘,0);

    VAR2:=100*WINNER(CLOSE*0.95);

    高度控盘:IF(控盘>REF(控盘,1)AND控盘>0,控盘,0),COLOR0000FF,NODRAW;

    有庄控盘:IF(VAR2>50ANDCOST(85)<CLOSEAND控盘>0,控盘,0),COLORFF00FF,NODRAW;

    无庄控盘:IF(控盘<0,控盘,0),COLORFF6600,NODRAW;

    开始控盘:IF(A10,5,0),LINETHICK3,COLORYELLOW,NODRAW;

    主力出货:IF(控盘<REF(控盘,1)AND控盘>0,控盘,0),COLOR00FF00,NODRAW;

    个股:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORBROWN,NODRAW;

    短线反弹:IF(CROSS(个股,9),80,0),STICK,LINETHICK3,COLORLIBLUE;

    DRAWTEXT(CROSS(个股,9),75,'●反弹'),COLORLIBLUE;

    STICKLINE(控盘<0,控盘,0,3.5,0),COLORFF3300;

    STICKLINE(控盘<0,控盘,0,2.5,0),COLORFF6600;

    STICKLINE(控盘<0,控盘,0,1.5,0),COLORFF8800;

    STICKLINE(控盘<0,控盘,0,0.5,0),COLORFFAA00;

    STICKLINE(控盘>REF(控盘,3)AND控盘>0,控盘,0,3.5,0),COLOR000033;

    STICKLINE(控盘>REF(控盘,3)AND控盘>0,控盘,0,2.5,0),COLOR000066;

    STICKLINE(控盘>REF(控盘,3)AND控盘>0,控盘,0,1.5,0),COLOR000099;

    STICKLINE(控盘>REF(控盘,3)AND控盘>0,控盘,0,0.5,0),COLOR0000CC;

    STICKLINE(VAR2>50ANDCOST(85)<CLOSEAND控盘>0,控盘*0.8,0,3.0,0),COLORFF0066;

    STICKLINE(VAR2>50ANDCOST(85)<CLOSEAND控盘>0,控盘*0.8,0,2.0,0),COLORFF0099;

    STICKLINE(VAR2>50ANDCOST(85)<CLOSEAND控盘>0,控盘*0.8,0,1.5,0),COLORFF00BB;

    STICKLINE(VAR2>50ANDCOST(85)<CLOSEAND控盘>0,控盘*0.8,0,0.5,0),COLORFF00FF;

    STICKLINE(控盘<REF(控盘,3)AND控盘>0,控盘,0,3.5,0),COLOR005500;

    STICKLINE(控盘<REF(控盘,3)AND控盘>0,控盘,0,2.5,0),COLOR008800;

    STICKLINE(控盘<REF(控盘,3)AND控盘>0,控盘,0,1.5,0),COLOR00BB00;

    STICKLINE(控盘<REF(控盘,3)AND控盘>0,控盘,0,0.5,0),COLOR00EE00;

    STICKLINE(A10,控盘,0,3.5,0),COLOR0066FF;

    STICKLINE(A10,控盘,0,2.5,0),COLOR0099FF;

    STICKLINE(A10,控盘,0,1.0,0),COLOR00CCFF;

    STICKLINE(A10,控盘,0,0.5,0),COLOR00FFFF;

    神奇筹码:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),NODRAW;

    主力筹:=WINNER(C)*100,NODRAW;

    散户筹:=(WINNER(C*1.1)-WINNER(C*0.9))*100,NODRAW;

    STICKLINE(神奇筹码>散户筹,-10,-6,6,0),COLORRED;

    STICKLINE(主力筹>散户筹,-5,0,6,0),COLORMAGENTA;

    STICKLINE(神奇筹码>50,1,5,6,0),COLORFF9900;

    STICKLINE(主力筹>80AND散户筹<REF(散户筹,1),6,10,6,0),COLORYELLOW;

    {ZJX1:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4;}

    ZJX2:=EMA(CLOSE,2)-EMA(CLOSE,89);

    ZJX3:=2*(ZJX2-EMA(ZJX2,30))*10;

    ZJX4:=EMA(CLOSE,2)-EMA(CLOSE,150);

    ZJX5:=2*(ZJX4-EMA(ZJX4,100));

    背离值:(POW(ZJX3,3)*0.1+POW(ZJX3,2))/45+(POW(ZJX5,3)*0.1+POW(ZJX5,1))*5,COLORYELLOW;

    正常值:EMA(背离值,5),COLORWHITE;

    STICKLINE(正常值>REF(正常值,1),0,正常值,1,1),COLORMAGENTA;

    STICKLINE(正常值<=REF(正常值,1),0,正常值,1,1),COLORCYAN;

    DRAWICON(CROSS(背离值,正常值),正常值*1.2,34);

    DRAWICON(CROSS(正常值,背离值),正常值*0.8,35);

    VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);

    VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);

    VAR3:=EMA(VAR2,10);

    VAR4:=LLV(LOW,33);

    VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);

    主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED;

    STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),COLORRED;

    洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN;

    STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLORGREEN;

image.png

[源码注释]通达信公式动态翻译结果

输出XG:最近5日一直存在平滑异同平均的MACD>1日前的平滑异同平均的MACDAND 2日前的最近3日一直存在平滑异同平均<0AND 最近2日一直存在平滑异同平均的MACD>0

推荐阅读:通达信主力进出指标公式

    EU:=DMA((H+L+C*2)/4,0.9);

    JJ:=REF(EMA(EU,3),1);

    QU:=VOL/((H-L)*2-ABS(C-O));

    XVL:=IF(C&gt;O,QU*(H-L),IF(C&lt;O,QU*(H-O+(C-L)),VOL/2))+IF(C&gt;O,0-QU*(H-C+(O-L)),IF(C&lt;O,0-QU*(H-L),0-VOL/2));

    ZLL:=VOL/CAPITAL;

    HSL1:=IF(ZLL&gt;10,10,ZLL);

    HSL:=XVL/20/1.15;

    攻击流量:=HSL*0.55+REF(HSL,1)*0.33+REF(HSL,2)*0.22;

    GJJ:=EMA(攻击流量,8);

    JX:=EMA(攻击流量,3);

    流量:JX,COLORMAGENTA;

    A_1:=IF(L&lt;DYNAINFO(7),0,IF(H&gt;DYNAINFO(7),DYNAINFO(7)-(DYNAINFO(7)-H+0.02)/(H-L+0.02),0));

    A_2:=DMA(A_1,V/CAPITAL)*100;

    出货:IF(A_2&gt;0ANDA_2&gt;REF(A_2,1),A_2/20,0),DOTLINE;

    0,COLORWHITE;

    动能线:GJJ,COLORFF9900,LINETHICK2;

    KK:=REF(JX,1);

    GG:=(((JX-KK)/KK)*100);

    流量幅%:IF(((JX&gt;0)AND(KK&lt;0)),ABS(GG),IF((((JX&lt;0)AND(KK&lt;0))AND(JX&lt;KK)),(0-GG),GG))COLORMAGENTA,NODRAW;

    冲击力度:HSL/1000,COLOR9B37FF,COLORRED,NODRAW;

    周成交流量:SUM(JX,5),COLORFFBFDF,COLORMAGENTA,NODRAW;

    BB:=REF(周成交流量,1);

    ZQ:=(周成交流量-BB)/BB*100;

    周幅%:IF(周成交流量&gt;0ANDBB&lt;0,ABS(ZQ),IF(周成交流量&lt;0ANDBB&lt;0AND周成交流量&lt;BB,-ZQ,ZQ))COLORMAGENTA,NODRAW;

    VARQ1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);

    VARQ2:=SMA(ABS(LOW-VARQ1),13,1)/SMA(MAX(LOW-VARQ1,0),10,1);

    VARQ3:=EMA(VARQ2,10);

    VARQ4:=LLV(LOW,33);

    VARQ5:=EMA(IF(LOW&lt;=VARQ4,VARQ3,0),3)*100;

    主力进场:=STICKLINE(VARQ5&gt;REF(VARQ5,1)AND出货&lt;=0,0,VARQ5,2,0),COLOR00FFFF;

    DRAWICON(主力进场,动能线,13);

    A:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));

    买量:=IF(CLOSE&gt;OPEN,AA*(HIGH-LOW),IF(CLOSE&lt;OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED;

    卖量:=IF(CLOSE&gt;OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE&lt;OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN;

    进出量:买量+卖量,COLOR00FFFF;

    STICKLINE(进出量&lt;0,0,进出量,4,0),COLORFF6600;

    STICKLINE(进出量&lt;0,0,进出量,3,0),COLORFF9900;

    STICKLINE(进出量&lt;0,0,进出量,1.5,0),COLORFFCC00;

    STICKLINE(进出量&lt;0,0,进出量,0.5,0),COLORCYAN;

    STICKLINE(进出量&gt;0,0,进出量,4,0),COLOR000099;

    STICKLINE(进出量&gt;0,0,进出量,3,0),COLOR0000CC;

    STICKLINE(进出量&gt;0,0,进出量,1.5,0),COLOR0000FF;

    STICKLINE(进出量&gt;0,0,进出量,0.5,0),COLORCC66FF;

    N:=5;

    M:=13;

    N日内净流入:SUM(进出量,N),LINETHICK2,COLORGREEN;

    流入:IF(N日内净流入&gt;REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORRED,LINETHICK2;

    连红天:BARSLASTCOUNT(进出量&gt;0);

    M日内翻红天:COUNT(进出量&gt;0,M),COLORRED;

    走熊天:BARSLASTCOUNT(N日内净流入&lt;0),COLORCYAN;

    走牛天:BARSLASTCOUNT(N日内净流入&gt;0),COLORRED;

    强势天:BARSLASTCOUNT((N日内净流入&gt;REF(N日内净流入,1))&gt;0ANDN日内净流入&gt;0);

    弱势天:BARSLASTCOUNT((N日内净流入&lt;REF(N日内净流入,1))&gt;0ANDN日内净流入&lt;0);

    ZJ:=(O+H+L+C)/4;

    YZ:=IF(BARSCOUNT(C)&gt;60,VOL/SUM(VOL,60),VOL/SUM(VOL,BARSCOUNT(C)));

    主力成本:DMA(((2*C+H+L)/4+(2*H+L+C)/4+(2*L+C+H)/4)/3*90,HSL/90)/90,NODRAW;

    M1:=C/L&gt;1.035;

    M2:=BARSSINCEN(M1,30);

    A1:=(MA(C,2)/REF(主力成本,M2)-1)*100;

    K:SMA(A1,3,1),COLORWHITE;

    D:SMA(K,3,1),COLORYELLOW;

    J:K*3-D*2,COLORMAGENTA;

    DRAWTEXT(CROSS(K,0),K,'上穿主力成本,介入'),COLORMAGENTA;

    DRAWTEXT(K&lt;-5ANDK=LLV(K,20),K,'长线分批抄底'),COLORMAGENTA;

    DRAWTEXT(K&gt;0ANDK&lt;15ANDCROSS(K,D),K,'加油'),COLORMAGENTA;

    超短期:DMA(ZJ,YZ/0.125);

    短期:DMA(ZJ,YZ/0.25);

    中期:DMA(ZJ,YZ/0.50);

    长期:DMA(ZJ,YZ);

    前高26:=HHV(C,26);

    金额:=IF(DYNAINFO(37)&gt;3,2/3,1/3)*AMOUNT;

    主力量:=IF(DYNAINFO(37)&gt;3,2*V/3,V/3)*100;

    成本:=金额/主力量;

    成本13:=SMA(成本,13,1);

    M5:=MA(C,5);

    DRAWBAND(M5,RGB(90,0,0),成本13,RGB(0,90,0));

    DRAWBAND(M5,RGB(90,0,0),前高26,RGB(0,90,0));

    前26高:前高26;

    主力成本13:成本13,LINESTICK,COLORBROWN;

    现价:C;

    STICKLINE(C&gt;REF(C,1),C,REF(C,1),2,1),COLORRED;

image.png

每日公式解答:

股票公式编写要求:

连续5天的量能都收红柱,而且5天的量能柱都穿过10日均量线的选股公式。

股票公式编写结果:

XG:EVERY(C>O AND V>MA(V,10),5);

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。