通达信CYC成本均线主图源码 贴图

合集下载

成本分布指标 通达信指标公式源码

成本分布指标 通达信指标公式源码

成本分布指标(主图源码说明)成本分布指标对于分析支撑和阻力位置很有用,很直观.但使用系统自带的指标时,要用鼠标点击一下才能切换到那个界面,很麻烦.论坛上也曾经有在主图中迭加的成本分布指标,用以简化操作.但可惜不准确,与系统自带的指标差异较大,缺乏使用价值,而且使主图界面复杂,影响对K线的观察和分析.本贴发布的这个指标原理正确,精度够用,与系统自带的指标基本一致.而且只在当天的K线区显示一个兰色的矩形条,矩形条中有一些横线,用以反应当天的成本分布状态.这样便既能方便地看到当天的正确的成本分布情况,又基本上不对主图界面构成影响.完全没必要去看系统自带的指标了.指标的原理为:兰色的矩形条由底到顶对应于从0.1%到99.9%的筹码分布区间,每二条横线间的区间均为2%的筹码,横线越密集说明筹码越集中,最密集的地方就是筹码峰所在地.有一条横线是兰色的,对应50%筹码处.本指标只反应当天的成本分布情况,不能看历史的成本分布情况.指标的精度处决于对矩形的等分数,越多越精确,但代码行数就越多,电脑运行就越慢.综合权衡精度和速度后,本指标设置为50等分.本指标成本分布区间为0.1%到99.9%,不是0到100%,这是因为设置为0到100%后那个兰色矩形就不显示了,其原因应该是系统的成本分布函数取值范围限定不能为0和100所致.这对指标的正确性和精度都不构成影响.大家只需把下载的代码中最后一句不要,其余的全部复制后粘贴在你常用的主图指标代码的最前面即可.(一定要放在最前面,否则兰色的矩形条会挡住当天的K线和指标线的.)几张附图为与系统成本分布指标对照结果.成本100:=COST(99.9);成本98:=COST(98);成本96:=COST(96);成本94:=COST(94);成本92:=COST(92);成本90:=COST(90);成本88:=COST(88);成本86:=COST(86);成本84:=COST(84);成本82:=COST(82);成本80:=COST(80);成本78:=COST(78);成本76:=COST(76);成本74:=COST(74);成本72:=COST(72);成本70:=COST(70);成本68:=COST(68);成本66:=COST(66);成本64:=COST(64);成本62:=COST(62);成本60:=COST(60);成本58:=COST(58);成本56:=COST(56);成本54:=COST(54);成本52:=COST(52);成本50:=COST(50);成本48:=COST(48);成本46:=COST(46);成本44:=COST(44);成本42:=COST(42);成本40:=COST(40);成本38:=COST(38);成本36:=COST(36);成本34:=COST(34);成本32:=COST(32);成本30:=COST(30);成本28:=COST(28);成本26:=COST(26);成本24:=COST(24);成本22:=COST(22);成本20:=COST(20);成本18:=COST(18);成本16:=COST(16);成本14:=COST(14);成本12:=COST(12);成本10:=COST(10);成本8:=COST(8);成本6:=COST(6);成本4:=COST(4);成本2:=COST(2);成本0:=COST(0.1);STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本0,成本100,12,0),COLORFF0000; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本98,成本98,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本96,成本96,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本94,成本94,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本92,成本92,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本90,成本90,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本88,成本88,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本86,成本86,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本84,成本84,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本82,成本82,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本80,成本80,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本78,成本78,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本76,成本76,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本74,成本74,12,0),COLOR888888;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本72,成本72,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本70,成本70,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本68,成本68,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本66,成本66,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本64,成本64,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本62,成本62,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本60,成本60,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本58,成本58,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本56,成本56,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本54,成本54,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本52,成本52,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本50,成本50,12,0),COLORFFFF00; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本48,成本48,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本46,成本46,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本44,成本44,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本42,成本42,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本40,成本40,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本38,成本38,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本36,成本36,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本34,成本34,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本32,成本32,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本30,成本30,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本28,成本28,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本26,成本26,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本24,成本24,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本22,成本22,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本20,成本20,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本18,成本18,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本16,成本16,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本14,成本14,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本12,成本12,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本10,成本10,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本8,成本8,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本6,成本6,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本4,成本4,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本2,成本2,12,0),COLOR888888; DRAWKLINE(H,O,L,C);。

通达信主图画线指标源代码

通达信主图画线指标源代码

通达信主图画线指标源代码A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 ANDCOUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));{}G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 ANDCOUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,DOTLINE;DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,DOTLINE;J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1); DRAWLINE(J2,IF(HD,H,L),ISLASTBAR,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLOR WHITE,LINETHICK1,DOTLINE;A3:=H<REF(H,REF(BARSLAST(HD),1)+1);B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST (HD),REF(BARSLAST(HD),1)+2));D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3>REF(E3,1);{找出全部?期高?}A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1)<REF(L,REF(BARSLAST(LD),1)+2+REF(BARSLAST( LD),REF(BARSLAST(LD),1)+2));D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);LL:=E4>REF(E4,1);DRAWICON(HH,H,2); DRAWICON(LL,L,1);H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1;X3:=REF(BARSLAST(H3),1)+1; F3:=BACKSET(H3 ANDCOUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));G3:=F3>REF(F3,1); I3:=BACKSET(G3,2); LZ:=I3>REF(I3,1);L4:=LZ OR ISLASTBAR OR BARSCOUNT(C)=1;X4:=REF(BARSLAST(L4),1)+1; F4:=BACKSET(L4 ANDCOUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));G4:=F4>REF(F4,1); I4:=BACKSET(G4,2); HZ:=I4>REF(I4,1);DRAWLINE(HZ,H,LZ,L,0),COLORGREEN,LINETHICK1;DRAWLINE(LZ,L,HZ,H,0),COLORGREEN,LINETHICK1;K1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HZ),BARSLAST(LZ))+1); K2:=K1>REF(K1,1); DRAWLINE(K2,IF(HZ,H,L),ISLASTBAR,C,0),COLORGREEN,LINETHICK1;UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;AA:=BARSLAST(HD);BB:=BARSLAST(LD);DRAWNUMBER(LD,L*0.992,AA),COLORGREEN;DRAWNUMBER(HD,H*1.013,BB),COLORRED;STICKLINE(LD,1.015*H,0.98*L,0,-1),COLORYELLOW;{VERTLINE(LD),POINTDOT;VVV:REF(SUM(V,SUMBARS(LD=1,2)),BARSLAST(LD=1)),LINETHICK0;};。

通达信指标公式源码(MA均线)主图指标

通达信指标公式源码(MA均线)主图指标

(MA均线)主图指标M5:MA(C,5),COLORWHITE;M10:MA(C,10),COLORYELLOW;M20:MA(C,20),COLORCYAN;M60:MA(C,60),COLORGREEN,LINETHICK2;M120:MA(C,120),COLORRED,LINETHICK2;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;JRH:=HHV(C,2);JRL:=LLV(C,2);VAR01:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));VAR02:=(REF(VAR01,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR03:=(REF(VAR02,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR04:=(REF(VAR03,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR05:=(REF(VAR04,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR06:=(REF(VAR05,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR07:=(REF(VAR06,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR08:=(REF(VAR07,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR09:=(REF(VAR08,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARA:=(REF(VAR09,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2)); {} VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR010:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR011:=(REF(VAR010,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR012:=(REF(VAR011,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR013:=(REF(VAR012,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR014:=(REF(VAR013,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR015:=(REF(VAR014,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR016:=(REF(VAR015,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR017:=(REF(VAR016,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR018:=(REF(VAR017,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR019:=((REF(VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR01);VAR1A:=((REF(VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,1)) AND VARD);红色持股:=VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;青色观望:=VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);今离场价:REF(离场,1),COLOR0000FF,NODRAW;明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORGREEN,NODRAW;上涨家数:INDEXADV,COLOR0080FF,NODRAW;下跌家数:INDEXDEC,COLORGREEN,NODRAW;DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR00FFFF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0); 主力进:=(超B)+(大B),NODRAW;主力出:=(超S)+(大S),NODRAW;小散进:=(中B)+(小B),NODRAW;小散出:=(中S)+(小S),NODRAW;DAZHIV:=CONST(MAX(ABS(主力进),MAX(ABS(主力出),MAX(ABS(小散进),ABS(小散出))))),NODRAW;DRAWRECTREL(0,CONST(940-(ABS(主力进)*250/DAZHIV)),30,960,IF(CONST(主力进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(32,CONST(940-(ABS(主力出)*250/DAZHIV)),62,960,IF(CONST(主力出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(70,CONST(940-(ABS(小散进)*250/DAZHIV)),100,960,IF(CONST(小散进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(102,CONST(940-(ABS(小散出)*250/DAZHIV)),132,960,IF(CONST(小散出>0),RGB(23,125,255),RGB(255,0,0)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0001,0.9,0,STRCAT('',CON2STR(主力进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,0.9,0,STRCAT('',CON2STR(主力出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,STRCAT('',CON2STR(小散进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.101,0.9,0,STRCAT('',CON2STR(小散出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,1,0,'(X10万元)'),COLOR00FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1,0,1,0,'主进出'),COLORCYAN;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.09,1,0,'散进出'),COLORCYAN;主力买力度:=LARGEINTRDVOL*1000/VOL;主力卖力度:=LARGEOUTTRDVOL*1000/VOL;AAD:=CONST(MAX(ABS(主力买力度),ABS(主力卖力度)))*4,NODRAW; DRAWRECTREL(0,515,CONST(ABS(主力买力度)*500/AAD),568,IF(CONST(主力买力度)>0,RGB(255,0,0),RGB(0,50,0)));DRAWRECTREL(0,570,CONST(ABS(主力卖力度)*500/AAD),623,IF(CONST(主力卖力度)>0,RGB(0,50,0),RGB(255,0,0)));DRAWTEXT_FIX(1,0,0.524,0,STRCAT('主买力度:',CON2STR(主力买力度,0))),COLORYELLOW;DRAWTEXT_FIX(1,0,0.576,0,STRCAT('主卖力度:',CON2STR(主力卖力度,0))),COLORYELLOW;VAR111:=ZIG(3,13);STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 <REF(VAR111,1)),CLOSE,OPEN,3,0),COLOR66FF00;DRAWTEXT_FIX(STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,5,0),0.00,0.11,0,''),COLOR00FF00,LINETHICK1;VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) -LLV(LOW,5))),34));F:IF(CROSS(VAR200,MA(VAR300,5)),LOW *0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;年:MA(CLOSE,22),LINETHICK2,COLORWHITE;MAA5:MA(C,5),COLORFF00FF,LINETHICK2;MAA10:=MA(C,10);MAA30:MA(C,30),COLORRED;KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;A4:=SMA(A3,3,1);A5:=SMA(A4,3,1);A6:=3*A4-2*A5;A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟党走'),COLORYELLOW; STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,100,0),COLORWHITE; DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95);。

通达信指标公式源码 主图趋势画线 源码主图

通达信指标公式源码 主图趋势画线 源码主图

JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2 AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T;VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; 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),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。

通达信指标公式源码 很准主图 源码

通达信指标公式源码 很准主图 源码

源码如下:上线:=SMA(C,6.5,1);下线:=SMA(C,13.5,1);上线1:=SMA(C,3,1);下线1:=SMA(C,8,1);{STICKLINE(上线>下线, 上线,下线,0.1, 0),COLORRED,LINETHICK1; STICKLINE(下线>上线,上线,下线,0.1,0),COLORYELLOW,LINETHICK1;} DRAWTEXT( CROSS(上线,下线),LOW *0.98,'.全仓买'),COLOR00FF00; DRAWTEXT(CROSS(下线1,上线1),H*1.02,'.清仓'),COLORYELLOW;BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; UPR:=BBI+3*STD(BBI,13),LINETHICK2;DWN:=BBI-3*STD(BBI,13);安全:=MA(CLOSE,60),LINETHICK2;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; DRAWTEXT( CROSS(82,RSI) , HIGH*1.02,'减仓') ,COLORFF9966,LINETHICK2; A7:=(2*C+H+L)/4;操作:MA(A7,5),LINETHICK2;操作1:=MA(A7,5)*1.03,LINETHICK2;操作2:=MA(A7,5)*0.97,LINETHICK2;VAR1:=LLV(A7,21);VAR2:=HHV(A7,21);SK:=EMA((A7-VAR1)/(VAR2-VAR1)*100,7);SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>6/10 ANDVOL>=1.5*MA(VOL,5) ANDCOUNT(SK>=SD,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW*0.98,'.买进') ,COLOR0099FF;DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/13>6/10 ANDCOUNT(SK>SD,6) AND REF(LOW,5)=LLV(LOW,120) ANDREF(CLOSE>=OPEN,4) ANDREF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) ANDOPEN>REF(CLOSE,1),1,0),LOW*0.98,'.买进') ,COLORYELLOW;D:=MA(CLOSE,80)-MA(CLOSE,10)/3;DRAWTEXT(IF(CLOSE<D AND VOL/240>MA(VOL,5)/240 ANDCLOSE>REF(CLOSE,1)*1.08AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW*0.98,'.抄底'),COLORYELLOW; STICKLINE( MA(CLOSE,8)>MA(CLOSE,30),MA(CLOSE,8),MA(CLOSE,30),8,0),C OLOR000088;STICKLINE( MA(CLOSE,8)<MA(CLOSE,30),MA(CLOSE,8),MA(CLOSE,30),8,0),C OLOR008800;DRAWKLINE(H,O,L,C);MA5:MA(CLOSE,5),COLORWHITE,LINETHICK2;MA8:MA(CLOSE,8),COLORFF9966,LINETHICK2;MA30:MA(CLOSE,30),COLORGREEN,LINETHICK2;。

通达信指标公式源码自动画线主图指标公式

通达信指标公式源码自动画线主图指标公式

通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T; VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; 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),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) ANDCLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。

成本均线指标原理、用法及源代码(ZNZ

成本均线指标原理、用法及源代码(ZNZ

成本均线指标原理、用法及源代码(ZNZ成本均线(CYC)在计算中考虑了成交量的作用,可以真实的反应最后的持股人的成本。

CYC指标分5日、13日、34日及(无穷)四条线,前三条线为市场交易中大盘或某只个股最近该日内买入股票者的平均建仓成本,线是大盘或某只个股所有持筹者的平均建仓成本。

分类成本均线(CYC)在计算中考虑了成交量的作用,可以真实的反应最后的持股人的成本。

CYC指标分5日、13日、34日及∞(无穷)四条线,前三条线为市场交易中大盘或某只个股最近该日内买入股票者的平均建仓成本,∞线是大盘或某只个股所有持筹者的平均建仓成本。

分类该线还分日线、周线及月线。

5日、13日、34日成本均线分别代表5日、13日、34日的市场平均建仓成本。

如某日13日成本均线为10.2元,表示13日以来买入该只股票的人平均成本为10.2元。

无限长的成本均线则表示市场上所有的股票的平均建仓成本。

成本均线比用移动平均线作为一段时间的平均成本要准确,所以比移动均线的表现要好。

比如,成本均线的多头或空头排列相当稳定,在行情没有反转之前,出现的假交叉要比移动均线少得多;成本均线表现出明显的支撑和压力作用,尤其是34日成本均线和∞成本均线,其支撑压力作用更为明显。

指标源代码:a:=MONEY/(VOL);短线:MA(a,n1);中线:MA(a,n2);长线:MA(a,n3);无穷:DMA_(CLOSE,VOL/SHGZG)基本原理成本均线中最重要的一条是∞成本均线,它是市场牛熊的重要分水岭,股价在此之上,市场在玩追涨游戏,是牛市;股价在此之下,市场在玩割肉游戏,是熊市。

∞成本均线的速率相当稳定,相比之下,有限时间的移动均线都有随行情波动不够稳定的特点。

∞成本均线的支撑和压力作用很显著,在熊市中可以明显看到∞成本均线构成了一次一次反弹的高点,直到它最终被一轮有力的带量上涨突破,才宣告熊市结束。

在牛市中,∞成本均线很难被短期回调打穿,成为明显的支撑;而当股价最终跌破这条线的时候则常常是最后的出逃机会,必须立刻清仓。

通达信CYC成本均线主图源码贴图

通达信CYC成本均线主图源码贴图

通达信CYC成本均线主图源码贴图通达信CYC成本均线主图源码贴图PC:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYN AINFO(8),DYNAINFO(3));DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01)&& JJJ>(DYNAINFO(6)-0.01)));CYC5:IF(JJJT,0.01*EXPMA(AMOUNT,5)/EXPMA(AMOUNT/(100*PC),5),EMA((HIGH+LOW+CLOSE)/3,5));CYC13:IF(JJJT,0.01*EXPMA(AMOUNT,13)/EXPMA(AMO UNT/(100*PC),13),EMA((HIGH+LOW+CLOSE)/3,13));CYC34:IF(JJJT,0.01*EXPMA(AMOUNT,34)/EXPMA(AMO UNT/(100*PC),34),EMA((HIGH+LOW+CLOSE)/3,34));CYC500:IF(JJJT,0.01*EXPMA(AMOUNT,500)/EXPMA(A MOUNT/(100*PC),500),EMA((HIGH+LOW+CLOSE)/3,500 )),COL ORRED;CYC∞:IF(JJJT,DMA(PC,100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120)),COLORGREEN;倍量:=VOL>=REF(V,1)*1.91 AND C>O;缩量:=REF(V,1)>=VOL*1.91 AND C<O; STICKLINE(倍量,OPEN,CLOSE,2,0),COLORRED; STICKLINE(缩量,OPEN,CLOSE,2,0),COLORGREEN;C2:=REF(C,1);涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;筹码峰值均价:SSRP.SSRP,COLOR40408F,LINETHICK1,COLORYE LLOW,CROSSDOT; DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLOR0000FF;DRAWTEXT_FIX(1,0.07,0.00,0,EXTERNSTR(0,1))COLOR0000FF;DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:'),COLORMAGENTA;DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2)),COLO RMAGENTA;DRAWTEXT_FIX(C>0,0.00,0.16,0,STRCAT('所属概念:',GNBLOCK)),COLORYELLOW;DRAWTEXT_FIX(C>0,0.00,0.24,0,STRCAT('所属行业:',HYBLOCK)),COLORYELLOW; GJ:=(C+H+L+O)/4;明阻:=L+(GJ-L)+(C-L)+0.03;明撑:=L+(C-GJ)+0.01;今阻:REF(明阻, 1),NODRAW;今撑:REF(明撑, 1),NODRAW;KLH:=IF( PERIOD=5,0.015,0);前天均价:=REF(AMOUNT,1)/REF(VOL*100,1),LINETHICK0;STICKLINE(CURRBARSCOUNT=1,今阻+KLH,今阻,6,0),COLORGREEN;STICKLINE(CURRBARSCOUNT=1,今撑,今撑-KLH,6,0),COLORRED;。

无语通达信CCYY主图源码附图(筹码重心)

无语通达信CCYY主图源码附图(筹码重心)

无语通达信CCYY主图源码附图(筹码重心)无语通达信CCYY主图源码附图(筹码重心)筹码重心N:=10;T1:=CONST(LLVBARS(LOW,N));T1HIGH:=CONST(REF(HIGH,T1));CC:=CONST(CURRBARSCOUNT);T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));T2HIGH:=CONST(REF(HIGH,T2));T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));T3HIGH:=CONST(REF(HIGH,T3));必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK3,COLOR0000FF;DRAWTEXT(ISLASTBAR, T3HIGH, 必杀线)LINETHICK1,COLORYELLOW;筹码重心:IF(CURRBARSCOUNT<INTPART(PPART(4)*100/2),CONST(COS TEX(REF(C,3),REF(C,4)))*1.03,DRAWNULL),COLORF7F7F7;DRAWTEXT(CURRBARSCOUNT<4 AND CROSS(C,筹码重心) AND C/REF(C,1)>1.05,L,---突破筹码重心买进!),COLORMAGENTA;DRAWTEXT(筹码重心 AND ISLASTBAR,筹码重心*0.99,↖筹码重心),COLORF7F7F7;P:=21;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+21,CONST(IF(WH6=0,H,REF(H, WH6))),DRAWNULL),COLORRED;IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L,DRAWNULL) ,DRAWNULL),CIRCLEDOT,COLORRED;DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,进场线),COLORRED;超跌进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,REF(H, WH4))),DRAWNULL),COLORCB21BE;DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),超跌进场,超跌进场线),COLORCB21BE;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+21,CONST(IF(H6=0,L,REF(L,H6))), DRAWNULL),COLORYELLOW;IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H,DRAWNULL ),DRAWNULL),CIRCLEDOT,COLORBLUE;DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止损,止损线),COLORYELLOW;止盈:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H4=0,L,REF(L,H4))), DRAWNULL),COLORCB21BE;DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止盈,止盈线),COLORCB21BE;。

自动画线指标通达信主图指标源码贴图

自动画线指标通达信主图指标源码贴图

自动画线指标通达信主图指标源码贴图N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAK BARS(1,K*N1,1);WP2:=PEAK BARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGH BARS(2,K*N2,1);WT2:=TROUGH BARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF( BARSLAST(TJ4),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COL ORLIRED;中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COL ORLIGREEN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLO RRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLO RGREEN;}趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);{} 高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT((D1 AND E1<E2)));H2:=D1 AND NOT((D2 AND E1>=E2));X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHI CK1;DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHI CK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(L D))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BAR SLAST(LD),H,L),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。

成本分布指标通达信指标公式源码

成本分布指标通达信指标公式源码

成本分布指标通达信指标公式源码成本分布指标(主图源码说明)成本分布指标对于分析支撑和阻力位置很有用,很直观.但使用系统自带的指标时,要用鼠标点击一下才能切换到那个界面,很麻烦.论坛上也曾经有在主图中迭加的成本分布指标,用以简化操作.但可惜不准确,与系统自带的指标差异较大,缺乏使用价值,而且使主图界面复杂,影响对K线的观察和分析.本贴发布的这个指标原理正确,精度够用,与系统自带的指标基本一致.而且只在当天的K线区显示一个兰色的矩形条,矩形条中有一些横线,用以反应当天的成本分布状态.这样便既能方便地看到当天的正确的成本分布情况,又基本上不对主图界面构成影响.完全没必要去看系统自带的指标了.指标的原理为:兰色的矩形条由底到顶对应于从0.1%到99.9%的筹码分布区间,每二条横线间的区间均为2%的筹码,横线越密集说明筹码越集中,最密集的地方就是筹码峰所在地.有一条横线是兰色的,对应50%筹码处.本指标只反应当天的成本分布情况,不能看历史的成本分布情况.指标的精度处决于对矩形的等分数,越多越精确,但代码行数就越多,电脑运行就越慢.综合权衡精度和速度后,本指标设置为50等分.本指标成本分布区间为0.1%到99.9%,不是0到100%,这是因为设置为0到100%后那个兰色矩形就不显示了,其原因应该是系统的成本分布函数取值范围限定不能为0和100所致.这对指标的正确性和精度都不构成影响.大家只需把下载的代码中最后一句不要,其余的全部复制后粘贴在你常用的主图指标代码的最前面即可.(一定要放在最前面,否则兰色的矩形条会挡住当天的K线和指标线的.)几张附图为与系统成本分布指标对照结果.成本100:=COST(99.9);成本98:=COST(98);成本94:=COST(94); 成本92:=COST(92); 成本90:=COST(90); 成本88:=COST(88); 成本86:=COST(86); 成本84:=COST(84); 成本82:=COST(82); 成本80:=COST(80); 成本78:=COST(78); 成本76:=COST(76); 成本74:=COST(74); 成本72:=COST(72); 成本70:=COST(70); 成本68:=COST(68); 成本66:=COST(66); 成本64:=COST(64); 成本62:=COST(62); 成本60:=COST(60); 成本58:=COST(58); 成本56:=COST(56); 成本54:=COST(54); 成本52:=COST(52); 成本50:=COST(50); 成本48:=COST(48); 成本46:=COST(46); 成本44:=COST(44); 成本42:=COST(42); 成本40:=COST(40); 成本38:=COST(38);成本34:=COST(34);成本32:=COST(32);成本30:=COST(30);成本28:=COST(28);成本26:=COST(26);成本24:=COST(24);成本22:=COST(22);成本20:=COST(20);成本18:=COST(18);成本16:=COST(16);成本14:=COST(14);成本12:=COST(12);成本10:=COST(10);成本8:=COST(8);成本6:=COST(6);成本4:=COST(4);成本2:=COST(2);成本0:=COST(0.1);STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本0,成本100,12,0),COLORFF0000; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本98,成本98,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本96,成本96,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本94,成本94,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本92,成本92,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本90,成本90,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本88,成本88,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 ANDSTICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本84,成本84,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本82,成本82,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本80,成本80,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本78,成本78,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本76,成本76,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本74,成本74,12,0),COLOR888888;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本72,成本72,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本70,成本70,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本68,成本68,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本66,成本66,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本64,成本64,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本62,成本62,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本60,成本60,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本58,成本58,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本56,成本56,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本54,成本54,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本52,成本52,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本50,成本50,12,0),COLORFFFF00; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本48,成本48,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 ANDSTICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本44,成本44,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本42,成本42,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本40,成本40,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本38,成本38,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本36,成本36,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本34,成本34,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本32,成本32,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本30,成本30,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本28,成本28,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本26,成本26,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本24,成本24,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本22,成本22,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本20,成本20,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本18,成本18,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本16,成本16,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本14,成本14,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本12,成本12,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本10,成本10,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本8,成本8,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 ANDSTICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本4,成本4,12,0),COLOR888888; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,成本2,成本2,12,0),COLOR888888; DRAWKLINE(H,O,L,C);。

通达信指标公式源码 成本分布 插入主图使用

通达信指标公式源码 成本分布 插入主图使用

HB:=COST(99.9); LB:=COST(0.1); B3:=(HB-LB)/50; B31:=HB-B3;B32:=HB-2*B3; B33:=HB-3*B3; B34:=HB-4*B3; B35:=HB-5*B3; B36:=HB-6*B3; B37:=HB-7*B3; B38:=HB-8*B3; B39:=HB-9*B3; B310:=HB-10*B3; B311:=HB-11*B3; B312:=HB-12*B3; B313:=HB-13*B3; B314:=HB-14*B3; B315:=HB-15*B3; B316:=HB-16*B3; B317:=HB-17*B3; B318:=HB-18*B3; B319:=HB-19*B3; B320:=HB-20*B3; B321:=HB-21*B3; B322:=HB-22*B3; B323:=HB-23*B3; B324:=HB-24*B3; B325:=HB-25*B3;B326:=HB-26*B3;B327:=HB-27*B3;B328:=HB-28*B3;B329:=HB-29*B3;B330:=HB-30*B3;B331:=HB-31*B3;B332:=HB-32*B3;B333:=HB-33*B3;B334:=HB-34*B3;B335:=HB-35*B3;B336:=HB-36*B3;B337:=HB-37*B3;B338:=HB-38*B3;B339:=HB-39*B3;B340:=HB-40*B3;B341:=HB-41*B3;B342:=HB-42*B3;B343:=HB-43*B3;B344:=HB-44*B3;B345:=HB-45*B3;B346:=HB-46*B3;B347:=HB-47*B3;B348:=HB-48*B3;B349:=HB-49*B3;A1:=WINNER(HB)*100-WINNER(B31)*100;A2:=WINNER(B31)*100-WINNER(B32)*100;A3:=WINNER(B32)*100-WINNER(B33)*100;A4:=WINNER(B33)*100-WINNER(B34)*100;A5:=WINNER(B34)*100-WINNER(B35)*100;A6:=WINNER(B35)*100-WINNER(B36)*100;A7:=WINNER(B36)*100-WINNER(B37)*100;A8:=WINNER(B37)*100-WINNER(B38)*100;A9:=WINNER(B38)*100-WINNER(B39)*100;A10:=WINNER(B39)*100-WINNER(B310)*100; A11:=WINNER(B310)*100-WINNER(B311)*100; A12:=WINNER(B311)*100-WINNER(B312)*100; A13:=WINNER(B312)*100-WINNER(B313)*100; A14:=WINNER(B313)*100-WINNER(B314)*100; A15:=WINNER(B314)*100-WINNER(B315)*100; A16:=WINNER(B315)*100-WINNER(B316)*100; A17:=WINNER(B316)*100-WINNER(B317)*100; A18:=WINNER(B317)*100-WINNER(B318)*100; A19:=WINNER(B318)*100-WINNER(B319)*100; A20:=WINNER(B319)*100-WINNER(B320)*100;A21:=WINNER(B320)*100-WINNER(B321)*100;A22:=WINNER(B321)*100-WINNER(B322)*100;A23:=WINNER(B322)*100-WINNER(B323)*100;A24:=WINNER(B323)*100-WINNER(B324)*100;A25:=WINNER(B324)*100-WINNER(B325)*100;A26:=WINNER(B325)*100-WINNER(B326)*100;A27:=WINNER(B326)*100-WINNER(B327)*100;A28:=WINNER(B327)*100-WINNER(B328)*100;A29:=WINNER(B328)*100-WINNER(B329)*100;A30:=WINNER(B329)*100-WINNER(B330)*100;A31:=WINNER(B330)*100-WINNER(B331)*100;A32:=WINNER(B331)*100-WINNER(B332)*100;A33:=WINNER(B332)*100-WINNER(B333)*100;A34:=WINNER(B333)*100-WINNER(B334)*100;A35:=WINNER(B334)*100-WINNER(B335)*100;A36:=WINNER(B335)*100-WINNER(B336)*100;A37:=WINNER(B336)*100-WINNER(B337)*100;A38:=WINNER(B337)*100-WINNER(B338)*100;A39:=WINNER(B338)*100-WINNER(B339)*100;A40:=WINNER(B339)*100-WINNER(B340)*100;A41:=WINNER(B340)*100-WINNER(B341)*100;A42:=WINNER(B341)*100-WINNER(B342)*100;A43:=WINNER(B342)*100-WINNER(B343)*100;A44:=WINNER(B343)*100-WINNER(B344)*100;A45:=WINNER(B344)*100-WINNER(B345)*100;A46:=WINNER(B345)*100-WINNER(B346)*100;A47:=WINNER(B346)*100-WINNER(B347)*100;A48:=WINNER(B347)*100-WINNER(B348)*100;A49:=WINNER(B348)*100-WINNER(B349)*100;A50:=WINNER(B349)*100-WINNER(LB)*100;STICKLINE(ISLASTBAR,HB ,HB ,A1*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B31 ,B31 ,A1*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B32 ,B32 ,A2*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B33 ,B33 ,A3*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B34 ,B34 ,A4*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B35 ,B35 ,A5*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B36 ,B36 ,A6*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B37 ,B37 ,A7*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B38 ,B38 ,A8*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B39 ,B39 ,A9*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B310 ,B310 ,A10*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B311 ,B311 ,A11*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B312 ,B312 ,A12*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B313 ,B313 ,A13*50 ,0 ),COLORYELLOW;STICKLINE(ISLASTBAR,B314 ,B314 ,A14*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B315 ,B315 ,A15*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B316 ,B316 ,A16*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B317 ,B317 ,A17*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B318 ,B318 ,A18*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B319 ,B319 ,A19*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B320 ,B320 ,A20*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B321 ,B321 ,A21*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B322 ,B322 ,A22*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B323 ,B323 ,A23*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B324 ,B324 ,A24*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B325 ,B325 ,A25*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B326 ,B326 ,A26*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B327 ,B327 ,A27*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B328 ,B328 ,A28*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B329 ,B329 ,A29*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B330 ,B330 ,A30*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B331 ,B331 ,A31*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B332 ,B332 ,A32*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B333 ,B333 ,A33*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B334 ,B334 ,A34*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B335 ,B335 ,A35*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B336 ,B336 ,A36*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B337 ,B337 ,A37*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B338 ,B338 ,A38*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B339 ,B339 ,A39*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B340 ,B340 ,A40*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B341 ,B341 ,A41*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B342 ,B342 ,A42*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B343 ,B343 ,A43*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B344 ,B344 ,A44*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B345 ,B345 ,A45*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B346 ,B346 ,A46*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B347 ,B347 ,A47*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B348 ,B348 ,A48*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,LB ,LB ,A50*50 ,0 ),COLORYELLOW;。

通达信指标组合套装(一主图三副图,源码,贴图)

通达信指标组合套装(一主图三副图,源码,贴图)

通达信指标组合套装(一主图三副图,源码,贴图)该指标不仅镶嵌了均线系统、成交量、MACD、KDJ四个指标,在均线系统里又增加了60日均线和250日均线,绝大多数黑码股在启动之初,其股价在放量上穿30日或60日均线,并在它们上方带量运行一段时间后,在向下滑落过程中一般都会受30、60日均线的有力支撑,从而形成更为有力的涨升行情。

30日均线能有如此神秘的力量,正是它是中短期和中长期均线系统的结合点。

60日均线之所以也能有如此神秘的力量也决非偶然,其中也更隐藏着更为重大的战略意义,那就是绝大多数已被主力控制很深业以完成总体建仓的股票,主力大多会在拉升行情启动之前,再来一次紧急而迅速的集中建仓或增仓,且时间都控制在三个月左右。

所以起涨点恰巧都落在60日均线上。

250均线又称年线,反映的是长期趋势,有牛熊线之称,股价只有站上年线才能具备产生黑码和大牛股的基础。

所以,该指标兼备了既可对短期、又能对中长期趋势进行分析的指标。

只要镶嵌的四个指标有两个共振就会发出图标信号。

按照确认“主升浪”行情的标准,这个指标镶嵌了多空指数(EBBI)、3、7、21、54日平滑移动均线、MACD、三个指标与KDJ 的组合,当具备“主升浪”行情标准时,在KDJ指标坐标线0--10的位置上显示黄色柱,只要其中某个指标空头排列,黄柱消失,也就是主升浪结束。

由于这三个副图指标都增加了金叉信号(红色箭头),在四图组合画面里可以非常方便的识别出主图指标出现的图标信号是哪几个指标共振金叉。

应该注意的是:上面3 个副图指标不要在系统自带的指标里改编,因为每次启动后都会恢复原有的指标。

上面的一主三副指标如果设在一张四图组合画面里,我们可以同时用到七个指标,这对于在每个视角,每个方位分析盘面已经足够了{自用VOL}VOLUME:VOL,VOLSTICK;MAVOL5:MA(VOLUME,5);MAVOL10:MA(VOLUME,10),COLOR00FF00;DRAWICON(CROSS(MAVOL5,MAVOL10),0,1);{1号图标显示红箭头}{自用MACD}DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORWHITE;DEA:EMA(DIFF,9),COLORYELLOW;MACD:2*(DIFF-DEA),COLORSTICK;DRAWICON(CROSS(DIFF,DEA),0,1);{1号图标显示红箭头}{自用KDJ }RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:SMA(RSV,9,1);D:SMA(K,9,1);J:3*K-2*D;BBI:=(EMA(CLOSE,3)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA( CLOSE,24))/4;EBBI:=(EMA(C,6)+EMA(C,18)+EMA(C,54)+EMA(C,162))/4;FF1:=EMA(C,3)>EMA(C,7) AND EMA(C,7)>EMA(C,21) AND EMA(C,21)>EMA(C,54);DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);主升浪:IF(BBI>EBBI AND FF1 AND DIFF>DEA,10,0),COLORYELLOW,POINTDOT;STICKLINE(主升浪,10,0,1,1),COLORYELLOW;DRAWICON(CROSS(K,D) AND CROSS(J,D),10,1);{1号图标显示红箭头}。

筹码均线通达信源码主图附图

筹码均线通达信源码主图附图

筹码均线通达信源码主图附图{成本火力}AP1:=AMOUNT/(VOL*1000);AP2:=(O+H+L+C)/4;YES:=AP1>H OR AP1<L;AMT:=IF(YES,AP2*VOL*1000,AMOUNT);CB3:=SUM(AMT,3)/SUM(VOL,3)/100;CB5:=SUM(AMT,5)/SUM(VOL,5)/100;CB8:=SUM(AMT,8)/SUM(VOL,8)/100;CB13:=SUM(AMT,13)/SUM(VOL,13)/100;CB21:=SUM(AMT,21)/SUM(VOL,21)/100;CB34:=SUM(AMT,34)/SUM(VOL,34)/100;CB55:=SUM(AMT,55)/SUM(VOL,55)/100;CB89:=SUM(AMT,89)/SUM(VOL,89)/100;CB144:=SUM(AMT,144)/SUM(VOL,144)/100;CB233:=SUM(AMT,233)/SUM(VOL,233)/100;CB377:=SUM(AMT,377)/SUM(VOL,377)/100;CB610:=SUM(AMT,610)/SUM(VOL,610)/100;短期成本:(CB8+CB13+CB21)/3,POINTDOT,LINETHICK2;中期成本:(CB34+CB55+CB89)/3,POINTDOT,LINETHICK2;长期成本:(CB144+CB233+CB377)/3,POINTDOT,LINETHICK2; 平均成本:=(短期成本+中期成本+长期成本)/3,LINETHICK2;获利20:长期成本*0.191+长期成本,POINTDOT;获利30:长期成本*0.382+长期成本,POINTDOT;亏损20:长期成本-(长期成本*0.191),POINTDOT;亏损30:长期成本-(长期成本*0.382),POINTDOT;牛市启动:EMA(COST(72),21),LINETHICK2,COLORYELLOW; 牛市成本:EMA(COST(34),3),POINTDOT,COLORYELLOW;2.AP1:=AMOUNT/(CAPITAL);AP2:=(O+H+L+C)/4;YES:=AP1>=H OR AP1<=L;AMT:=IF(YES,AP2*CAPITAL,AMOUNT);CB6:=SUM(AMT,6)/SUM(VOL,6)/100;CB13:=SUM(AMT,13)/SUM(VOL,13)/100;CB21:=SUM(AMT,21)/SUM(VOL,21)/100;CB34:=SUM(AMT,34)/SUM(VOL,34)/100;CB55:=SUM(AMT,55)/SUM(VOL,55)/100;CB89:=SUM(AMT,89)/SUM(VOL,89)/100;CB144:=SUM(AMT,144)/SUM(VOL,144)/100;CB233:=SUM(AMT,233)/SUM(VOL,233)/100;CB377:=SUM(AMT,377)/SUM(VOL,377)/100;短期成本:(CB6+CB13+CB21)/3;中期成本:(CB34+CB55+CB89)/3,COLORRED;长期成本:=(CB144+CB233+CB377)/3;平均成本:=(短期成本+中期成本+长期成本)/3;启动:EMA(COST(71),21),COLORGREEN;牛市成本:EMA(COST(34),3),COLORWHITE,LINETHICK2;牛市启动:EMA(COST(81),30),COLORYELLOW;[本帖最后由昆卡船长于 2015-2-3 14:31 编辑]{成本获利主图}STICKLINE(18,100,0,5,0),COLORBLUE;DRAWKLINE(INDEXO,INDEXH,INDEXL,INDEXC); DRAWKLINE(H,O,L,C);{========================额外==========================}Z1:=STRCAT(DYBLOCK,' ');Z2:=STRCAT(Z1,HYBLOCK);Z3:=STRCAT(Z2,' ');Z4:=STRCAT(Z3,GNBLOCK);Z5:=STRCAT(Z4,' ');Z6:=STRCAT(Z5,FGBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOC K)),COLORCYAN;DRAWTEXT_FIX(1,0,0.075,0,STRCAT('【所属板块】:',ZDBLOCK)),COLORYELLOW;{====================================== ================};AP1:=AMOUNT/(VOL*1000);AP2:=(O+H+L+C)/4;YES:=AP1>H OR AP1<L;AMT:=IF(YES,AP2*VOL*1000,AMOUNT);CB3:=SUM(AMT,3)/SUM(VOL,3)/100;CB5:=SUM(AMT,5)/SUM(VOL,5)/100;CB8:=SUM(AMT,8)/SUM(VOL,8)/100;CB13:=SUM(AMT,13)/SUM(VOL,13)/100;CB21:=SUM(AMT,21)/SUM(VOL,21)/100;CB34:=SUM(AMT,34)/SUM(VOL,34)/100;CB55:=SUM(AMT,55)/SUM(VOL,55)/100;CB89:=SUM(AMT,89)/SUM(VOL,89)/100;CB144:=SUM(AMT,144)/SUM(VOL,144)/100;CB233:=SUM(AMT,233)/SUM(VOL,233)/100;CB377:=SUM(AMT,377)/SUM(VOL,377)/100;CB610:=SUM(AMT,610)/SUM(VOL,610)/100;CB6:=SUM(AMT,6)/SUM(VOL,6)/100;短期成本:(CB8+CB13+CB21)/3,POINTDOT,LINETHICK2;中期成本:(CB34+CB55+CB89)/3,POINTDOT,LINETHICK2;长期成本:(CB144+CB233+CB377)/3,POINTDOT,LINETHICK2;短期成本1:(CB6+CB13+CB21)/3;中期成本1:(CB34+CB55+CB89)/3,COLORRED;长期成本1:=(CB144+CB233+CB377)/3;平均成本:=(短期成本+中期成本+长期成本)/3,LINETHICK2;获利20:长期成本*0.191+长期成本,POINTDOT;获利30:长期成本*0.382+长期成本,POINTDOT;亏损20:长期成本-(长期成本*0.191),POINTDOT;亏损30:长期成本-(长期成本*0.382),POINTDOT;成本3:EMA(COST(34),3),COLORRED,DOTLINE;启动21:EMA(COST(71),21),COLORGREEN,DOTLINE;启动30:EMA(COST(81),30),COLORYELLOW,DOTLINE;MA1:MA(CLOSE,1),COLORFF80FF,DOTLINE;DRAWICON(CROSS(成本3,启动30),启动30-0.05 ,5);DRAWTEXT(CROSS(成本3,启动30),启动30-0.05,'↖买'),COLORYELLOW;DRAWICON(CROSS(MA1,成本3),成本3-0.05 ,1);DRAWTEXT(CROSS(MA1,成本3),成本3-0.05,'↖买'),COLORYELLOW;DRAWICON(CROSS(MA1,启动21),启动21-0.05 ,1);DRAWTEXT(CROSS(MA1,启动21),启动21-0.05,'↖买'),COLORRED;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2.8,0),COLORFF5B00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2.5,0),COLORFF6C00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2.2,0),COLORFF7B00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2,0),COLORFF9C00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1.8,0),COLORFFBE00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1.5,0),COLORFFCC00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1,0),COLORFFFF00;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2.8,0),COLOR070084;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2.5,0),COLOR0000A3;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2.2,0),COLOR0000B7;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2,0),COLOR0000CD;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1.8,0),COLOR0000E9;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1.5,0),COLOR0754E9;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1.2,0),COLOR076EF3;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,0,0),COLOR077BF3;STICKLINE((CLOSE > OPEN),OPEN,LOW,0,0),COLOR0726CA;STICKLINE((CLOSE > OPEN),CLOSE,HIGH,0,0),COLOR0726CA;STICKLINE((OPEN > CLOSE),CLOSE,LOW,0,0),COLORDE9100;STICKLINE((OPEN > CLOSE),OPEN,HIGH,0,0),COLORDE9100;{跳空}STICKLINE(REF(L,1)>H,H,REF(L,1),5,0),COLORGRAY;STICKLINE(REF(H,1)<L,L,REF(H,1),5,0),COLORGRAY;涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0),COLORYELLOW;STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;{涨停}STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,3.5,-1),COLORYELLOW;{涨跌停K线}STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORYELLOW;三线成本3:=EMA(COST(34),3);启动21:=EMA(COST(71),21);启动30:=EMA(COST(81),30);MA1:=MA(CLOSE,1);多头排列:=启动30>启动21 AND 启动21>成本3;成本获利:CROSS(成本3,启动30) OR CROSS(MA1,成本3) OR CROSS(MA1,启动21) AND 多头排列;牛市成本获利ap1:=amount/(vol*volunit);ap2:=(o+h+l+c)/4;yes:=ap1>h or ap1<l;amt:=if(yes,ap2*vol*volunit,amount);CB3:=SUM(amt,3)/SUM(VOL,3)/100;CB5:=SUM(amt,5)/SUM(VOL,5)/100;CB8:=SUM(amt,8)/SUM(VOL,8)/100;CB21:=SUM(amt,21)/SUM(VOL,21)/100;CB34:=SUM(amt,34)/SUM(VOL,34)/100;CB55:=SUM(amt,55)/SUM(VOL,55)/100;CB89:=SUM(amt,89)/SUM(VOL,89)/100;CB144:=SUM(amt,144)/SUM(VOL,144)/100;CB233:=SUM(amt,233)/SUM(VOL,233)/100;CB377:=SUM(amt,377)/SUM(VOL,377)/100;CB610:=SUM(amt,610)/SUM(VOL,610)/100;短期成本:(CB8+CB13+CB21)/3,pointdot,linethick2;中期成本:(CB34+CB55+CB89)/3,pointdot,linethick2;长期成本:(CB144+CB233+CB377)/3,pointdot,linethick2; 平均成本:=(短期成本+中期成本+长期成本)/3,linethick2; 获利20:长期成本*0.191+长期成本,pointdot;获利30:长期成本*0.382+长期成本,pointdot;亏损20:长期成本-(长期成本*0.191),pointdot;亏损30:长期成本-(长期成本*0.382),pointdot;牛市启动:ema(cost(72),21),linethick2,COLORYELLOW; 牛市成本:ema(cost(34),3),pointdot,COLORYELLOW;{成本火力}ap1:=amount/(vol*volunit);ap2:=(o+h+l+c)/4;yes:=ap1>h or ap1<l;amt:=if(yes,ap2*vol*volunit,amount);CB3:=SUM(amt,3)/SUM(VOL,3)/100;CB5:=SUM(amt,5)/SUM(VOL,5)/100;CB8:=SUM(amt,8)/SUM(VOL,8)/100;CB13:=SUM(amt,13)/SUM(VOL,13)/100;CB21:=SUM(amt,21)/SUM(VOL,21)/100;CB55:=SUM(amt,55)/SUM(VOL,55)/100;CB89:=SUM(amt,89)/SUM(VOL,89)/100;CB144:=SUM(amt,144)/SUM(VOL,144)/100;CB233:=SUM(amt,233)/SUM(VOL,233)/100;CB377:=SUM(amt,377)/SUM(VOL,377)/100;CB610:=SUM(amt,610)/SUM(VOL,610)/100;短期成本:(CB8+CB13+CB21)/3,pointdot,linethick2;中期成本:(CB34+CB55+CB89)/3,pointdot,linethick2;长期成本:(CB144+CB233+CB377)/3,pointdot,linethick2; 平均成本:(短期成本+中期成本+长期成本)/3,linethick2;获利20:长期成本*0.191+长期成本,pointdot;获利30:长期成本*0.382+长期成本,pointdot;亏损20:长期成本-(长期成本*0.191),pointdot;亏损30:长期成本-(长期成本*0.382),pointdot;牛市启动:ema(cost(72),21),linethick2,COLORYELLOW; 牛市成本:ema(cost(34),3),pointdot,COLORYELLOW;筹码均线ap1:=amount/(vol*volunit);ap2:=(o+h+l+c)/4;yes:=ap1>=h or ap1<=l;amt:=if(yes,ap2*vol*volunit,amount);CB6:=SUM(amt,6)/SUM(VOL,6)/100;CB13:=SUM(amt,13)/SUM(VOL,13)/100;CB21:=SUM(amt,21)/SUM(VOL,21)/100;CB34:=SUM(amt,34)/SUM(VOL,34)/100;CB55:=SUM(amt,55)/SUM(VOL,55)/100;CB89:=SUM(amt,89)/SUM(VOL,89)/100;CB144:=SUM(amt,144)/SUM(VOL,144)/100;CB233:=SUM(amt,233)/SUM(VOL,233)/100; CB377:=SUM(amt,377)/SUM(VOL,377)/100;短期成本:(CB6+CB13+CB21)/3;中期成本:(CB34+CB55+CB89)/3,colorred;长期成本:=(CB144+CB233+CB377)/3;平均成本:=(短期成本+中期成本+长期成本)/3;启动:ema(cost(71),21),COLORgreen;牛市成本:ema(cost(34),3),COLORwhite,linethick2; 牛市启动:ema(cost(81),30),COLORyellow;嘻嘻,其实就三条线足够了。

通达信CYC成本均线

通达信CYC成本均线

通达信 CYC 成本均线的正确使用通达信 CYC技术分析非常重视成交量价关系,那么,如果传统的移动均线引入成交量的因素无疑会提高均线系统的可靠性。

指南针成本均线指标是个量价均发挥作用的均线,分别代表5日、13日、34日的市场平均建仓成本,因而也叫成本均线。

成本均线不容易造成虚假信号或骗线,比如某日股价无量暴涨,移动均线会大幅拉升,但成本均线却不会大幅上升,因为在无量的情况下市场持仓成本不会有太大的变化。

依据均线理论,当短期均线站在长期均线之上时叫多头排列,反之就叫空头排列。

短期均线上穿长期均线叫金叉,短期均线下穿长期均线叫死叉。

均线的多头排列是牛市的标志,空头排列是熊市的标志。

均线系统一直是市场广泛认可的简单而可靠的分析指标,起使用要点是尽量做多头排列的股票,回避空头排列的股票。

34日成本线是市场牛熊的重要的分水岭。

一旦股价跌破34日成本线,则常常是最后的出逃机会。

1、成本均线相当于市场上多空交战的分界线。

成本均线以下是多方的阵地,股价在成本均线以下时,是空方侵入了多方阵地,使持股的多头处于亏损状态。

股价在成本均线以上时,是多方侵入了空方的阵地,使持币的空头处于不利地位。

2、不同的成本均线可以看作是不同级别的多空交战的战线,无穷成本均线是市场整体上多空交战的战线,各短期成本均线是短期多空交战的局部战线。

股价对成本均线乖离的程度,是侵入对方阵地的程度,乖离越大侵入越深。

3、庄家在成本均线之下吸货吸的是割肉盘,表明庄家在考虑建仓成本,吸货还不太迫切,上涨一般会慢一些。

4、如庄家在成本均线之上吸货,则表明庄家愿意发给原持股人一定利润,以便尽快拿到筹码,这样的股票未来上涨会比较快、比较猛。

5、对平台吸货的庄家其刚一拉抬股价5日成本均线与无穷成本均线就相差10—20%左右,如庄家高度持仓则差的还要大些(相差20%就可界定为庄家高度持仓)。

6、股价上涨中成本均线发散上行是庄家巨量持仓,这种庄通常会以慢牛的行式将涨幅做的很大,出货时间也持续较长,做这种股可从容跟庄,做足波段待其实在不涨,庄家出货迹象明显时再离场。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

通达信CYC成本均线主图源码贴图
PC:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
JJJ:=IF(DYNAINFO(8)&gt;0.01,0.01*DYNAINFO(10)/DYN AINFO(8),DYNAINFO(3));
DDD:=(DYNAINFO(5)&lt;0.01 || DYNAINFO(6)&lt;0.01);
JJJT:=IF(DDD,1,(JJJ&lt;(DYNAINFO(5)+0.01)
&amp;&amp; JJJ&gt;(DYNAINFO(6)-0.01)));
CYC5:IF(JJJT,0.01*EXPMA(AMOUNT,5)/EXPMA(AMOU NT/(100*PC),5),EMA((HIGH+LOW+CLOSE)/3,5));
CYC13:IF(JJJT,0.01*EXPMA(AMOUNT,13)/EXPMA(AMO UNT/(100*PC),13),EMA((HIGH+LOW+CLOSE)/3,13));
CYC34:IF(JJJT,0.01*EXPMA(AMOUNT,34)/EXPMA(AMO UNT/(100*PC),34),EMA((HIGH+LOW+CLOSE)/3,34));
CYC500:IF(JJJT,0.01*EXPMA(AMOUNT,500)/EXPMA(A MOUNT/(100*PC),500),EMA((HIGH+LOW+CLOSE)/3,500 )),COLORRED;
CYC∞:IF(JJJT,DMA(PC,100*VOL/FINANCE(7)),EMA((HIG H+LOW+CLOSE)/3,120)),COLORGREEN;
倍量:=VOL&gt;=REF(V,1)*1.91 AND C&gt;O;
缩量:=REF(V,1)&gt;=VOL*1.91 AND C&lt;O; STICKLINE(倍量,OPEN,CLOSE,2,0),COLORRED; STICKLINE(缩量,OPEN,CLOSE,2,0),COLORGREEN;
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2&gt;=(10-0.01*100/C2),1,0);
跌停:=IF((C2-C)*100/C2&gt;=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
筹码峰值均
价:SSRP.SSRP,COLOR40408F,LINETHICK1,COLORYE LLOW,CROSSDOT; DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.00,0,EXTERNSTR(0,1))COLO R0000FF;
DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:
'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2)),COLO RMAGENTA;
DRAWTEXT_FIX(C&gt;0,0.00,0.16,0,STRCAT('所属概念:',GNBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(C&gt;0,0.00,0.24,0,STRCAT('所属行业:',HYBLOCK)),COLORYELLOW; GJ:=(C+H+L+O)/4;
明阻:=L+(GJ-L)+(C-L)+0.03;
明撑:=L+(C-GJ)+0.01;
今阻:REF(明阻, 1),NODRAW;
今撑:REF(明撑, 1),NODRAW;
KLH:=IF( PERIOD=5,0.015,0);
前天均
价:=REF(AMOUNT,1)/REF(VOL*100,1),LINETHICK0;
STICKLINE(CURRBARSCOUNT=1,今阻+KLH,今
阻,6,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,今撑,今撑
-KLH,6,0),COLORRED;。

相关文档
最新文档