显示筹码带 多空通道 荆州量学金融终端主图十 通达信指标 源码 贴图
筹码95:IF(显示筹码带=1,COST(95),0);筹码85:IF(显示筹码带=1,COST(85),0);
DRAWBAND(筹码95 ,RGB(60,60,58),筹码85,RGB(60,60,58));
DA1:=IF(130 TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1001:=IF(CURRBARSCOUNT =DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1001 =(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1001 =(HI/POW(GZ,2)) AND C1001 (HI/GZ),V,0),DA);
LH3:=SUM(IF(C1001 =(HI/POW(GZ,3)) AND C1001 (HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1001 =(HI/POW(GZ,4)) AND C1001 (HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1001 =(HI/POW(GZ,5)) AND C1001 (HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1001 =(HI/POW(GZ,6)) AND C1001 (HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1001 =(HI/POW(GZ,7)) AND C1001 (HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1001 =(HI/POW(GZ,8)) AND C1001 (HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1001 =(LO*GZ) AND C1001 LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1001 =LO AND C1001 LO*GZ,V,0),DA);
L1001:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
L2001:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
L3001:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
L4001:=REFDATE(HHV(LH4,DA),DATE);
L5001:=REFDATE(HHV(LH5,DA),DATE);
L6001:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SSS:=(L1001+L2001+L3001+L4001+L5001+L6001+L7+L8+L9+L10);
VAR121:=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);
VAR141:=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);
VAR161:=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);
VAR181:=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);
卖:=(VAR121+VAR141+VAR161+VAR181),LINETHICK2;
STICKLINE(CEILING(DA*L2001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L3001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L4001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L5001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L6001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L7/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L8/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L9/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L10/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L1001/SSS)*3 =CURRBARSCOUNT AND BARSCOUNT(C) 100 AND 显示筹码=1,HI*99/100,HI/GZ,9,0)COLOR3C3C3A,LINETHICK3;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
{多空通道}
短上轨:EMA(H,T),COLORRED;
短下轨:EMA(L,T),COLORGREEN;
NOTEXT短下轨0:IF(C 短下轨,短下轨,DRAWNULL),COLORRED;
NOTEXT短下轨1:IF(C 短下轨,短下轨,DRAWNULL),COLORGREEN;
NOTEXT短上轨0:IF(C 短上轨,短上轨,DRAWNULL),COLORRED;
NOTEXT短上轨1:IF(C 短上轨,短上轨,DRAWNULL),COLORGREEN;
STICKLINE(C 短上轨,短上轨,短下轨,0,1),COLORRED;
STICKLINE(C 短下轨,短上轨,短下轨,0,1),COLORGREEN;
长上轨:EMA(H,TT),COLORMAGENTA;
长下轨:EMA(L,TT),COLORBLUE;
NOTEXT长下轨0:IF(C 长下轨,长下轨,DRAWNULL),COLORMAGENTA;
NOTEXT长下轨1:IF(C 长下轨,长下轨,DRAWNULL),COLORBLUE;
NOTEXT长上轨0:IF(C 长上轨,长上轨,DRAWNULL),COLORMAGENTA;
NOTEXT长上轨1:IF(C 长上轨,长上轨,DRAWNULL),COLORBLUE;
STICKLINE(C 长上轨,长上轨,长下轨,0,1),COLORMAGENTA;
STICKLINE(C 长下轨,长上轨,长下轨,0,1),COLORBLUE;
{活跃度}
短轨差:=短上轨-短下轨,COLORYELLOW,NODRAW;
短活跃度:(短上轨-短下轨)*100/短下轨,COLORLIBLUE,NODRAW;
长轨差:=长上轨-长下轨,COLORYELLOW,NODRAW;
长活跃度:(长上轨-长下轨)*100/长下轨,COLORLIBLUE,NODRAW;
{仓位显示}
HJ_2:=CROSS(C,短上轨);
HJ_3:=CROSS(短下轨,C);
HJ_4:=BARSLAST(HJ_2)+1;
HJ_5:=BARSLAST(HJ_3)+1;
HJ_6:=CROSS(SUM(HJ_2,HJ_5),0.5);
HJ_7:=CROSS(SUM(HJ_3,HJ_4),0.5);
HJ_8:=CROSS(C,长上轨);
HJ_9:=CROSS(长下轨,C);
HJ_10:=BARSLAST(HJ_8)+1;
HJ_11:=BARSLAST(HJ_9)+1;
HJ_12:=CROSS(SUM(HJ_8,HJ_11),0.5);
HJ_13:=CROSS(SUM(HJ_9,HJ_10),0.5);
HJ_14:=IF(HJ_13 AND HJ_7,0,IF(HJ_13,0,IF(HJ_7,6,1)));
HJ_15:=IF(HJ_12 AND HJ_6,10,IF(HJ_12,10,IF(HJ_6,4,1)));
DRAWNUMBER(HJ_14=6 AND 短下轨 长下轨,H*1.01,6),COLORWHITE;
DRAWNUMBER(HJ_14=0 AND 短下轨 长下轨,H*1.01,0),COLORWHITE;
DRAWNUMBER(HJ_6 AND 短下轨 长下轨,L*0.99,10),COLORWHITE;
DRAWNUMBER(HJ_15=4 AND 短上轨 长上轨,L*0.99,4),COLORWHITE;
DRAWNUMBER(HJ_15=10 AND 短上轨 长上轨,L*0.99,10),COLORWHITE;
DRAWNUMBER(HJ_7 AND 短上轨 长上轨,H*1.01,0),COLORWHITE;
{画K线}
DRAWKLINE(H,O,L,C);
{假阳真阴}
均价:=AMOUNT/VOL/100;
假阳:=C O AND REF(C,1) 均价 AND C 均价 AND C 300 ;
STICKLINE(假阳,O,C,1,0)COLORLICYAN;
标志阴:=REF(C,1)/C 1.04;
STICKLINE(标志阴,O,C,1,0)COLORWHITE;
{假阴真阳}
假阴:=O C AND 均价 REF(C,1) AND C MA(C,5);
STICKLINE(假阴,O,C,1,0),COLORRED;
倍量柱:=VOL =REF(V,1)*1.9 AND C
DRAWTEXT(倍量柱 ,L*0.97,'倍'),COLORWHITE;
缩倍:=REF(V,1)*0.55 =V AND NOT(O=C AND H=O) ;
DRAWTEXT(缩倍 ,L*0.98,'2S'),COLORMAGENTA;
{涨跌停价格显示};
AA:=(C-REF(C,1))/REF(C,1)*100;
ZS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA =4.945;
DS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA =-4.945;
涨停价:IF(ZS,REF(C,1)*1.05,REF(C,1)*1.1),NODRAW,COLORRED;
跌停价:IF(DS,REF(C,1)*0.95,REF(C,1)*0.9),NODRAW,COLORGREEN;
{涨跌停K线标识};
ST:=NAMELIKE('ST')=1 OR NAMELIKE('*ST')=1 OR NAMELIKE('SST')=1
OR NAMELIKE('S*ST')=1 OR NAMELIKE('S ST')=1;
涨停:=C=ZTPRICE(REF(CLOSE,1),0.1) OR (C/REF(C,1) 1.0495 AND ST);
跌停:=REF(C,1)/C 1.0995 OR (REF(C,1)/C 1.0495 AND ST);
STICKLINE(涨停,C,O,3,0),COLORMAGENTA;
STICKLINE(跌停,C,O,3,0),COLORGREEN;
DRAWICON(H=ZTPRICE(REF(CLOSE,1),0.1) AND C!=H,L*0.965,15);
上榜:=SIGNALS_USER(300, 0), NODRAW; {上榜金额 1,则表示上榜了,这个是上榜总金额}
净买入:=SIGNALS_USER(299, 0), NODRAW;
DRAWICON(上榜 =1 AND 净买入 =0 AND 显示龙虎标志=1 ,L*0.98,38);
DRAWICON(上榜 =1 AND 净买入 0 AND 显示龙虎标志=1 ,L*0.98,39);
第一组:=REF(H-REF(L,1),1);
第二组:=REF(REF(H,1)-REF(L,2),1);
第三组:=REF(REF(H,2)-REF(L,3),1);
平均值:=(第一组+第二组+第三组)/3;
上线:=平均值+REF(L,1);
平均波动:=REF(((H-L)+(REF(H,1)-REF(L,1))+(REF(H,2)-REF(L,2)))/3,1);
下线:=上线-平均波动;
中线1:=(上线+下线)/2;
D_2R3_ZQ1:=CURRBARSCOUNT
D_2R3_ZQ2:=CURRBARSCOUNT
D_2R3X1:=IF(D_2R3_ZQ1, 上线, DRAWNULL);
D_2R3X2:=IF(D_2R3_ZQ1, 中线1, DRAWNULL);
D_2R3X3:=IF(D_2R3_ZQ1, 下线, DRAWNULL);
D_2R3X11:IF(D_2R3_ZQ2,D_2R3X1,DRAWNULL);
D_2R3X12:IF(D_2R3_ZQ2,D_2R3X2,DRAWNULL);
D_2R3X13:IF(D_2R3_ZQ2,D_2R3X3,DRAWNULL);
STICKLINE(D_2R3_ZQ2 ,D_2R3X11,D_2R3X11,20,-1),COLORLIBLUE;
STICKLINE(D_2R3_ZQ2 ,D_2R3X12,D_2R3X12,20,-1),COLORYELLOW;
STICKLINE(D_2R3_ZQ2 ,D_2R3X13,D_2R3X13,20,-1),COLORWHITE;
DRAWTEXT(D_2R3_ZQ1,D_2R3X11,' 上线'),COLORLIBLUE;
DRAWTEXT(D_2R3_ZQ1,D_2R3X12,' 中线1'),COLORMAGENTA;
DRAWTEXT(D_2R3_ZQ1,D_2R3X13,' 下线'),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND C 上线 AND C 中线1 AND C =O,0.85,0.95,0,'【高不过,必回落】'),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND C 中线1 AND C 下线 AND C =O,0.85,0.95,0,'【中线破,快逃脱】'),COLORWHITE;
DRAWTEXT_FIX( ISLASTBAR AND C 下线 , 0.85,0.95,0,'【下线破,把路夺】'),COLORWHITE;
DRAWTEXT_FIX( ISLASTBAR AND C 上线 AND C O , 0.85,0.95,0,'【上线过,可做多】'),COLORWHITE;
DRAWTEXT_FIX( ISLASTBAR AND C 中线1 AND C 上线 AND C O, 0.85,0.95,0,'【中线过,分强弱】'),COLORWHITE;
DRAWTEXT_FIX( ISLASTBAR AND C 下线 AND C 中线1 AND C O, 0.85,0.95,0,'【中线下,走势弱】'),COLORWHITE;
STICKLINE(C/REF(C,1) =1.04 OR C/REF(C,1) =0.96,(C+O)/2,(C+O)/2,2,1),COLORLIBLUE;{中分线};
STICKLINE(C/REF(C,1) =1.04 OR C/REF(C,1) =0.96,(MAX(O,C)-MIN(O,C))*2/3+MIN(O,C),(MAX(O,C)-MIN(O,C))*2/3+MIN(O,C),2,1),COLORLIBLUE;{上三一线};
STICKLINE(C/REF(C,1) =1.04 OR C/REF(C,1) =0.96,(MAX(O,C)-MIN(O,C))/3+MIN(O,C),(MAX(O,C)-MIN(O,C))/3+MIN(O,C),2,1),COLORLIBLUE;{下三一线};