通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图主图筹码线指标公式VAR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR2:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW * 0.998),8);STICKLINE((VAR2 MA(VAR3,6)),CLOSE,OPEN,7,1),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),LOW,(MIN(OPEN,CLOSE) * 1.001),0.6,0),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),MAX(OPEN,CLOSE),HIGH,0.6,0),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),OPEN,CLOSE,7,1),color4440FF;STICKLINE((VAR2 MA(VAR3,6)),HIGH,MAX(CLOSE,OPEN),0.6,0),color4440FF;STICKLINE((VAR2 MA(VAR3,6)),LOW,(MIN(CLOSE,OPEN) * 1.001),0.8,0),color4440FF;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),(OPEN * 0.998),(CLOSE * 1.0025),4.5,0),colorgreen;VAR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR2:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW * 0.998),8);STICKLINE((VAR2 MA(VAR3,6)),CLOSE,OPEN,7,1),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),LOW,(MIN(OPEN,CLOSE) * 1.001),0.6,0),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),MAX(OPEN,CLOSE),HIGH,0.6,0),colorgreen;STICKLINE((VAR2 MA(VAR3,6)),OPEN,CLOSE,7,1),color4440FF;STICKLINE((VAR2 MA(VAR3,6)),HIGH,MAX(CLOSE,OPEN),0.6,0),color4440FF;STICKLINE((VAR2 MA(VAR3,6)),LOW,(MIN(CLOSE,OPEN) * 1.001),0.8,0),color4440FF;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),(OPEN * 0.998),(CLOSE * 1.0025),4.5,0),colorgreen;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),(CLOSE * 0.998),(OPEN * 1.0025),4.5,0),color4440FF;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),CLOSE,OPEN,7,0),colorgreen;DRAWTEXT(CROSS(VAR2,MA(VAR3,6)),(LOW * 0.988), B ),coloryellow,linethick3;DRAWTEXT(CROSS(MA(VAR3,6),VAR1),(HIGH * 1.02), S ),colorgreen,linethick3;DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,8);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)C AND REF(DIFF,A1+1)DIFF AND CROSS(DIFF,DEA);DRAWTEXT(IF(B10,1,0),L-0.1, 大战役 ),Color00FFFC;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);A2:=BARSLAST(REF(CROSS(K,D),1));B2:=REF(C,A2+1)C AND REF(K,A2+1)K AND CROSS(K,D);DRAWTEXT(IF(B20,1,0),L-0.25, 瞄准 ),Color6C8CCF;LC:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));B3:=REF(C,A3+1)C AND REF(RSI1,A3+1)RSI1 AND CROSS(RSI1,RSI2);DRAWTEXT(IF(B30,1,0),L-0.4, 瞄准 ),ColorFF05FF;C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));D1:=REF(C,C1+1)C AND REF(DIFF,C1+1)DIFF AND CROSS(DEA,DIFF);DRAWTEXT(IF(D10,1,0),H+0.1, 撤退 ),ColorB27800;C2:=BARSLAST(REF(CROSS(D,K),1));D2:=REF(C,C2+1)C AND REF(K,C2+1)K AND CROSS(D,K);DRAWTEXT(IF(D20,1,0),H+0.25, 撤退 ),Color0AB000;C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));D3:=REF(C,C3+1)C AND REF(RSI1,C3+1)RSI1 AND CROSS(RSI2,RSI1);DRAWTEXT(IF(D30,1,0),H+0.4, 大撤退 ),ColorFF0000;MA8:MA(C,8),colorwhite;MA34:MA(C,20.5),coloryellow;MA55:MA(C,41),colorcyan;SQ1:=OMA(C,20.5) AND CMA(C,20.5);SQ2:=MA(C,8)MA(C,20.5);SQ3:=MA(C,20.5)MA(C,41);SQ4:=MA34=REF(MA34,1);SQ5:=VMA(V,5)*1.01 AND VMA(V,10)*1.01;SQ:=SQ1 AND SQ2 AND SQ3 AND SQ4 AND SQ5;DRAWTEXT(SQ,L, 冲锋 ),colormagenta;进攻:=REF(C,REF(HHVBARS(V,21),0)),colorgreen,linethick2;m1:=MA(CLOSE,1),linethick2;a:=V1*REF(V,1) AND (C/REF(C,1)-1)*1009.5 AND m1=进攻,colorred;DRAWICON(CROSS(a,1),L*0.98,3),colorwhite;DRAWTEXT(a,L*0.93, 进攻 ),LINETHICK1,Color6C65FF;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),(CLOSE * 0.998),(OPEN * 1.0025),4.5,0),color4440FF;STICKLINE(((OPEN CLOSE) AND (VAR2 MA(VAR3,6))),CLOSE,OPEN,7,0),colorgreen;DRAWTEXT(CROSS(VAR2,MA(VAR3,6)),(LOW * 0.988), B ),coloryellow,linethick3;DRAWTEXT(CROSS(MA(VAR3,6),VAR1),(HIGH * 1.02), S ),colorgreen,linethick3;DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,8);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)C AND REF(DIFF,A1+1)DIFF AND CROSS(DIFF,DEA);DRAWTEXT(IF(B10,1,0),L-0.1, 大战役 ),Color00FFFC;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);A2:=BARSLAST(REF(CROSS(K,D),1));B2:=REF(C,A2+1)C AND REF(K,A2+1)K AND CROSS(K,D);DRAWTEXT(IF(B20,1,0),L-0.25, 瞄准 ),Color6C8CCF;LC:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));B3:=REF(C,A3+1)C AND REF(RSI1,A3+1)RSI1 AND CROSS(RSI1,RSI2);DRAWTEXT(IF(B30,1,0),L-0.4, 瞄准 ),ColorFF05FF;C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));D1:=REF(C,C1+1)C AND REF(DIFF,C1+1)DIFF AND CROSS(DEA,DIFF);DRAWTEXT(IF(D10,1,0),H+0.1, 撤退 ),ColorB27800;C2:=BARSLAST(REF(CROSS(D,K),1));D2:=REF(C,C2+1)C AND REF(K,C2+1)K AND CROSS(D,K);DRAWTEXT(IF(D20,1,0),H+0.25, 撤退 ),Color0AB000;C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));D3:=REF(C,C3+1)C AND REF(RSI1,C3+1)RSI1 AND CROSS(RSI2,RSI1);DRAWTEXT(IF(D30,1,0),H+0.4, 大撤退 ),ColorFF0000;MA8:MA(C,8),colorwhite;MA34:MA(C,20.5),coloryellow;MA55:MA(C,41),colorcyan;SQ1:=OMA(C,20.5) AND CMA(C,20.5);SQ2:=MA(C,8)MA(C,20.5);SQ3:=MA(C,20.5)MA(C,41);SQ4:=MA34=REF(MA34,1);SQ5:=VMA(V,5)*1.01 AND VMA(V,10)*1.01;SQ:=SQ1 AND SQ2 AND SQ3 AND SQ4 AND SQ5;DRAWTEXT(SQ,L, 冲锋 ),colormagenta;进攻:=REF(C,REF(HHVBARS(V,21),0)),colorgreen,linethick2;m1:=MA(CLOSE,1),linethick2;a:=V1*REF(V,1) AND (C/REF(C,1)-1)*1009.5 AND m1=进攻,colorred;DRAWICON(CROSS(a,1),L*0.98,3),colorwhite;DRAWTEXT(a,L*0.93, 进攻 ),LINETHICK1,Color6C65FF;N:=20;M:=32;P1:=80;P2:=100;VAR1:=(C+H+O+L)/4;卖出:EMA(VAR1,N)*(1+P1/900),colorgreen,LINETHICK2;买入:EMA(VAR1,M)*(1-P2/900),colormagenta,LINETHICK2;MA1:=MA(VAR1,3);STICKLINE(卖出LOW AND 卖出HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),8,0),colorgreen;STICKLINE(卖出MIN(C,O) AND 卖出MAX(C,O),卖出,MAX(OPEN,CLOSE),8,0),colorgreen;STICKLINE(卖出LOW AND 卖出HIGH,卖出,HIGH,1,0),colorgreen;STICKLINE(卖出LOW,OPEN,CLOSE,8,0),colorgreen;STICKLINE(卖出LOW,HIGH,LOW,1,0),colorgreen;STICKLINE(买入LOW AND 买入HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),8,0),colormagenta;STICKLINE(买入MIN(C,O) AND 买入MAX (C,O),买入,MIN(OPEN,CLOSE),8,0),colormagenta;STICKLINE(买入LOW AND 买入HIGH,买入,LOW,1,0),colormagenta;STICKLINE(买入HIGH,OPEN,CLOSE,8,0),colormagenta;STICKLINE(买入HIGH,HIGH,LOW,1,0),colormagenta;DRAWTEXT(CROSS(LOW,买入),LOW*0.95, B ),colorred,LINETHICK2;DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02, S ),colorgreen;筹码均线主图指标 M1:MA(C,5),coloryellow;M2:MA(C,10),colorcyan;M3:MA(C,20),colorgreen;M4:MA(C,30),colorred,linethick2;最大值:=MAX(MAX(M1,M2),MAX(M3,M4));最小值:=MIN(MIN(M1,M2),MIN(M3,M4));DRAWICON((O=最小值 AND C=最大值 ),LOW*0.9,buy),colorredDRAWGBK(DATE900103,STRIP(RGB(43,33,100),RGB(83,73,200),1));MB1:EMA(CLOSE,4),Color00FFFF,LINETHICK1;MB2:EMA(MB1,4),ColorFFFFFF;MB3:EMA(MB2,4),ColorFFFF00;MB4:EMA(MB3,4),Color00FF00;MB5:EMA(MB4,4),ColorFF00FF;MB6:EMA(MB5,4),Color0000FF;FILTER( REF((OPEN-CLOSE)/CLOSE0.05,1)0 AND REF(IF((MA(OPEN,5)-OPEN)/OPEN0.04 AND (MA(OPEN,10)-MA(OPEN,5))/MA(OPEN,5)0.04,30,0),1)0,5),COLORF00FF0;qs1:=IF(CMA(C,5),1,0);qs2:=IF(CMA(C,5),-1,0);qs3:=IF(MA(C,4)REF(MA(C,4),1),1,0);qs4:=IF(MA(C,4)REF(MA(C,4),1),-1,0);qs:=qs1+qs2+qs3+qs4;STICKLINE((qs=-2 AND CO),H,L,0,0),Color00FF00;STICKLINE((qs=-2 AND CO),OPEN,CLOSE,10,0),Color007900;STICKLINE((qs=-2 AND CO),OPEN,CLOSE,8,1),Color00A200;STICKLINE((qs=-2 AND CO),OPEN,CLOSE,4,0),Color00D600;STICKLINE((qs=-2 AND CO),OPEN,CLOSE,2,0),Color00FF00;STICKLINE((qs=-2 AND CO),H,L,0,0),Color53A9FF;STICKLINE((qs=-2 AND CO),O,C,10,0),Color003E7B;STICKLINE((qs=-2 AND CO),O,C,8,1),Color0053A6;STICKLINE((qs=-2 AND CO),O,C,4,0),Color006AD5;STICKLINE((qs=-2 AND CO),O,C,2,0),Color2492FF;STICKLINE((qs=0 AND CO),H,L,0,0),ColorFFFFFF;STICKLINE((qs=0 AND CO),O,C,10,0),ColorBBBBBB;STICKLINE((qs=0 AND CO),O,C,8,1),ColorCACACA;STICKLINE((qs=0 AND CO),O,C,4,0),ColorF6F6F6;STICKLINE((qs=0 AND CO),O,C,2,0),ColorFFFFFF;STICKLINE((qs=0 AND CO),H,L,0,0),Color00FFFF;STICKLINE((qs=0 AND CO),O,C,10,0),Color008888;STICKLINE((qs=0 AND CO),O,C,8,1),Color00BFBF;STICKLINE((qs=0 AND CO),O,C,4,0),Color00DBDB;STICKLINE((qs=0 AND CO),O,C,2,0),Color00F0F0;STICKLINE((qs=2 AND CO),H,L,0,0),ColorFF00FF;STICKLINE((qs=2 AND CO),O,C,10,0),ColorBB00BB;STICKLINE((qs=2 AND CO),O,C,8,1),colorFF5BFF;STICKLINE((qs=2 AND CO),O,C,4,0),colorF900F9;STICKLINE((qs=2 AND CO),O,C,2,0),ColorFF66FF;STICKLINE((qs=2 AND CO),H,L,0,0),Color0000FF;STICKLINE((qs=2 AND CO),O,C,10,0),Color00007B;STICKLINE((qs=2 AND CO),O,C,8,1),Color000097;STICKLINE((qs=2 AND CO),O,C,4,0),Color0000C4;STICKLINE((qs=2 AND CO),O,C,2,0),Color0000EC;AC:=AMOUNT/(VOL);YY:=MA(AC,13);LLL:=(C-YY)/YY*100;MIDC := MA(CLOSE,21);UPPERC:= MIDC + 2*STD(C,21);LOWERC:= MIDC - 2*STD(C,21);BBA:=(C-LOWERC)/(UPPERC-LOWERC);BBC:=FORCAST(BBA,3);LIFENGCYC:=(REF(LLL,1)-15 AND REF(BBA,1)0 AND LLLREF(LLL,1));STICKLINE(LIFENGCYC0,C,O,2,0),COLOR10ABFF;STICKLINE(LIFENGCYC0,C,O,1.5,0),COLOR10D0FF;STICKLINE(LIFENGCYC0,C,O,1,0),COLOR10FFFF;DRAWTEXT(LIFENGCYC0,LOW*0.99, ☆ ),colorffffff;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02), 减仓 ),ColorFFFFFF;n=20;MB:MA(CLOSE,N);上轨: MB+STD(CLOSE,N);下轨: MB-STD(CLOSE,N);上极限: MB+2*STD(CLOSE,N);下极限: MB-2*STD(CLOSE,N);STICKLINE(OPEN=CLOSE ,CLOSE ,OPEN,9,0 ),COLORaaaaaa;STICKLINE(OPEN=CLOSE ,CLOSE ,OPEN,6,0 ),COLORbbbbbb;STICKLINE(OPEN=CLOSE ,CLOSE ,OPEN,2.4,0 ),COLORcccccc;STICKLINE(OPEN=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLORdddddd;STICKLINE(CLOSEOPEN,CLOSE,OPEN,9,0 ),COLOr6666cc;STICKLINE(CLOSEOPEN,CLOSE,OPEN,6 ,0 ),COLOR7777dd;STICKLINE(CLOSEOPEN,CLOSE,OPEN,2.4 ,0 ),COLOR8888ee;STICKLINE(CLOSEOPEN,CLOSE,OPEN,1.1 ,0 ),COLOR9999ff;STICKLINE(CLOSEOPEN,OPEN,LOW,0.5,0 ),COLOR1199ff;STICKLINE(CLOSEOPEN,CLOSE,HIGH,0.5 ,0 ),COLOR1199ff;STICKLINE(OPEN=CLOSE,CLOSE,LOW,0.5 ,0 ),COLORcccccc;STICKLINE(OPEN=CLOSE,OPEN,HIGH,0.5 ,0 ),COLORcccccc;