通达信分时主图指标公式源码
综合分时主图源码 做T+0必备通达信指标公式源码
通达信综合分时主图源码做T+0必备这个公式指标是我综合了几个分时指标。
经修改加工而成,经试有一段时间,效果非常不错!现发出来与大家共同研究学习,共同担高。
指标标注非常清楚,除了极弊端行情,大部份时间是很有用的!现价:CLOSE,COLORFFFFFF,LINETHICK2;均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L11:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L11;阻力:L11+P1*7/8,COLOR00DD00;支撑:L11+P1*0.5/8,COLORMAGENTA;中:阻力*0.5+支撑*0.5,DOTLINE;STICKLINE(CROSS(支撑,现价),中,现价,2,0),COLORYELLOW,LINETHICK5;STICKLINE(CROSS(现价,阻力),现价,中,2,0),COLORFFCC66,LINETHICK5;DRAWTEXT(LONGCROSS(支撑,C,2),C,'--反弹'),COLORYELLOW;DRAWTEXT(LONGCROSS(C,阻力,2),C,'--出货'),COLORYELLOW;A1:=(DVOL/C)/2,NODRAW;A2:=SUM(IF(A1>100 AND CLOSE>REF(CLOSE,1),A1,0),0);A3:=SUM(IF(A1>100 AND CLOSE<REF(CLOSE,1),A1,0),0);A4:=SUM(IF(A1<100 AND CLOSE>REF(CLOSE,1),A1,0),0);A5:=SUM(IF(A1<100 AND CLOSE<REF(CLOSE,1),A1,0),0);A6:=A2+A3+A4+A5;A7:=IF((BARSTATUS=2),((100*A2)/A6),0);A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));机构买盘:=(A2),LINETHICK2;机构卖盘:=(A3),LINETHICK2;散户买盘:=(A4);散户卖盘:=(A5);机构买:=(A2),LINETHICK6,COLORRED;机构卖:=(A3),LINETHICK6,COLORGREEN;DD1:=1;AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%'); AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%'); AAA3:=STRCAT(STRCAT('净买入',CON2STR((100*(A2-A3))/A6,0)),'%'); DRAWTEXT_FIX(DD1=1,0,0.04,0,AAA1),COLORRED;DRAWTEXT_FIX(DD1=1,0,0.12,0,AAA2),COLORGREEN; DRAWTEXT_FIX(DD1=1,0,0.20,0,AAA3),COLOR00FFFF;A11:=C>REF(C,4);NT:=BARSLASTCOUNT(A11);TJ11:=NT=9;TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT; DRAWTEXT(AY>0,H*1.001,VAR2STR(AY,0)),COLORFF00FF; DRAWTEXT(NT=9,H*1.001,'9'),COLORGREEN;B1:=C<REF(C,4);NT0:=BARSLASTCOUNT(B1);TJ21:=NT0=9 ;TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;DRAWTEXT(AY1>0,L*0.999,VAR2STR(AY1,0)),COLORFF00FF;DRAWTEXT(NT0=9,L*0.999,'9'),COLORGREEN;ZRS:=CONST(DYNAINFO(3)),NODRAW;A12:=3.5*(EMA(CLOSE,48)-EMA(CLOSE,104))+ZRS,COLORLIMAGENTA;A22:=EMA(A12,36),COLORLIBLUE;MACD:=(A12-A22)*2+ZRS;DRAWKLINE(H,O,L,C);STICKLINE(A12>=A22,ZRS,MACD ,0,0),COLORRED;STICKLINE(A12>=A22 AND MACD<REF(MACD,1),ZRS,MACD ,0,0),COLORYELLOW; STICKLINE(A12<A22,ZRS,MACD ,0,0),COLORCYAN;STICKLINE(A12<A22 AND MACD>REF(MACD,1),ZRS,MACD ,0,0),COLORFFFFFF;。
通达信公式分时主图指标(源码)
通达信公式分时主图指标(源码)通达信公式分时主图指标(源码)IF(MACD.DEA<0,C,DRAWNULL),COLORGREEN,LINE THICK9;XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SU M(V*100,BARSCOUNT(CLOSE));主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120); 底:=1;1.02,NODRAW;高:=1.03;DRAWTEXT(CROSS(主力,1.02),C*0.999,"-拉升"),COLORCYAN;DRAWICON(CROSS(主力,1.04),C,24);DRAWTEXT(CROSS(主力,1.04),C*0.999,"-冲涨停"),COLORLIMAGENTA;A1:=(VOL/CLOSE)/3;A2:=SUM((I F(((A1>40) AND(CLOSE>(REF(CLOSE,1)))),A1,0)),0);A3:=SUM((IF(((A 1>40) AND(CLOSE<(REF(CLOSE,1)))),A1,0)),0);A4:=SUM((IF(((A1 <40) AND(CLOSE>(REF(CLOSE,1)))),A1,0)),0);A5:=SUM((IF(((A 1<40) AND(CLOSE<(REF(CLOSE,1)))),A1,0)),0);A6:=((A2+A3)+A4)+A5;A7:=IF((BARSTATUS=2),((100*A2)/A6),0);A8:=((IF(( BARSTATUS=2),((100*A3)/A6),0)));A9:=((IF((BARSTATU S=2),((100*A4)/A6),0)));A10:=((IF((BARSTATUS=2),((100 *A5)/A6),0)));机构买盘:=(A2),LINETHICK2;机构卖盘:=(A3),LINETHICK2;散户买盘:=(A4);散户卖盘:=(A5);DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STR CAT("【机构买盘】",CON2STR(机构买盘,2)),"万")),COLORRED;DRAWTEXT_FIX(1,0.250,1-0.05,0,STRC AT(STRCAT("【机构卖盘】",CON2STR(机构卖盘,2)),"万")),COLOR00FF00;DRAWTEXT_FIX(1,0.500,1-0.05,0,ST RCAT(STRCAT("【散户买盘】",CON2STR(散户买盘,2)),"万")),COLORRED;DRAWTEXT_FIX(1,0.745,1-0.05,0,STRC AT(STRCAT("【散户卖盘】",CON2STR(散户卖盘,2)),"万")),COLOR00FF00;H1:=MAX(DYNAINFO(3),DYNAINFO(5 ));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8,COLORGREEN;支撑:=L1+P1*0.5/8,COLORMAGENTA;DRAWTEXT(LONGC ROSS(支撑,C,2),C,"买"),COLOR00FFFF;DRAWTEXT(LONGCROSS(C,阻力,2),C,"出"),COLORGREEN;CC:=C;TT:=BARSCOUNT(CC);均价:SUM(V*C,0)/SUM(V,0),COLORGREEN;均:=MA(CC,TT);DRAWICON(CROSS(均价,均),均价,1);突破:=REF(EMA(C,20),1);A1X:=(EMA(C,10)-突破)/突破*100;多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A 1X,0))+1),DRAWNULL);空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A 1X))+1),DRAWNULL);STICKLINE(A1X>=0,多方,突破,2,0),COLOR0000FF;STICKLINE(A1X<0,空方,突破,2,0),COLOR00FF00;量价:=(VOL/CLOSE)/3;B2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);B3:=SUM((IF(((量价>0.20) AND(CLOSE<(REF(CLOSE,1)))),量价,0)),0);B6:=B2+B3;DD1:=1;比:=B2/B3;BBB1:=STRCAT(STRCAT("买=",CON2STR((100*B2)/B6,0)),"%");BBB2:=STRCAT(STRC AT("卖=",CON2STR((100*B3)/B6,0)),"%");BBB3:=STRCAT(STRC AT("差=",CON2STR((100*(B2-B3))/B6,0)),"%");DRAWTEXT_FIX( DD1=1,0,0.04,0,BBB1),COLORRED;DRAWTEXT_FIX(DD1=1,0,0.12,0,BBB2),COLORGREEN;DRAWTEXT_FIX(DD 1=1,0,0.20,0,BBB3),COLOR00FFFF;中期线:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100;DRAWTEXT(比<1.1,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORGRE EN;DRAWTEXT(比>1.5,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORCY AN;DRAWTEXT(比>2,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORMAG ENTA;DRAWTEXT(比>2.5,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORRE D;DRAWTEXT((比>1.1 AND 中期线<5),(DYNAINFO(5)+DYNAINFO(6))/2,"●"),COLORWHIT E;DRAWTEXT((比<1.1 AND 中期线>98.0),(DYNAINFO(5)+DYNAINFO(6))/2,"●"),COLORW HITE;DRAWTEXT((比>1.1 AND 中期线<5),C,"--机会"),COLORYELLOW;DRAWTEXT((比<1.1 AND 中期线>98.0),C,"--风险"),COLORYELLOW;上涨家数:IF(PERIOD=0 ,"分时引.上涨家数#DAY",DRAWNULL),NODRAW;下跌家数:IF(PERIOD=0 ,"分时引.下跌家数#DAY",DRAWNULL),NODRAW;DRAWTEXT_FIX(1,0.160,1-0.12,0,STRCAT("上涨家数:",CON2STR(上涨家数,0))),COLOR0000FF;DRAWTEXT_FIX(1,0.650,1-0.12,0, STRCAT("下跌家数:",CON2STR(下跌家数,0))),COLOR00FF00;。
通达信指标公式源码 分时主图指标
D1:=HOUR=9 AND MINUTE=40;D2:=HOUR=9 AND MINUTE=50;D3:=HOUR=10 AND MINUTE=0;D1D:=IF(D1=1,C,DRAWNULL);D2D:=IF(D2=1,C,DRAWNULL);D3D:=IF(D3=1,C,DRAWNULL);DRAWLINE(D1=1,D1D,D2=1,D2D,0),COLORRED,LINETHICK2; DRAWLINE(D2=1,D2D,D3=1,D3D,0),COLORRED,LINETHICK2;DD1:D1D,NODRAW;DD2:D2D,NODRAW;DD3:D3D,NODRAW;DRAWNUMBER(D1=1,C*0.998,C),COLORGREEN;DRAWNUMBER(D2=1,C*0.998,C),COLORCYAN;DRAWNUMBER(D3=1,C*0.998,C),COLORLIRED;DRAWTEXT_FIX( 1,0.00,1-0.18,0,' 9:40:'),COLORGREEN; DRAWNUMBER_FIX(1,0.09,1-0.18,0,D1D),COLORGREEN;DRAWTEXT_FIX( 1,0.00,1-0.12,0,' 9:50:'),COLORCYAN; DRAWNUMBER_FIX(1,0.09,1-0.12,0,D2D),COLORCYAN;DRAWTEXT_FIX( 1,0.00,1-0.03,0,'10:00:'),COLORLIRED; DRAWNUMBER_FIX(1,0.09,1-0.03,0,D3D),COLORLIRED;ZS:=DYNAINFO(3);KP:=DYNAINFO(4);ZX:=DYNAINFO(7);ZG:=DYNAINFO(5);ZD:=DYNAINFO(6);OP:=500-(KP/ZS-1)*4000;CL:=500-(ZX/ZS-1)*4000;HI:=500-(ZG/ZS-1)*4000;LO:=500-(ZD/ZS-1)*4000;N1:=IF(TIME>=130000 OR TIME<91500,360,860); DRAWRECTREL(N1+4,OP,N1+8,HI,RGB(255,0,255)),COLORFF00FF;{今日最高}{玫红}DRAWRECTREL(N1+4,CL,N1+8,LO,RGB(0,128,0)),COLOR008000;{今日最低}{暗绿}Q1:=IF(ZX>=KP,255,0);Q2:=IF(ZX>=KP,0,255);Q3:=IF(ZX>=KP,0,255);DRAWRECTREL(N1-10,OP,N1+22,CL,RGB(Q1,Q2,Q3));{今日实体}{255,0,0大红}{0,255,255青}ZO:="FSKY.ZO#DAY";ZC:="FSKY.ZC#DAY";ZH:="FSKY.ZH#DAY";ZL:="FSKY.ZL#DAY";ZKP:=500-(ZO/ZS-1)*4000;ZCP:=500-(ZC/ZS-1)*4000;ZZG:=500-(ZH/ZS-1)*4000;ZZD:=500-(ZL/ZS-1)*4000;DRAWRECTREL(N1-36,ZKP,N1-32,ZZG,RGB(255,0,255)),COLORFF00FF;{昨日最高}{玫红}DRAWRECTREL(N1-36,ZCP,N1-32,ZZD,RGB(0,128,0)),COLOR008000;{昨日最低}{暗绿}Q4:=IF(ZC>=ZO,255,0);Q5:=IF(ZC>=ZO,0,255);Q6:=IF(ZC>=ZO,0,255);DRAWRECTREL(N1-49,ZKP,N1-17,ZCP,RGB(Q4,Q5,Q6)),COLOR00FFFF;{昨日实体}{大红或青}JO:="FSKY.JO#DAY";JC:="FSKY.JC#DAY";JH:="FSKY.JH#DAY";JL:="FSKY.JL#DAY";ZZKP:=500-(JO/ZS-1)*4000;ZZCP:=500-(JC/ZS-1)*4000;ZZZG:=500-(JH/ZS-1)*4000;ZZZD:=500-(JL/ZS-1)*4000;DRAWRECTREL(N1-76,ZZKP,N1-72,ZZZG,RGB(255,0,255)),COLORFF00FF;{前日最高}{玫红}DRAWRECTREL(N1-76,ZZCP,N1-72,ZZZD,RGB(0,128,0)),COLOR008000;{前日最低}{暗绿}Q7:=IF(JC>=JO,255,0);Q8:=IF(JC>=JO,0,255);Q9:=IF(JC>=JO,0,255);DRAWRECTREL(N1-89,ZZKP,N1-57,ZZCP,RGB(Q7,Q8,Q9)),COLOR00FFFF;{前日实体}{大红或青}MA5:="FSKY.MA5#DAY";XMA5:=500-(MA5/ZS-1)*4000;DRAWRECTREL(N1-15,XMA5-5,N1+25,XMA5+5,RGB(255,255,255));{白} DRAWTEXT_FIX(ISLASTBAR,0.820,1-0.20,0,STRCAT('A5 :',CON2STR(MA5,2))),COLORWHITE;MA10:="FSKY.MA10#DAY";XMA10:=500-(MA10/ZS-1)*4000;DRAWRECTREL(N1-15,XMA10-5,N1+35,XMA10+5,RGB(255,255,0));{黄} DRAWTEXT_FIX(ISLASTBAR,0.8200,1-0.15,0,STRCAT('A10 :',CON2STR(MA10,2))),COLORYELLOW;MA20:="FSKY.MA20#DAY";XMA20:=500-(MA20/ZS-1)*4000;DRAWRECTREL(N1-15,XMA20-5,N1+45,XMA20+5,RGB(255,0,255)),COLORM AGENTA;DRAWTEXT_FIX(ISLASTBAR,0.8200,1-0.10,0,STRCAT('A20 :',CON2STR(MA20,2))),COLORMAGENTA;MA60:="FSKY.MA60#DAY";XMA60:=500-(MA60/ZS-1)*4000;DRAWRECTREL(N1-15,XMA60-5,N1+55,XMA60+5,RGB(0,125,0)),COLORGRE EN;DRAWTEXT_FIX(ISLASTBAR,0.8200,1-0.03,0,STRCAT('A60 :',CON2STR(MA60,2))),COLORGREEN;分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1; DA:=YEAR AND MONTH AND DAY;AA1:=STRCAT(CON2STR(YEAR,0),'年');AA2:=STRCAT(CON2STR(MONTH,0),'月');AA3:=STRCAT(CON2STR(DAY,0),'日');AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))); AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】'); DRAWTEXT_FIX(DA,0.85,0.01,0,AA),COLORWHITE;。
修正一个分时主图指标通达信指标公式源码
DRAWGBK(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0); O5:='分时引用.O5#DAY';C5:='分时引用.C5#DAY';H5:='分时引用.H5#DAY';L5:='分时引用.L5#DAY';O4:='分时引用.O4#DAY';C4:='分时引用.C4#DAY';H4:='分时引用.H4#DAY';L4:='分时引用.L4#DAY';O3:='分时引用.O3#DAY';C3:='分时引用.C3#DAY';H3:='分时引用.H3#DAY';L3:='分时引用.L3#DAY';O2:='分时引用.O2#DAY';C2:='分时引用.C2#DAY';H2:='分时引用.H2#DAY';L2:='分时引用.L2#DAY';O1:='分时引用.O1#DAY';C1:='分时引用.C1#DAY';H1:='分时引用.H1#DAY';L1:='分时引用.L1#DAY';O0:=DYNAINFO(4);C0:=DYNAINFO(7);H0:=DYNAINFO(5);L0:=DYNAINFO(6);HH1:=MAX(H1,H2);HH2:=MAX(H3,H4);HH3:=MAX(MAX(H0,H5),MAX(HH1,HH2));LL1:=MIN(L1,L2);LL2:=MIN(L3,L4);LL3:=MIN(MIN(L0,L5),MIN(LL1,LL2));HL:=999/(HH3-LL3);C52:=999-((C5-LL3)*HL);H52:=999-((H5-LL3)*HL);L52:=999-((L5-LL3)*HL);O52:=999-((O5-LL3)*HL);C42:=999-((C4-LL3)*HL);H42:=999-((H4-LL3)*HL);L42:=999-((L4-LL3)*HL);O42:=999-((O4-LL3)*HL);C32:=999-((C3-LL3)*HL);H32:=999-((H3-LL3)*HL);L32:=999-((L3-LL3)*HL);O32:=999-((O3-LL3)*HL);C22:=999-((C2-LL3)*HL);H22:=999-((H2-LL3)*HL);L22:=999-((L2-LL3)*HL);O22:=999-((O2-LL3)*HL);C12:=999-((C1-LL3)*HL);H12:=999-((H1-LL3)*HL);L12:=999-((L1-LL3)*HL);O12:=999-((O1-LL3)*HL);C02:=999-((C0-LL3)*HL);H02:=999-((H0-LL3)*HL);L02:=999-((L0-LL3)*HL);O02:=999-((O0-LL3)*HL);DRAWRECTREL( 8,H52, 8,L52,RGB(IF(C5>=O5,200,0),IF(C5>=O5,0,200),0)); DRAWRECTREL( 0,C52,16,O52,RGB(IF(C5>=O5,128,0),IF(C5>=O5,0,128),0)); DRAWRECTREL(28,H42,28,L42,RGB(IF(C4>=O4,200,0),IF(C4>=O4,0,200),0)); DRAWRECTREL(20,C42,36,O42,RGB(IF(C4>=O4,128,0),IF(C4>=O4,0,128),0)); DRAWRECTREL(48,H32,48,L32,RGB(IF(C3>=O3,200,0),IF(C3>=O3,0,200),0)); DRAWRECTREL(40,C32,56,O32,RGB(IF(C3>=O3,128,0),IF(C3>=O3,0,128),0)); DRAWRECTREL(68,H22,68,L22,RGB(IF(C2>=O2,200,0),IF(C2>=O2,0,200),0)); DRAWRECTREL(60,C22,76,O22,RGB(IF(C2>=O2,128,0),IF(C2>=O2,0,128),0)); DRAWRECTREL(88,H12,88,L12,RGB(IF(C1>=O1,200,0),IF(C1>=O1,0,200),0)); DRAWRECTREL(80,C12,96,O12,RGB(IF(C1>=O1,128,0),IF(C1>=O1,0,128),0)); DRAWRECTREL(108,H02,108,L02,RGB(IF(C0>=O0,200,0),IF(C0>=O0,0,200),0)); DRAWRECTREL(100,C02,116,O02,RGB(IF(C0>=O0,128,0),IF(C0>=O0,0,128),0)); {会心大盘分时主图:}成交额:=V*C/100,NODRAW;{万元}A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);A6:=(A2+A3);A7:=IF((ISLASTBAR),((100*A2)/A6),0);A8:=IF((ISLASTBAR),((100*A3)/A6),0);DD1:=1;AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%');AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%');AAA3:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');A000:=DRAWTEXT_FIX(DD1=1,0,0.02,0,AAA1),COLORRED;A001:=DRAWTEXT_FIX(DD1=1,0,0.13,0,AAA2),COLOR00FF00;DRAWTEXT_FIX(DD1=1,0,0.24,0,AAA3),COLOR00FFFF;现手买:=BUYVOL*DYNAINFO(7)*100/10000 COLOR0000FF,NODRAW;现手卖:=SELLVOL*DYNAINFO(7)*100/10000 COLOR00FF00,NODRAW;合:=ABS(现手买)+ABS(现手卖)COLOR80FFFF,NODRAW;差:=ABS(现手买)-ABS(现手卖)COLOR80FFFF,NODRAW;MPB1:=ABS(现手买)/合*100;MPB2:=ABS(现手卖)/合*100;TESTSKIP(NOT(现手买OR 现手卖OR 合OR 差OR MPB1 OR MPB2)!=0); DRAWRECTREL(640,1000,940,940,RGB(190,190,190));DRAWRECTREL(640,995,940,945,RGB(200,200,200));DRAWRECTREL(640,990,940,950,RGB(210,210,210));DRAWRECTREL(640,985,940,955,RGB(220,220,220));DRAWRECTREL(640,980,940,960,RGB(230,230,230));DRAWRECTREL(640,975,940,965,RGB(240,240,240));DRAWRECTREL(640,970,940,970,RGB(250,250,250));DRAWRECTREL(790-现手卖*210/合,1000,790,940,RGB(0,128,0)); DRAWRECTREL(790-现手卖*210/合,995,790,945,RGB(0,148,0));DRAWRECTREL(790-现手卖*210/合,990,790,950,RGB(0,168,0));DRAWRECTREL(790-现手卖*210/合,985,790,955,RGB(0,188,0));DRAWRECTREL(790-现手卖*210/合,980,790,960,RGB(0,208,0));DRAWRECTREL(790-现手卖*210/合,975,790,965,RGB(0,228,0));DRAWRECTREL(790-现手卖*210/合,970,790,970,RGB(0,248,0));DRAWRECTREL(790-现手卖*210/合,940,790-现手卖*210/合,1000,RGB(0,128,0)); DRAWRECTREL(790,1000,790+现手买*210/合,940,RGB(128,0,0)); DRAWRECTREL(790,995,790+现手买*210/合,945,RGB(148,0,0)); DRAWRECTREL(790,990,790+现手买*210/合,950,RGB(168,0,0)); DRAWRECTREL(790,985,790+现手买*210/合,955,RGB(188,0,0)); DRAWRECTREL(790,980,790+现手买*210/合,960,RGB(208,0,0)); DRAWRECTREL(790,975,790+现手买*210/合,965,RGB(228,0,0)); DRAWRECTREL(790,970,790+现手买*210/合,970,RGB(248,0,0)); DRAWRECTREL(790+现手买*210/合,940,790+现手买*210/合,1000,RGB(128,0,0)); DRAWRECTREL(789.8,940,790.2,1000,RGB(0,0.0,10));DRAWRECTREL(639.8,940,640.2,1000,RGB(0,0,10));DRAWRECTREL(939.8,940,940.2,1000,RGB(0,0,10));DRAWRECTREL(0,940,1000,940.2,RGB(0,0,10));DRAWTEXT_FIX(1,0.9,0.88,0,STRCAT(STRCAT('',CON2STR(现手买,1)),'万')),COLOR0000FF;DRAWTEXT_FIX(1,0.61,0.88,0,STRCAT(STRCAT('',CON2STR(现手卖,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)>0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR0000FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)<0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)=0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR80FFFF;DRAWTEXT_FIX(1,0.58,0.97,0,STRCAT(STRCAT('',CON2STR(MPB2,1)),'%%')),COLOR00FF00;DRAWTEXT_FIX(1,0.94,0.97,0,STRCAT(STRCAT('',CON2STR(MPB1,1)),'%%')),COLOR000 0FF;{冠军分时主图}H01:=MAX(DYNAINFO(3),DYNAINFO(5));L01:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H01-L01;阻力:L01+P1*7/8,COLORGREEN;支撑:L01+P1*0.5/8,COLORRED;中:(支撑+阻力)/2,COLORWHITE,POINTDOT;现价:CLOSE,COLORWHITE,LINETHICK2;底买:STICKLINE(C<支撑,支撑,C,5,0),COLORRED;MR:=C<支撑AND CROSS(C,REF(C,2));DRAWTEXT(CROSS(现价,支撑),中,'★买'),COLORRED;STICKLINE(CROSS(现价,支撑),C,中,2,0),COLORRED;STICKLINE(MR=1,支撑,中,2,0),COLORRED;DRAWICON(MR=1 OR CROSS(现价,支撑),中,1);STICKLINE(CROSS(支撑,现价),支撑,(支撑-中)/5+支撑,2,0),COLORYELLOW; DRAWTEXT(CROSS(支撑,现价),(支撑-中)/5+支撑,'★底'),COLORYELLOW;MC:=C>阻力AND CROSS(REF(C,2),C);DRAWTEXT(CROSS(阻力,现价),中,'★卖'),COLORGREEN;STICKLINE(CROSS(阻力,现价),C,中,2,0),COLORGREEN;STICKLINE(MC=1,阻力,中,2,0),COLORGREEN;DRAWICON(MC=1 OR CROSS(阻力,现价),中,2);STICKLINE(CROSS(现价,阻力),阻力,阻力-(支撑-中)/5,2,0),COLORMAGENTA; DRAWTEXT(CROSS(现价,阻力),阻力-(支撑-中)/5,'★顶'),COLORMAGENTA; DRAWTEXT(ISLASTBAR,阻力,'顶'),COLORGREEN;DRAWTEXT(ISLASTBAR,支撑,'底'),COLORRED;DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,'中'),COLORWHITE;AMOUNT/V/100,COLORYELLOW;市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));净利润率:=STRCAT(' 净利润率',CON2STR(FINANCE(30)/FINANCE(20)*100,2));主营利润率:=STRCAT(' 主营利润率',CON2STR(FINANCE(23)/FINANCE(20)*100,2));利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2));收入同比:=STRCAT(' 收入同比: ',CON2STR(FINANCE(44),2));{}X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};X3:=FINANCE(23)/FINANCE(10)*3.3;X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}X5:=FINANCE(20)/FINANCE(15)*0.999;Z值:=X1+X2+X3+X4+X5;预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比)); {}DRAWTEXT_FIX(ISLASTBAR,0.14,0.96,0,财务系数),COLORCYAN;DRAWTEXT_FIX(1,0.14,0.8,0,'所属行业:')COLORCYAN;DRAWTEXT_FIX(1,0.20,0.8,0,HYBLOCK),COLORWHITE;DRAWTEXT_FIX(1,0.32,0.8,0,'所属地区:')COLORCYAN;DRAWTEXT_FIX(1,0.38,0.8,0,DYBLOCK),COLORWHITE;{开盘三线}{新版分时主图}T31:=BARSLAST(TIME2=093100);T40:=BARSLAST(TIME2=094000);T41:=BARSLAST(TIME2=094100);T50:=BARSLAST(TIME2=095000);T51:=BARSLAST(TIME2=095100);T60:=BARSLAST(TIME2=100000);C31:=REF(C,T40);O31:=REF(C,T31);C40:=REF(C,T50);O40:=REF(C,T41);C50:=REF(C,T60);O50:=REF(C,T51);A1:=C31>O31 AND C40>O40 AND C50>O50 AND O40>=C31 AND O50>=C40;A20:=C31<O31 AND C40<O40 AND C50<O50 AND O40<=C31 AND O50<=C40;A30:=C31>O31 AND C40>O40 AND C50<O50 AND C50<C40 AND O50/C50<C40/O40 AND O50/C50<C31/O31;A4:=C31>O31 AND C40<O40 AND C50<O50 AND C40<C31 AND C50<C40 ANDC31/O31<O40/C40 AND C31/O31<O50/C50;A5:=C31<O31 AND C40<O40 AND C50>O50 AND C40<C31 AND O50>=C40;A60:=C31<O31 AND C40>O40 AND C50>O50 AND C40>C31 AND C50>C40 AND O31/C31<C40/O40 AND O31/C31<C50/O50;A70:=C31>O31 AND C40<O40 AND C50>O50 AND C31/O31>O40/C40 AND C50/O50>O40/C40;A80:=C31<O31 AND C40>O40 AND C50<O50 AND C40/O40<O31/C31 AND C40/O40<O50/C50;A9:=MAX(C31,O31)>=MAX(C40,O40) AND MAX(C31,O31)>=MAX(C50,O50);A10:=MIN(C31,O31)<=MIN(C40,O40) AND MIN(C31,O31)<=MIN(C50,O50);B1:='连续三上、三阳开泰、飚涨走势可能涨停、量大出货否则守仓、大阳、盯量';B2:='连续三下、三只乌鸦、重挫走势可能跌停、只要反弹立即出货、大阴、随逃';B3:='二上一下、二阳一小阴、震荡走势后势看好、逢高减磅逢低吸纳、中阳、阴须小';B4:='一上二下、二只乌鸦、拉高出货后市看坏、逢高减磅后市下跌、中阴、阳线小';B5:='二下一上、二阴一阳、急跌控底后市不明、逢高减磅观望为主、下影阴、阳大小';B6:='一下二上、一阴二阳、震荡控底后市趋好、观望为主谨慎吸纳、下影阳、阴大小';B7:='一上一下、二阳夹一阴、震荡走市后市看好、持股待涨逢低吸纳、中阳、阴须小再一上';B8:='一下一上、二阴夹一阳、跌幅较大尾市杀跌、只要反弹立即出货、中阴、阳须小再一下';B9:='三不创新高、可小阴小阳、三次不过短时顶部、层层阻力离场观望、上影阴阳、小K 线';B10:='三不创新低、可小阴小阳、三次不破短时底部、走势不强逢低少吸、下影阴阳、小K 线';DRAWTEXT_FIX( A1,0.005,0.005,0,B1),COLORRED;DRAWTEXT_FIX( A20,0.005,0.005,0,B2),COLORGREEN;DRAWTEXT_FIX( A30,0.005,0.005,0,B3),COLORMAGENTA;DRAWTEXT_FIX( A4,0.005,0.005,0,B4),COLORCYAN;DRAWTEXT_FIX( A5,0.005,0.005,0,B5),COLORBROWN;DRAWTEXT_FIX( A60,0.005,0.005,0,B6),COLORBLUE;DRAWTEXT_FIX( A70,0.005,0.005,0,B7),COLORYELLOW;DRAWTEXT_FIX( A80,0.005,0.005,0,B8),COLORLIGREEN;DRAWTEXT_FIX( A9,0.005,0.05,0,B9),COLORWHITE;DRAWTEXT_FIX( A10,0.005,0.1,0,B10),COLORLIMAGENTA;。
分时乾坤决策眼分时主图指标通达信指标公式源码
分时乾坤决策眼使用说明:1.乾坤线,定乾坤,线上买涨,线下买跌;2.出现红色“多线”,买涨做多;3.出现蓝色“空线”,买跌做空;{乾坤决策眼}FSHORT:=30;FLONG:=60;乾坤线:EMA(CLOSE,FLONG),COLORYELLOW,LINETHICK2;操盘线:=EMA(CLOSE,FSHORT),COLORWHITE,LINETHICK2;多线:IFF(操盘线>乾坤线,操盘线,DRAWNULL),COLORRED,LINETHICK2;空线:IFF(操盘线<=乾坤线,操盘线,DRAWNULL),COLORBLUE,LINETHICK2;买信号:=REF(操盘线,1)<=REF(乾坤线,1) AND 操盘线>乾坤线;卖信号:=REF(操盘线,1)>=REF(乾坤线,1) AND 操盘线<乾坤线;分时震荡线:=100*(C-LLV(CLOSE,300))/(HHV(CLOSE,300)-LLV(CLOSE,300)),COLORWHITE; {DRAWICON(买信号,乾坤线,90),ALIGN1;}{DRAWICON(卖信号,操盘线,91),ALIGN2;}信号长度:=BARSLAST(买信号OR 卖信号)+1;前期下跌长度:=BARSLAST(卖信号)+1;前期上涨长度:=BARSLAST(买信号)+1;价格超买:=EXIST(分时震荡线==100,前期上涨长度);价格超卖:=EXIST(分时震荡线==0,前期下跌长度);回涨初期:=COUNT(分时震荡线==100,前期下跌长度)<=2;回跌初期:=COUNT(分时震荡线==0,前期上涨长度)<=2;星级买点:=买信号AND 价格超卖AND 回涨初期;星级卖点:=卖信号AND 价格超买AND 回跌初期;五星B:=星级买点AND 分时震荡线==100;五星S:=星级卖点AND 分时震荡线==0,NODRAW;四星B:=星级买点AND 分时震荡线>=90 AND 分时震荡线<100; 四星S:=星级卖点AND 分时震荡线<=10 AND 分时震荡线>0;三星B:=星级买点AND 分时震荡线>=80 AND 分时震荡线<90; 三星S:=星级卖点AND 分时震荡线<=20 AND 分时震荡线>10; B5:=买信号AND COUNT(五星B,10);S5:=卖信号AND COUNT(五星S,10);B4:=买信号AND COUNT(四星B,10);S4:=卖信号AND COUNT(四星S,10);B3:=买信号AND COUNT(三星B,10);S3:=卖信号AND COUNT(三星S,10);DRAWTEXT(B5,乾坤线,'★'),COLOR0000FF;DRAWTEXT(B4,乾坤线,'★'),COLOR8000FF;DRAWTEXT(B3,乾坤线,'★'),COLORC080FF;DRAWTEXT(S5,操盘线,'☆'), COLOR00FF00;DRAWTEXT(S5,操盘线,'☆'), COLOR80FF80;DRAWTEXT(S5,操盘线,'☆'), COLOR40FF00;。
通达信指标公式源码 开盘三线分时主图指标
STICKLINE(TIME2=94000 AND REF(C,BARSLAST(TIME2=94000))>=REF(C,BARSLAST(TIME2=93000)),DYNAINFO(3)*1. 1,DYNAINFO(3)*0.9,0.5,-1),COLORRED;STICKLINE(TIME2=94000 AND REF(C,BARSLAST(TIME2=94000))<REF(C,BARSLAST(TIME2=93000)),DYNAINFO(3)*1.1, DYNAINFO(3)*0.9,0.5,-1),COLORGREEN;STICKLINE(TIME2=95000 AND REF(C,BARSLAST(TIME2=95000))>=REF(C,BARSLAST(TIME2=94000)),DYNAINFO(3)*1. 1,DYNAINFO(3)*0.9,0.5,-1),COLORRED;STICKLINE(TIME2=95000 AND REF(C,BARSLAST(TIME2=95000))<REF(C,BARSLAST(TIME2=94000)),DYNAINFO(3)*1.1, DYNAINFO(3)*0.9,0.5,-1),COLORGREEN;STICKLINE(TIME2=100000 AND REF(C,BARSLAST(TIME2=100000))>=REF(C,BARSLAST(TIME2=95000)),DYNAINFO(3)*1 .1,DYNAINFO(3)*0.9,0.5,-1),COLORRED;STICKLINE(TIME2=100000 AND REF(C,BARSLAST(TIME2=100000))<REF(C,BARSLAST(TIME2=95000)),DYNAINFO(3)*1. 1,DYNAINFO(3)*0.9,0.5,-1),COLORGREEN;SJ1:=TIME2=93000;T1:=BARSLAST(SJ1);SJ2:=TIME2=94000;SJ4:=TIME2=95000;T2:=BARSLAST(SJ2);T4:=BARSLAST(SJ4);H1:=IF(TIME2=94000,REF(C,T2),DRAWNULL)=C;H2:=IF(TIME2=95000,REF(C,T4),DRAWNULL)=C;CS2:=CONST(REF(C,T2));{理想论坛ID鹏腾2009版本}CS4:=CONST(REF(C,T4));GL2:=FILTERX(H1,T2);GL4:=FILTERX(H2,T4);L1:=IF(TIME2=93000,REF(C,T1),DRAWNULL)=C;CS1:=CONST(REF(C,T1));GL1:=FILTERX(L1,T1);DA:=CONST(IF(REF(GL2,BARSLAST(GL2)),REF(BARSLAST(GL1),BARSLAST(GL2)),DRAW NULL));DA1:=CONST(IF(REF(GL4,BARSLAST(GL4)),REF(BARSLAST(GL2),BARSLAST(GL4)),DRAW NULL));A:=IF(BARSLAST(GL1)>=0 AND BARSLAST(GL1)<=DA,((CS2-CS1)/DA)*BARSLAST(GL1)+CS1,DRAWNULL);B:=IF(BARSLAST(GL2)>=0 AND BARSLAST(GL2)<=DA1,((CS4-CS2)/DA1)*BARSLAST(GL2)+CS2,DRAWNULL);IF(A>=REF(A,1),A,DRAWNULL)COLORRED,LINETHICK3;IF(A<REF(A,1),A,DRAWNULL)COLORGREEN,LINETHICK3;IF(B>=REF(B,1),B,DRAWNULL)COLORRED,LINETHICK3;IF(B<REF(B,1),B,DRAWNULL)COLORGREEN,LINETHICK3;XSJ1:=TIME2=95000;XT1:=BARSLAST(XSJ1);XSJ2:=TIME2=100000;XT2:=BARSLAST(XSJ2);XCS2:=CONST(REF(C,XT2));XL1:=IF(TIME2=95000,REF(C,XT1),DRAWNULL)=C;XH1:=IF(TIME2=100000,REF(C,XT2),DRAWNULL)=C;XCS1:=CONST(REF(C,XT1));XGL1:=FILTERX(XL1,XT1);XGL2:=FILTERX(XH1,XT2);XDA:=CONST(IF(REF(XGL2,BARSLAST(XGL2)),REF(BARSLAST(XGL1),BARSLAST(XGL2)), DRAWNULL));XA:=IF(BARSLAST(XGL1)>=0 AND BARSLAST(XGL1)<=XDA,((XCS2-XCS1)/XDA)*BARSLAST(XGL1)+XCS1,DRAWNULL);IF(XA>=REF(XA,1),XA,DRAWNULL)COLORRED,LINETHICK3;IF(XA<REF(XA,1),XA,DRAWNULL)COLORGREEN,LINETHICK3;时间:=TIME2=100000;N:=BARSLAST(时间);C1:CONST(IF(N,MAX(REF(HHV(H,0),N+1),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORRE D;C2:CONST(IF(N,MIN(REF(LLV(L,0),N+1),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREE N;C3:(C1+C2)/2,DOTLINE,COLORYELLOW;VV:=HHV(V,0);Z,:=(C1/C2-1)*100;DRAWTEXT(CURRBARSCOUNT=30,C1*1.005,VARCAT(VARCAT(VARCAT(VARCAT('上限:',VAR2STR(C1,2)),'元,'),VARCAT('振幅:',VAR2STR(Z,,2))),'%')),COLORRED; DRAWTEXT(CURRBARSCOUNT=30,C3*1.005,VARCAT(VARCAT('中限:',VAR2STR(C3,2)),'元')),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=30,C2*1.005,VARCAT(VARCAT('下限:',VAR2STR(C2,2)),'元')),COLORGREEN;DRAWTEXT(C1/C2<=1.03 AND CROSS(C,C1) AND V>=VV,C1*1.005,'★买入')COLORRED; DRAWTEXT(C1/C2<=1.03 AND CROSS(C2,C) AND V>=VV,C2*0.998,'★卖出')COLORGREEN;STICKLINE(C1/C2<1.03 AND CROSS(C,C1) AND V>=VV,C1,C2,1,0),COLORRED;。
通达信分时主图通达信指标公式源码
通达信分时主图一、先建引用指标FSYY,如果已有的话再里面加上下列几句,我是不断加的。
指数1:"999999$C";指数2:"399001$C";指数3:"399005$C";指数4:"399006$C";二、再建个引用指标FSYY1指数1:"FSYY.指数1#DAY";指数2:"FSYY.指数2#DAY";指数3:"FSYY.指数3#DAY";指数4:"FSYY.指数4#DAY";三、再建分时主图指标均价:SUM(C*V,BARSCOUNT(C))/SUM(V,BARSCOUNT(C)),COLORYELLOW; DRAWICON(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C,1);DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.98,TIME),COLORYELL OW;DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.96,C),COLORMAGENT A;DRAWNUMBER(ISLASTBAR,DYNAINFO(11),DYNAINFO(11)),COLORYELLOW; DRAWNUMBER(ISLASTBAR,DYNAINFO(7),DYNAINFO(7)),COLORWHITE; DRAWTEXT_FIX(1,0.0,0.75,0,'红绿箭头带未来,仅供参考'),COLORGREEN; DRAWTEXT_FIX(1,0.0,0.85,0,STRCAT('上证指数:',CON2STR(FSYY1.指数1,2))),COLORYELLOW;DRAWTEXT_FIX(1,0.3,0.85,0,STRCAT('深圳指数:',CON2STR(FSYY1.指数2,2))),COLORYELLOW;DRAWTEXT_FIX(1,0.0,0.95,0,STRCAT('中小指数:',CON2STR(FSYY1.指数3,2))),COLORYELLOW;DRAWTEXT_FIX(1,0.3,0.95,0,STRCAT('创业指数:',CON2STR(FSYY1.指数4,2))),COLORYELLOW;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8;支撑:=L1+P1*0.5/8;DRAWICON(LONGCROSS(支撑,C,2),C,1);DRAWICON(LONGCROSS(C,阻力,2),C,2);四、注意事项分时主图中的红绿箭头是即时动态的,会根据行情变化的,只能参考。
通达信突破前高分时主图指标公式源码编程思路破译
通达信突破前高分时主图指标公式源码编程思路破译
编程思路破译
输出均价线:收盘价*成交量(手)的240日累和/成交量(手)的240日累和,画黄色
分时线赋值:收盘价
日期日分时线,DOTLINE,画淡蓝色
AA1赋值:1日前的0日内收盘价的最高值
AA2赋值:1日前的0日内成交量(手)的最高值
AA3赋值:AA1/昨收盘价<1.05
AA4赋值:收盘价上穿AA1 AND 成交量(手)>AA2 AND AA3
当满足条件AA4时,在分时线位置画1号图标
程序源码
均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW;
分时线:=CLOSE;
REFDATE(分时线,DATE),DOTLINE,COLORLIBLUE;
AA1:=REF(HHV(C,0),1);
AA2:=REF(HHV(V,0),1);
AA3:=AA1/DYNAINFO(3)<1.05;
AA4:=CROSS(C,AA1) AND V>AA2 AND AA3;
DRAWICON(AA4,分时线,1);
该公式包含未来函数:DYNAINFO。
通达信指标公式源码分时主图指标
通达信指标公式源码分时主图指标通达信是一款流行的股票行情软件,拥有丰富的指标公式库。
下面是一些常见的通达信指标公式源码,这些公式可以用于绘制分时主图指标。
1.均线:均线是最常见的技术指标之一,它代表了一段时间内的平均价格。
通达信中绘制均线的公式如下:MA(N):N日均线MA(N,X):N日均线,显示为实线,X为线宽度具体实现如下:MA(N):REF(C,N)MA(N,X):MA(N)其中,C代表收盘价,N代表计算的天数,REF函数是通达信的内置函数,用于获取前N天的数据。
2.成交量:成交量是衡量市场活跃度的指标之一,可以使用以下公式绘制成交量:VOL:成交量具体实现如下:VOL:V其中,V代表成交量。
3.平均成交量:平均成交量是一种相对成交量指标,可以用来衡量一些时间段内股票成交量的相对活跃程度。
在通达信中,可以使用以下公式绘制平均成交量:MAVG(VOL,N):N日平均成交量具体实现如下:MAVG(VOL,N):MA(VOL,N)其中,N代表计算的天数。
4.布林线:布林线是一种用来衡量股票价格波动性的指标,它由三条线组成,分别是上轨线、中轨线和下轨线。
在通达信中,可以使用以下公式绘制布林线:BOLL(M,N):中轨线UB(M,N,K):上轨线LB(M,N,K):下轨线具体实现如下:BOLL(M,N):MA(C,N)UB(M,N,K):MA(C,N)+K*STDEV(C,N)LB(M,N,K):MA(C,N)-K*STDEV(C,N)其中,C代表收盘价,M代表计算的天数,N代表计算的天数,K是标准差系数。
5.相对强弱指标(RSI):RSI是一种相对强弱指标,用于衡量市场的超买超卖情况。
在通达信中,可以使用以下公式绘制RSI:RSI(N):N日相对强弱指标具体实现如下:RSI(N):RSI(C,N)其中,C代表收盘价,N代表计算的天数。
以上是通达信中常见的分时主图指标公式源码,可以根据需要进行相应的调整和修改。
综合分时主图指标通达信指标公式源码
MA30:=EMA(CLOSE,30);强弱:EMA(CLOSE,900);STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLOR00DD00;支撑:L1+P1*0.5/8,COLOR00DD00;现价:CLOSE,COLORWHITE,LINETHICK1;STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★B'),COLORYELLOW;{吸} DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★'),COLORRED;{抛};XG:HHV(H,480),DOTLINE,COLORRED;STICKLINE(FILTER(CROSS(C,REF(XG,1)),10) ANDC>REF(XG,1),C*0.99,C,8,0),COLORGREEN;DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10) AND C>REF(XG,1),C*0.99,'突破'),COLORYELLOW;RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT ))+1;JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) ORTOTALBARSCOUNT-CURRBARSCOUNT=0)+1;{年月日}DA:=YEAR AND MONTH AND DAY;AA1:=STRCAT(CON2STR(YEAR,0),'年');AA2:=STRCAT(CON2STR(MONTH,0),'月');AA3:=STRCAT(CON2STR(DAY,0),'日');AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】');DRAWTEXT_FIX(DA AND FROMOPEN<=120,0.88,0,0,AA),COLORBLUE; DRAWTEXT_FIX(DA AND FROMOPEN>120,0,0,0,AA),COLORBLUE;{分时MACD}DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=2*(DIF-DEA);X:=CONST(HHV(ABS(C-DYNAINFO(3)),FROMOPEN))/CONST(HHV(ABS(DIF),FROMOPEN) )*0.6;DI:DIF*X+DYNAINFO(3),COLORCC00CC;DE:DEA*X+DYNAINFO(3),COLOR00DD00;MAC:=MACD*X;STICKLINE(MAC>0,DYNAINFO( 3),MAC+DYNAINFO( 3),0,1),COLORRED; STICKLINE(MAC<0,DYNAINFO( 3),MAC+DYNAINFO( 3),0,1),COLORCYAN;{高点直线}V1:=TIME;T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000) ),(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;KP30:=T<240;KPGD:=H=HHV(H,0) AND KP30;GDSJ:=BARSLAST(KPGD);HHHH:REF(H,GDSJ),COLORYELLOW,POINTDOT,LINETHICK1;{低点直线}VQ1:=TIME;TQ:=IF(VQ1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(VQ1/100)-100*FLOOR(VQ1/ 10000)),(FLOOR(VQ1/10000)-11)*60+(FLOOR(VQ1/100)-100*FLOOR(VQ1/10000))),NODRAW; KPQ30:=TQ<240;KPGDQ:=L=LLV(L,0) AND KPQ30;GDSJQ:=BARSLAST(KPGDQ);HHHHQ:REF(L,GDSJQ),COLORCC00CC,POINTDOT,LINETHICK1;{分时均价线和分时线}最新:CLOSE,COLORWHITE;AQA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C)); DRAWTEXT( ISLASTBAR AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;DRAWTEXT( ISLASTBAR AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;均价:SUM(V*C,0)/SUM(V,0),COLORGREEN,LINETHICK1;IF(均价<=REF(均价,1),均价,DRAWNULL),COLORGREEN,LINETHICK3;IF(均价>=REF(均价,1),均价,DRAWNULL),COLORYELLOW,LINETHICK3; DRAWTEXT(CURRBARSCOUNT=8,均价,'均'),COLORYELLOW,LINETHICK3; DRAWNUMBER(CURRBARSCOUNT=1,均价,均价),COLORYELLOW,LINETHICK3; {板块概念}DRAWTEXT_FIX(1 AND FROMOPEN<=120,0.5,0,0,DYBLOCK),COLORWHITE; DRAWTEXT_FIX(1 AND FROMOPEN<=120,0.55,0,0,HYBLOCK),COLORYELLOW; DRAWTEXT_FIX(1 AND FROMOPEN<=120,0.6,0,0,GNBLOCK),COLORYELLOW; DRAWTEXT_FIX(1 AND FROMOPEN>120,0.12,0,0,DYBLOCK),COLORWHITE; DRAWTEXT_FIX(1 AND FROMOPEN>120,0.17,0,0,HYBLOCK),COLORYELLOW; DRAWTEXT_FIX(1 AND FROMOPEN>120,0.21,0,0,GNBLOCK),COLORYELLOW;。
综合分时主图源码 做T+0必备通达信指标公式源码
通达信综合分时主图源码做T+0必备这个公式指标是我综合了几个分时指标。
经修改加工而成,经试有一段时间,效果非常不错!现发出来与大家共同研究学习,共同担高。
指标标注非常清楚,除了极弊端行情,大部份时间是很有用的!现价:CLOSE,COLORFFFFFF,LINETHICK2;均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L11:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L11;阻力:L11+P1*7/8,COLOR00DD00;支撑:L11+P1*0.5/8,COLORMAGENTA;中:阻力*0.5+支撑*0.5,DOTLINE;STICKLINE(CROSS(支撑,现价),中,现价,2,0),COLORYELLOW,LINETHICK5;STICKLINE(CROSS(现价,阻力),现价,中,2,0),COLORFFCC66,LINETHICK5;DRAWTEXT(LONGCROSS(支撑,C,2),C,'--反弹'),COLORYELLOW;DRAWTEXT(LONGCROSS(C,阻力,2),C,'--出货'),COLORYELLOW;A1:=(DVOL/C)/2,NODRAW;A2:=SUM(IF(A1>100 AND CLOSE>REF(CLOSE,1),A1,0),0);A3:=SUM(IF(A1>100 AND CLOSE<REF(CLOSE,1),A1,0),0);A4:=SUM(IF(A1<100 AND CLOSE>REF(CLOSE,1),A1,0),0);A5:=SUM(IF(A1<100 AND CLOSE<REF(CLOSE,1),A1,0),0);A6:=A2+A3+A4+A5;A7:=IF((BARSTATUS=2),((100*A2)/A6),0);A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));机构买盘:=(A2),LINETHICK2;机构卖盘:=(A3),LINETHICK2;散户买盘:=(A4);散户卖盘:=(A5);机构买:=(A2),LINETHICK6,COLORRED;机构卖:=(A3),LINETHICK6,COLORGREEN;DD1:=1;AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%'); AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%'); AAA3:=STRCAT(STRCAT('净买入',CON2STR((100*(A2-A3))/A6,0)),'%'); DRAWTEXT_FIX(DD1=1,0,0.04,0,AAA1),COLORRED;DRAWTEXT_FIX(DD1=1,0,0.12,0,AAA2),COLORGREEN; DRAWTEXT_FIX(DD1=1,0,0.20,0,AAA3),COLOR00FFFF;A11:=C>REF(C,4);NT:=BARSLASTCOUNT(A11);TJ11:=NT=9;TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT; DRAWTEXT(AY>0,H*1.001,VAR2STR(AY,0)),COLORFF00FF; DRAWTEXT(NT=9,H*1.001,'9'),COLORGREEN;B1:=C<REF(C,4);NT0:=BARSLASTCOUNT(B1);TJ21:=NT0=9 ;TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;DRAWTEXT(AY1>0,L*0.999,VAR2STR(AY1,0)),COLORFF00FF;DRAWTEXT(NT0=9,L*0.999,'9'),COLORGREEN;ZRS:=CONST(DYNAINFO(3)),NODRAW;A12:=3.5*(EMA(CLOSE,48)-EMA(CLOSE,104))+ZRS,COLORLIMAGENTA;A22:=EMA(A12,36),COLORLIBLUE;MACD:=(A12-A22)*2+ZRS;DRAWKLINE(H,O,L,C);STICKLINE(A12>=A22,ZRS,MACD ,0,0),COLORRED;STICKLINE(A12>=A22 AND MACD<REF(MACD,1),ZRS,MACD ,0,0),COLORYELLOW; STICKLINE(A12<A22,ZRS,MACD ,0,0),COLORCYAN;STICKLINE(A12<A22 AND MACD>REF(MACD,1),ZRS,MACD ,0,0),COLORFFFFFF;。
通达信神奇分时主图可以精确指标公式
通达信,神奇分时,主图,指标公式E5:=EMA(C,5);E13:=EMA(C,13);DRAWNUMBER(ISLASTBAR ,C,C),COLORMAGENTA; DRAWBAND(E5,RGB(200,0,0),E13,RGB(0,200,0));A1:EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;A2:EMA((EMA(C,3)+EMA(C,5)+EMA( C,7))/3,3),COLOR1020FF;A3:EMA((EMA(C,5)+EMA(C,7)+EMA( C,9))/3,3),COLOR1030FF;A4:EMA((EMA(C,7)+EMA(C,9)+EMA( C,11))/3,3),COLOR1040FF;A5:EMA((EMA(C,9)+EMA(C,11)+EMA( C,13))/3,3),COLOR1050FF; A6:EMA((EMA(C,11)+EMA(C,13)+EMA( C,15))/3,3),COLOR1060FF; A7:EMA((EMA(C,13)+EMA(C,15)+EMA( C,17))/3,3),COLOR1070FF; A8:EMA((EMA(C,15)+EMA(C,17)+EMA( C,19))/3,3),COLOR1080FF; A9:EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),COLOR1080EF; A10:EMA((EMA(C,19)+EMA(C,21)+EMA( C,23))/3,3),COLOR10C0FF; A11:EMA((EMA(C,21)+EMA(C,23)+EMA( C,25))/3,3),COLOR10E0FF; A15:=A-(A1-A*0.997),COLORFF1010;A16:A-(A2-A),COLORFF2010;A17:A-(A3-A),COLORFF3010;A18:A-(A4-A),COLORFF4010;A19:A-(A5-A),COLORFF5010;A20:A-(A6-A),COLORFF6010;A21:A-(A7-A),COLORFF7010;A22:A-(A8-A),COLORFF8010;A23:A-(A9-A),COLORFF9010;A24:A-(A10-A),COLORFFC010;A25:A-(A11-A*0.997),COLORFFE010;FD:=(H-L)/3;OPEN1:=O>FD*2+L;OPEN3:=O<FD+L;OPEN2:=NOT(OPEN1 OR OPEN3);CLOSE1:=C>FD*2+L;CLOSE3:=C<FD+L;CLOSE2:=NOT(CLOSE1 OR CLOSE3);DFZD:=CLOSE1 OR (OPEN3 AND CLOSE2);WQS1:=OPEN2 AND CLOSE2;KFZD:=NOT(DFZD OR WQS1);ZD:=(H+L)/2;QSXS:=ZD>REF(H,1);QSXX:=ZD<REF(L,1);WQS2:=NOT(QSXS OR QSXX);ZTDL:=V>REF(V,1)*1.1;FTDL:=V<REF(V,1)*0.7;ZTDL2:=ZTDL AND FTDL<1;FTDL2:=FTDL AND ZTDL<1;MFI1:=(H-L)/(V/10000);MFI2:=(H-L)/(V/1000000);ZMFI1:=MFI1>REF(MFI1,1);ZMFI2:=MFI2>REF(MFI2,1);ZMFI:=ZMFI1 OR ZMFI2;FMFI:=NOT(ZMFI);LD:=ZTDL2 AND ZMFI;ST:=FTDL2 AND FMFI;WZ:=FTDL2 AND ZMFI;QF:=ZTDL2 AND FMFI;S11:=DFZD AND QSXS ;S22:=KFZD AND QSXX ;S33:=DFZD AND QSXX;S44:=KFZD AND QSXS;S55:=DFZD AND WQS2;S66:=KFZD AND WQS2;S77:=WQS1 AND (QSXS OR QSXX OR WQS2);DRAWKLINE(H,O,L,C);CC:=HHV(IF(TIME<103000,C,0),0);VV:=HHV(IF(TIME<103000,V,0),0);ZF:=CC/DYNAINFO(3)<1.05;XH:=C>=CC AND V>=VV AND TIME>=103000 AND DYNAINFO(7)=C;GL:=FILTER(XH,100);STICKLINE(GL,DYNAINFO(7)*0.98,DYNAINFO(7)*0.999,10,0) COLOR0000FF; DRAWTEXT(GL,DYNAINFO(7)*0.99,'突破'),COLORYELLOW,LINETHICK1;TBX:=REF(EMA(C,14),1);A1X:=(EMA(C,10)-TBX)/TBX*100;DFX:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL); KFX:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);最新:C,LINETHICK1,COLORFFFF00;MA30:=EMA(CLOSE,30);H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLORFFFF00,DOTLINE;支撑:L1+P1*0.5/8,COLOR0000FF,DOTLINE;现价:=CLOSE,COLORWHITE,LINETHICK1;日时转换:=IF(PERIOD=5,120,240);QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2;VAR11:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR22:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR33:=(VAR11+VAR22)/2;VAR44:=EMA(VAR33,30);VAR55:=EMA(VAR33,60);VAR66:=EVERY(VAR11>REF(VAR11,1),5) AND EVERY(VAR44>REF(VAR44,1),5); DRAWBAND(VAR11,RGB(150,30,30),EMA(VAR11,60),RGB(0,110,30));NXX:EMA(C,120),COLOR0080FF,LINETHICK3;DRAWTEXT(BARSTATUS=2,NXX,'牛熊线'),COLORFFFFFF;牵引线:VAR11,COLOR4B4B4B,DOTLINE;强弱线:EMA(VAR11,日时转换),POINTDOT,COLOR0080FF;趋势关注:IF(CROSS(VAR11,EMA(VAR11,60)) AND VAR66,1,0),NODRAW,COLORRED; 量价关注:IF(CROSS(VAR33,VAR55) AND VAR66,1,0),NODRAW,COLORWHITE;冲击量:IF(VAR33>VAR55 AND VAR66,1,0),NODRAW,COLORYELLOW;强势区:IF(VAR11>强弱线,1,DRAWNULL),NODRAW,COLORRED;止损区:IF(VAR11<强弱线,1,DRAWNULL),NODRAW,COLORGREEN;STICKLINE(QZS>VAR11,QZS,VAR11,0,0),COLORMAGENTA;STICKLINE(冲击量=1,QZS,VAR11,0,0),COLORYELLOW;STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;DRAWKLINE(H,O,L,C);DRAWICON(LONGCROSS(支撑,现价,2),L,1),COLORYELLOW;{吸}DRAWICON(LONGCROSS(现价,阻力,2),H,2),COLORGREEN;{抛};DRAWICON(趋势关注=1,EMA(VAR11,60),13);DRAWTEXT(量价关注=1,EMA(VAR11,60),'★'),COLORWHITE;均价:SUM(V*C,0)/SUM(V,0),COLORFF00FF;DRAWTEXT(CURRBARSCOUNT=4,均价,'均'),COLORFFFFFF,LINETHICK1;IF(C>=REF(C,1),C,DRAWNULL),LINETHICK1,COLORRED;AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));BB:=BETWEEN(C/AA,C+H,C-H);DRAWICON(ISLASTBAR AND C>REF(C,1),C,1);DRAWICON(ISLASTBAR AND C<REF(C,1),C,2);DXJP:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,21)-LLV(LOW,34))*100;FSZX:=(EMA(DXJP,3)-50)*2,COLORGRAY;BGTYU:=IF(DATE<=1150530,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGT YU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM (AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*B GTYU)))));DRAWICON(FSZX<=-95,C,38);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),C,'板'),COLORCYAN; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),C,'追'),COLORYELLOW; DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),C,17);VARJ1:=EMA(EMA(CLOSE,13),13);控盘2:=(VARJ1-REF(VARJ1,1))/REF(VARJ1,1)*1000;STJ01:=控盘2<REF(控盘2,1) AND 控盘2>0.5;STJ02:=控盘2>0;BTJ2:=控盘2>REF(控盘2,1) AND 控盘2<-0.2;BTJ22:=控盘2>REF(控盘2,1) AND 控盘2<0 ;JJ:=DYNAINFO(11);P:=55;S:=8;M1:=3;能量:=(EMA(CLOSE,S)-EMA(C,P))*10;空头:=EMA(能量,M1),COLOR00FF00;BTJ1:=(CLOSE-JJ)/JJ<-0.005;BTJ11:=(CLOSE-JJ)/JJ<-0.03;BTJ12:=COUNT(JJ>=REF(JJ,1),5)>=4 AND (CLOSE-JJ)/JJ<0.005;STJ1:=(C-JJ)/JJ>0.005;BTJ3:=CROSS(能量,空头) AND 能量<-0.3;BTJ32:=CROSS(能量,空头) AND 能量<-0.1;STJ31:=CROSS(空头,能量);STJ32:=CROSS(空头,能量) AND 能量>1.618;A:=8;BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,A);BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,A);BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,A);AYGB1:=(DVOL/C)/2,NODRAW;AYGB2:=SUM(IF(AYGB1>100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB3:=SUM(IF(AYGB1>100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB4:=SUM(IF(AYGB1<100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB5:=SUM(IF(AYGB1<100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5;机买:=(AYGB2/AYGB6)*100-100,LINETHICK1,COLORRED;机卖:=(AYGB3/AYGB6)*100-100,LINETHICK1,COLORGREEN;主力差:=机买-机卖;LQH:=主力差>0 AND REF(主力差,1)<=0;DRAWICON(LQH,C,25);JJXX:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(S UM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW;JJXXH:=(JJXX*1.007 ),COLORFF6600;FFLL:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;HHPP:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)<1;HHZZ:=HHPP AND FFLL AND (C>JJXXH);TTPP2:=FILTER(HHZZ,100);DRAWICON(TTPP2,C,26);时间:=TIME=100000;N:=BARSLAST(时间);常数:CONST(IF(N=0,C,REF(C,N))),COLORFFFFFF,DOTLINE; CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N)));CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))); STICKLINE(时间=1,CS1,CS2,-1,0),COLORFFFFFF; CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))),COLOR888888; CONST(IF(N,HHV(L,0),REF(HHV(L,0),N))),COLOR888888; 期货培训,股票培训:/。
分时看盘主图源码 通达信指标公式源码
DRAWGBK(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0);H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLORGREEN;支撑:L1+P1*0.5/8,COLORRED;中:(支撑+阻力)/2,COLORWHITE,POINTDOT;现价:CLOSE,COLORWHITE,LINETHICK2;顶卖:STICKLINE(C>阻力,阻力,C,5,0),COLORGREEN;底买:STICKLINE(C<支撑,支撑,C,5,0),COLORRED;MR:=C<支撑AND CROSS(C,REF(C,2));DRAWTEXT(CROSS(现价,支撑),中,'★买'),COLORRED;STICKLINE(CROSS(现价,支撑),C,中,2,0),COLORRED;STICKLINE(MR=1,支撑,中,2,0),COLORRED;DRAWICON(MR=1 OR CROSS(现价,支撑),中,1);STICKLINE(CROSS(支撑,现价),支撑,(支撑-中)/5+支撑,2,0),COLORYELLOW; DRAWTEXT(CROSS(支撑,现价),(支撑-中)/5+支撑,'★底'),COLORYELLOW; MC:=C>阻力AND CROSS(REF(C,2),C);DRAWTEXT(CROSS(阻力,现价),中,'★卖'),COLORGREEN;STICKLINE(CROSS(阻力,现价),C,中,2,0),COLORGREEN;STICKLINE(MC=1,阻力,中,2,0),COLORGREEN;DRAWICON(MC=1 OR CROSS(阻力,现价),中,2);STICKLINE(CROSS(现价,阻力),阻力,阻力-(支撑-中)/5,2,0),COLORMAGENTA;DRAWTEXT(CROSS(现价,阻力),阻力-(支撑-中)/5,'★顶'),COLORMAGENTA;冠军1号QQ:=474131998;DRAWTEXT(ISLASTBAR,阻力,'顶'),COLORGREEN;DRAWTEXT(ISLASTBAR,支撑,'底'),COLORRED;DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,'中'),COLORWHITE;每股净资产:=STRCAT(STRCAT('每股净资产:',CON2STR(FINANCE(34),2)),'元'); DRAWTEXT_FIX(1,0.22,0.92,0,每股净资产),COLORWHITE;主营同比增长:=STRCAT(STRCAT('主营同比增长:',CON2STR(FINANCE(44),2)),'%'); DRAWTEXT_FIX(1,0.33,0.99,0,主营同比增长),COLORCYAN;净利润同比增长:=STRCAT(STRCAT('净利润同比增长:',CON2STR(FINANCE(43),2)),'%'); DRAWTEXT_FIX(1,0.33,0.92,0,净利润同比增长),COLORYELLOW;{销售毛利率:=STRCAT(STRCAT('销售毛利率:',CON2STR(FINANCE(21)/FINANCE(20)*100,2)),'%');}销售毛利率:=STRCAT(STRCAT('销售毛利率:',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2)),'%');DRAWTEXT_FIX(1,0.22,0.99,0,销售毛利率),COLORCYAN;DRAWTEXT_FIX(1,0.11,0.99,0,'每股收益:')COLORYELLOW;DRAWTEXT_FIX(1,0.16,0.99,0,STRCAT(CON2STR(FINANCE(30)/FINANCE(1),2),'元'))COLORYELLOW;DRAWTEXT_FIX(1,0.11,0.92,0,'每股市盈率:')COLORYELLOW;DRAWTEXT_FIX(1,0.17,0.92,0,STRCAT(CON2STR(C/FINANCE(33),2),'倍'))COLORYELLOW;DRAWTEXT_FIX(1,0.01,0.99,0,'流通A股:')COLORCYAN;DRAWTEXT_FIX(1,0.06,0.99,0,STRCAT(CON2STR(CAPITAL/1000000,2),'亿股'))COLORCYAN;DRAWTEXT_FIX(1,0.11,0.87,0,'每股未分配:元')COLORYELLOW;DRAWTEXT_FIX(1,0.17,0.87,0,CON2STR(FINANCE(32),2))COLORYELLOW; DRAWTEXT_FIX(1,0.01,0.92,0,'经营现金流: 元')COLORYELLOW;DRAWTEXT_FIX(1,0.07,0.92,0,CON2STR(FINANCE(25)/FINANCE(1),2))COLORYELLOW; DRAWTEXT_FIX(1,0.50,0.99,0,'☆[热点概念]:')COLORYELLOW;DRAWTEXT_FIX(1,0.57,0.99,0,EXTERNSTR(0,1))COLORYELLOW;DRAWTEXT_FIX(1,0.50,0.92,0,'☆[主营行业]:')COLORCYAN;DRAWTEXT_FIX(1,0.57,0.92,0,EXTERNSTR(0,2))COLORCYAN;{DRAWTEXT_FIX(1,0.00,0.63,0,'[高送转信号]:')COLORCYAN;DRAWTEXT_FIX(1,0.05,0.63,0,EXTERNSTR(0,3))COLORCYAN;};所属板块:=STRCAT('☆【所属板块】',STRCAT(STRCAT(STRCAT('[行业]—',HYBLOCK),STRCAT('[地域]—',DYBLOCK)),STRCAT('[概念]—',GNBLOCK))); DRAWTEXT_FIX(ISLASTBAR,0.50,0.87,0,所属板块),COLORYELLOW;今日人气:=DYNAINFO(60)/DYNAINFO(61);DRAWTEXT_FIX(1,0,0.87,0,'◆大盘人气:'),COLORYELLOW,LINETHICK4; DRAWNUMBER_FIX(1,0.07,0.87,0,CONST(今日人气)),COLORYELLOW;TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD =5,240,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);虚拟量:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL);虚拟量比:=虚拟量/REF(VOL,1),COLORWHITE,LINETHICK0;虚量值:=(虚拟量-VOL)/VOL,COLORWHITE,LINETHICK0;DRAWTEXT_FIX(1,0.33,0.87,0,'▲量比:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.37,0.87,0,CONST(虚拟量比)),COLORYELLOW;量价:=(VOL/CLOSE)/3;统计主动买量:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);统计主动卖量:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);涨停能量:=((统计主动买量)/统计主动卖量)*10,COLOR4080FF;DRAWTEXT_FIX(1,0.22,0.87,0,'★涨停能量:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.28,0.87,0,CONST(涨停能量)),COLORYELLOW;。
通达信分时主图指标公式源码
{分时主图--止赢止损}MA1:=EMA(C,30);MA2:=EMA(C,900);STICKLINE((MA1>MA2),MA1,MA2,0,0),COLOR1000FF;STICKLINE((MA1<MA2),MA1,MA2,0,0),COLOR00FF00;GJ:C,COLORWHITE;JJ:SUM(C*V,FROMOPEN)/SUM(V,FROMOPEN),COLORYELLOW,LINETHICK1.5;均量:=MA(V,5);量连增:=均量>REF(均量,1) AND REF(均量,1)>REF(均量,2);价连涨:=C>=REF(C,1) AND REF(C,1)>REF(C,2);价量线上:=C>JJ AND V>均量;倍量:=V>=REF(V,1)*2 ;价新高:=C>=HHV(C,FROMOPEN);量新高:=V>=HHV(V,FROMOPEN);限幅:=C/DYNAINFO(3)<=1.02;起爆:=FILTER(量连增AND 价连涨AND 价量线上AND 倍量AND 价新高AND 量新高AND 限幅,20);DRAWTEXT(起爆,C,'起爆'),COLOR00FFFF;DRAWICON(起爆,C,1);STICKLINE(起爆,C,JJ,1,0),COLOR1000FF;VV:=BARSSINCE(起爆);起爆价:=REF(C,VV);起爆时间:=REF(TIME/10000,VV);收益:=(DYNAINFO(7)-起爆价)/起爆价*100;DRAWICON(VV>=2,起爆价,13);DRAWTEXT_FIX(1,0,1,0,'起爆时间:'),COLOR00FFFF;DRAWNUMBER_FIX(1,0.06,1,0,CONST(起爆时间)),COLOR00FFFF;DRAWTEXT_FIX(1,0.12,1,0,'起爆价:'),COLOR00FFFF;DRAWNUMBER_FIX(1,0.17,1,0,CONST(起爆价)),COLOR00FFFF;DRAWTEXT_FIX(1,0.24,1,0,'收益:'),COLOR00FFFF;DRAWNUMBER_FIX(1,0.28.06,1,0,CONST(收益)),COLOR00FFFF;流通盘:CAPITAL*100/100000000,NODRAW;资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),NODRAW;资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),NODRAW;资金出入:=资金流入+资金流出,NODRAW;NN:=2400,NODRAW;HD:=HHV(资金出入,NN),NODRAW;LD:=LLV(资金出入,NN),NODRAW;最高:=CONST(HD),NODRAW;最低:=CONST(LD),NODRAW;HLMAX:=最高;HLMIN:=最低;HLMN1:=(HLMAX+HLMIN)/2;HLMN2:=HLMAX-HLMIN;HLMN3:=(100-0)/2*1.3;HLMN4:=(100-0)/1*1.3;中间价轴:=(50-HLMN3)*HLMN2/HLMN4+HLMN1;轴差:=最高-最低;DRAWBAND(资金出入,RGB(150,0,150),0,RGB(0,100,0)),NODRAW;资金流量:资金出入,NODRAW;资金比:资金出入/SUM(V,FROMOPEN)*100,NODRAW;资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2)),NODRAW;攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPE N,NODRAW;攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),NODRAW;攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),NODRAW;攻击流量:攻击量A+攻击量B,NODRAW;NOTEXT攻击线:攻击流量,NODRAW;攻击比:攻击流量/SUM(V,FROMOPEN)*100,COLORRED,NODRAW;资金攻击度:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50)));{STICKLINE(资金流量A>0,资金流量A,0,1,0),COLOR0000FF;STICKLINE(资金流量B<0,资金流量B,0,1,0),COLORFF0000;}DRAWRECTREL(110,10,400,90,RGB(0,75,200));DRAWRECTREL(110,10,250,90,RGB(0,250,50));DRAWRECTREL(110,10,100+CONST(资金流量比*300/100),90,RGB(200,50,0)); DRAWTEXT_FIX(1,0.000,0.00,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),COLORYELLOW;DRAWRECTREL(610,10,900,90,RGB(0,75,200));DRAWRECTREL(610,10,750,90,RGB(0,250,50));DRAWRECTREL(610,10,600+CONST(资金攻击度*300/100),90,RGB(175,50,0)); DRAWTEXT_FIX(1,0.500,0.00,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),COLORYELLOW;MA30:=EMA(CLOSE,30);强弱:EMA(CLOSE,900);STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLOR00DD00;支撑:L1+P1*0.5/8,COLOR00DD00;现价:CLOSE,COLORWHITE,LINETHICK1;STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★B吸'),COLORWHITE;{吸} DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★S抛'),COLORGREEN;{抛};{T+1止赢、止损}止赢:H1,COLORRED,LINETHICK6;DRAWTEXT(ISLASTBAR,H1,'当日止赢价位'),COLORRED,LINETHICK6;止损:阻力,COLORBLUE,LINETHICK6;DRAWTEXT(ISLASTBAR,阻力,'高位止损价位'),COLORBLUE,LINETHICK6;最后止损:支撑,COLORGREEN,LINETHICK6;DRAWTEXT(ISLASTBAR,支撑,'低位止损价位'),COLORGREEN,LINETHICK6;UR:=10;LR:=10;均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;。
通达信-分时指标-主图源码
通达信-分时指标-主图源码通达信-分时指标-主图源码M5:=MA2.MA1#DAY;M10:=MA2.MA2#DAY;M20:=MA2.MA3#DAY;M60:=MA2.MA4#DAY;M120:=MA2.MA5#DAY;M250:=MA2.MA6#DAY;昨高:=YYSJ.昨高#DAY;昨低:=YYSJ.昨低#DAY;HH:=MAX(CONST(HHV(C,FROMOPEN)),DYNAINFO(3));LL:=MIN(CONST(LLV(C,FROMOPEN)),DYNAINFO(3));NOTEXTLLL:IF(DYNAINFO(13)>0.04,LL*0.99,LL-MINDIFF*2),COLORBLACK;MA5:IF(M5>=LL AND M5<=HH,M5,DRAWNULL),DOTLINE,COLORFFFFFF;MA10:IF(M10>=LL AND M10<=HH,M10,DRAWNULL),DOTLINE,COLOR00FFFF;MA20:IF(M20>=LL AND M20<=HH,M20,DRAWNULL),DOTLINE,COLORFF00FF;MA60:IF(M60>=LL AND M60<=HH,M60,DRAWNULL),DOTLINE,COLOR00FF00;MA120:IF(M120>=LL AND M120<=HH,M120,DRAWNULL),DOTLINE,COLORAAAAAA;MA250:IF(M250>=LL AND M250<=HH,M250,DRAWNULL),DOTLINE,COLORFF8800;昨H:IF(昨高>=LL AND 昨高<=HH,昨高,DRAWNULL),COLOR0000FF,CIRCLEDOT;昨L:IF(昨低>=LL AND 昨低<=HH,昨低,DRAWNULL),COLOR00FF00;BLXS:=-LOG(MINDIFF);T昨H:=VARCAT(' ◆昨高:',VAR2STR(昨高,BLXS));T昨L:=VARCAT(' ◆昨低:',VAR2STR(昨低,BLXS));TM5:=VARCAT(' ◆ M5:',VAR2STR(M5,BLXS));TM10:=VARCAT(' ◆ M10:',VAR2STR(M10,BLXS));TM20:=VARCAT(' ◆ M20:',VAR2STR(M20,BLXS));TM60:=VARCAT(' ◆ M60:',VAR2STR(M60,BLXS));TM120:=VARCAT(' ◆ M120:',VAR2STR(M120,BLXS));TM250:=VARCAT(' ◆ M250:',VAR2STR(M250,BLXS));TM:=VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(V ARCAT(T昨H,T昨L),TM5),TM10),TM20),TM60),TM120),TM250);DRAWTEXT_FIX(ISLASTBAR AND FROMOPEN>5 AND DYNAINFO(14)<0,0,0,0,TM),COLOR00FFFF;DRAWTEXT_FIX(ISLASTBAR AND FROMOPEN>5 AND DYNAINFO(14)>=0,0,0.99,0,TM),COLOR00FFFF;DRAWTEXT(TIME=930,昨H,IF(CONST(TIME)>1000,T昨H,VAR2STR(昨H,BLXS))),COLOR0000FF;DRAWTEXT(TIME=930,昨L,IF(CONST(TIME)>1000,T昨L,VAR2STR(昨L,BLXS))),COLOR00FF00;DRAWTEXT(TIME=930,MA5,IF(CONST(TIME)>1000,TM5,VA R2STR(MA5,BLXS))),COLORFFFFFF;DRAWTEXT(TIME=930,MA10,IF(CONST(TIME)>1000,TM10,V AR2STR(MA10,BLXS))),COLOR00FFFF;DRAWTEXT(TIME=930,MA20,IF(CONST(TIME)>1000,TM20,V AR2STR(MA20,BLXS))),COLORFF00FF;DRAWTEXT(TIME=930,MA60,IF(CONST(TIME)>1000,TM60,V AR2STR(MA60,BLXS))),COLOR00FF00;DRAWTEXT(TIME=930,MA120,IF(CONST(TIME)>1000,TM12 0,VAR2STR(MA120,BLXS))),COLORAAAAAA;DRAWTEXT(TIME=930,MA250,IF(CONST(TIME)>1000,TM25 0,VAR2STR(MA250,BLXS))),COLORFF8800;TEXTC:=VARCAT(VARCAT(VAR2STR(100*C/DYNAINFO(3)-100,2),'% ◆ '),VAR2STR(C,BLXS));TEXTJ:=VARCAT(VARCAT(VAR2STR(100*ZSTJJ/DYNAINFO(3) -100,2),'% ◆ '),VAR2STR(ZSTJJ,BLXS));DRAWTEXT(TIME>925 AND ISLASTBAR,C,VARCAT(' ',TEXTC)),COLORWHITE;DRAWTEXT(TIME>925 AND ISLASTBAR,ZSTJJ,VARCAT(' ',TEXTJ)),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND DYNAINFO(14)<0,0.99,0.20,1,TEXTC),COLORWHITE;DRAWTEXT_FIX(ISLASTBAR AND DYNAINFO(14)<0,0.99,0.00,1,TEXTJ),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND DYNAINFO(14)>=0,0.99,0.80,1,TEXTC),COLORWHITE;DRAWTEXT_FIX(ISLASTBAR AND DYNAINFO(14)>=0,0.99,0.99,1,TEXTJ),COLORYELLOW;ZDXS:=IF((FINANCE(3)=4 OR (DATE>1200822&&FINANCE(3)=3)),0.2,0.1);ZT:=C>=ZTPRICE(DYNAINFO(3),ZDXS);DT:=C<=DTPRICE(DYNAINFO(3),ZDXS);WZC:=VAR2STR(C,BLXS);N:=10;DH1:=HHV(C,2*N+1)=REF(C,N);DH2:=FILTER(DH1,N);DH3:= BACKSET(DH2,N+1);DH:=FILTER(DH3,N);DRAWTEXT(FILTERX(C=HH,N),C,WZC),COLOR0000FF;DRAWTEXT(C<>HH AND NOT(DT) AND DH,C,WZC),COLORFF00FF,DRAWABOVE;TJH:=C=REFX(HHV(C,N),CURRBARSCOUNT-1) ANDRANGE(CURRBARSCOUNT,1,N);DRAWTEXT(C<>HH AND NOT(DT) AND FILTERX(TJH,N),C,WZC),COLORFF00FF,DRAWABOVE;DL1:=LLV(C,2*N+1)=REF(C,N);DL2:=FILTER(DL1,N);DL3:=BA CKSET(DL2,N+1);DL:=FILTER(DL3,N);DRAWTEXT(FILTERX(C=LL,N),C,WZC),COLOR00FF00,DRAWA BOVE;DRAWTEXT(C<>LL AND NOT(ZT) AND DL,C,WZC),COLORFFFF00,DRAWABOVE;TJL:=C=REFX(LLV(C,N),CURRBARSCOUNT-1) AND RANGE(CURRBARSCOUNT,1,N);DRAWTEXT(C<>LL AND NOT(ZT) AND FILTERX(TJL,N),IF(C<=LL*1.01,C,DRAWNULL),WZC),COLORFFFF0 0,DRAWABOVE;DRAWTEXT(C<>LL AND NOT(ZT) AND FILTERX(TJL,N),IF(C>LL*1.01,C,DRAWNULL),WZC),COLORFFFF00;{DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(DH,2)),C, CURRBARSCOUNT=CONST(SUMBARS(DH,1)),C,1),COLORFF00FF ,DOTLINE;DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(DL,2)),C, CURRBARSCOUNT=CONST(SUMBARS(DL,1)),C,1),COLORFFFF00, DOTLINE;};公:DRAWNULL,COLORCCCCCC;众:DRAWNULL,COLORCCCCCC;号:DRAWNULL,COLORCCCCCC;股市客栈:DRAWNULL, COLORFF00FF;N:=120;K:=BARSLAST(CURRBARSCOUNT=N);GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}KJ:=GD-DD;{高低点差值=分区高度}GD4:=IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL);高区:IF(CURRBARSCOUNT<=N,GD,DRAWNULL),COLORRED,LINET HICK2;低区:IF(CURRBARSCOUNT<=N,DD,DRAWNULL),COLOR00FF00,LIN ETHICK2;平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLOR00F FFF,NODRAW;低:IF(CURRBARSCOUNT<=N/2,DD,DRAWNULL),COLORFFFF 00;高:IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL),COLOR00FF FF;支撑:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL);强势: IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL);突破:IF(CURRBARSCOUNT<=N/2,DD+KJ/2,DRAWNULL);警示:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,DRAWNULL);压力:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.809,DRAWNULL);低涨:IF(CURRBARSCOUNT<=N/2,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;天数:BARSLAST(L=DD),COLORCYAN,NODRAW;顶点:IF(CURRBARSCOUNT<=N/2, CONST(IF(ISLASTBAR=1,HHV(H,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED, CROSSDOT;低点:IF(CURRBARSCOUNT<=N/2, CONST(IF(ISLASTBAR=1,LLV(L,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAG ENTA,CROSSDOT;STICKLINE(CCI>=200 AND H>=顶点,O,C,2,0),COLORBLUE;STICKLINE(CCI<=100 AND L<=低点,O,C,2,0),COLORYELLOW;{更多指标关注公众号:股市客栈}STICKLINE(CURRBARSCOUNT=N,GD,DD,0,0),COLORGREEN;STICKLINE(CURRBARSCOUNT=N/2,GD,DD,0,0),COLOR40808 0;STICKLINE(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;STICKLINE(CURRBARSCOUNT<=N/2,支撑,支撑,2,0);STICKLINE(CURRBARSCOUNT<=N/2,强势,强势,2,0);STICKLINE(CURRBARSCOUNT<=N/2,突破,突破,2,0);STICKLINE(CURRBARSCOUNT<=N/2,警示,警示,2,0);STICKLINE(CURRBARSCOUNT<=N/2,压力,压力,2,0);DRAWTEXT(CURRBARSCOUNT=10,压力,'压力-0.809'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=10,警示,'警示-0.618'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=10,突破,'突破-0.500'),COLORFFFFFF;DRAWTEXT(CURRBARSCOUNT=10,强势,'强势-0.382'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=10,支撑,'支撑-0.191'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.09,'高抛'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.3,'减仓'),COLOR0000FF;DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.45,'拉升'),COLORFFFFFF;DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.55,'蓄势'),COLORFFFF80;DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/3,'逢低买入'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/10,'大胆买入'),COLOR00FF00;DRAWTEXT(CURRBARSCOUNT=N/2+40,GD-KJ*0.25,'【拉升区】'),COLORRED;DRAWTEXT(CURRBARSCOUNT=N/2+40,DD+KJ*0.25,'【持股区】'),COLORYELLOW;第一防线:REFDATE(低,DATE),POINTDOT,COLORYELLOW,LINETHICK4;第二防线:REFDATE(支撑,DATE),POINTDOT,COLORWHITE,LINETHICK4;{今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299;}DRAWKLINE(H,O,L,C);AHC1:=CLOSE*VOL;AHC22:=EMA((EXPMA(AHC1,27)/EXPMA(VOL,27)+EXPMA( AHC1,54)/EXPMA(VOL,54)+EXPMA(AHC1,108)/EXPMA(VOL,108) +EXPMA(AHC1,316)/EXPMA(VOL,316))/4,34);上轨:=1.06*AHC22,COLOR40FF00,LINETHICK1;下轨:=AHC22*0.94;{STICKLINE(上轨>下轨,上轨,下轨,5,0),COLOR555555;}ZT:=REF(C,1)*1.1-C<0.01 AND H=C;启爆:=CROSS(C,上轨) OR CROSS(C,下轨) AND ZT;DRAWTEXT(启爆,L,'');STICKLINE(启爆,C,O,3,1);STICKLINE(启爆,C,O,1,0);公:DRAWNULL,COLORCCCCCC;众:DRAWNULL,COLORCCCCCC;号:DRAWNULL,COLORCCCCCC;股市客栈:DRAWNULL,COLORCCCCCC;。
通达信分时突破(均价线、分时压力、分时支撑)指标公式源码
分时顶:HHV(H,480),COLORRED,LINETHICK2;
现价:C,COLORWHITE,LINETHICK2;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
通达信分时突破均价线分时压力分时支撑指标公式源码
通达信分时突破(均价线、分时压力、分时支撑)指标公式源码
{分时突破}
{macd}
ZX:=DYNAINFO(3);
价位轴:ZX,COLORLICYAN;
CLOSE,26);
DEA:= EMA(DIFF,9);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
{均线5:MA(C,5)LINETHICK1,COLORCYAN;}
均价线:SUM(现价*V,240)/SUM(V,240),COLORYELLOW;
分时压力:MA(REF(HHV(C,30),1),2),COLORMAGENTA;
分时支撑:MA(REF(LLV(C,30),1),2),COLORBLUE;
DRAWICON(W4 AND COUNT(W4,5)=1,分时压力,9);
攻击:=2*(DIFF-DEA)*2, COLORSTICK;
STICKLINE(攻击>REF(攻击,1) AND DIFF>DEA,攻击+ZX,ZX,1,0),COLORRED;
STICKLINE(攻击<REF(攻击,1) AND 攻击>0,攻击+ZX,ZX,1,0),COLORGREEN;
通达信经典分时主图 源码指标公式
DRAWGBK(O>=0,RGB(60,35,0),RGB(0,60,60),0,'背景图',0),LINETHICK2;{========================额外==========================} 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,ZHBLOCK)),COLORCYAN;DRAWTEXT_FIX(ISLASTBAR,0,0.14,0,STRCAT('概念: ',GNBLOCK)),COLORWHITE;A1:=(VOL/CLOSE)/3;A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);突破:=REF(EMA(C,14),1);A1X:=(EMA(C,10)-突破)/突破*100;多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL); STICKLINE(A1X>=0,多方,突破,0,0),COLOR000099;STICKLINE(A1X<0,空方,突破,0,0),COLOR00CC66;最新:CLOSE,LINETHICK1,COLORWHITE;AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));BB:=BETWEEN(C/AA,C+H,C-H);DRAWTEXT( ISLASTBAR AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;DRAWTEXT( ISLASTBAR AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;DRAWTEXT_FIX(1,0.880,1-0.97,0,DYBLOCK),COLORWHITE;DRAWTEXT_FIX(1,0.940,1-0.97,0,HYBLOCK),COLORYELLOW;均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;DXJP:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,21)-LLV(LOW,34))*100;FSZX:=(EMA(DXJP,3)-50)*2,COLORGRAY;BGTYU:=IF(DATE<=1150530,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)) )/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU))) ));DRAWICON(FSZX<=-95,C,38);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),C,'板'),COLORCYAN; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),C,'追'),COLORYELLOW;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8,COLORGREEN;支撑:=L1+P1*0.5/8,COLORMAGENTA;DRAWICON(LONGCROSS(支撑,C,2),C,5);AYGB1:=(DVOL/C)/2,NODRAW;AYGB2:=SUM(IF(AYGB1>100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB3:=SUM(IF(AYGB1>100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB4:=SUM(IF(AYGB1<100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB5:=SUM(IF(AYGB1<100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5;机买:=(AYGB2/AYGB6)*100-100,LINETHICK1,COLORRED;机卖:=(AYGB3/AYGB6)*100-100,LINETHICK1,COLORGREEN;主力差:=机买-机卖;LQH:=主力差>0 AND REF(主力差,1)<=0;DRAWICON(LQH,C,25);JJXX:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM( AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW;JJXXH:=(JJXX*1.007 ),COLORFF6600;FFLL:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;HHPP:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)< 1;HHZZ:=HHPP AND FFLL AND (C>JJXXH);TTPP2:=FILTER(HHZZ,100);DRAWICON(TTPP2,C,26);ZS:=DYNAINFO(3);KP:=DYNAINFO(4);ZX:=DYNAINFO(7);ZG:=DYNAINFO(5);ZD:=DYNAINFO(6);分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW;RC:=DYNAINFO( 3);量比超2.5:=IF(DYNAINFO(17)>2.5,RC-0.15,DRAWNULL),COLORFF9933;量比超5:=IF(DYNAINFO(17)>5,RC-0.15,DRAWNULL),COLORBA75FF;DRAWBAND(量比超2.5,RGB(51,153,255),量比超2.5+0.015,RGB(51,153,255)); DRAWBAND(量比超5,RGB(255,118,188),量比超5+0.015,RGB(255,118,188));{首次起爆}TT:=BARSCOUNT(C);{取得有效收盘价}均价黄:SUM(C*V,TT)/SUM(V,TT),LINETHICK1,COLOR00FFE1;{分时均线的取值}量两步:=MA(V,5)>REF(MA(V,5),1) AND REF(MA(V,5),1)>REF(MA(V,5),2);价两步:= C>=REF(C,1) AND REF(C,1)>REF(C,2);价上岗量破5:=C>均价黄AND V>MA(V,5);量起爆:=V>=REF(V,1)*2 ;价创新高:=C>=HHV(C,0);量创新高:=V>=HHV(V,0);对昨日涨幅:=C/DYNAINFO(3)<=1.02;{涨幅控制2个点以内}每日一点:=量两步AND 价两步AND 价上岗量破5 AND 量起爆AND 价创新高AND 量创新高AND 对昨日涨幅;{计算收益、已爆分钟}VC:=BARSSINCE(每日一点)+1;首次起爆价:REF(C,VC-1),NODRAW;今天收益:(DYNAINFO(7)-首次起爆价)/首次起爆价*100,NODRAW;起爆时间:REF(TIME/10000,VC),NODRAW;已爆分钟:VC-1,NODRAW;首次起爆量:=REF(VOL,VC-1);DRAWICON(已爆分钟>=2,RC-0.1,11);{出现金手指,至少已经确认2分钟了};R1:=MA(C,13);R2:=SMA(R1,5,2);DRAWBAND(R1,RGB(255,0,125),R2,RGB(0,111,255));C,LINETHICK2,COLORDDDDDD;{涨停}地:=DYNAINFO(11)+(DYNAINFO(11)*0.021);涨停:IF(DYNAINFO(7)>地,1,0),NODRAW,COLOR0088FF;涨:=IF(涨停=1,C+0.0075,DRAWNULL),COLOR8000FF,LINETHICK2;DRAWBAND(涨,RGB(255,211,0),C-0.0075,RGB(255,125,0));时间:=TIME=100000;N:=BARSLAST(时间);常数:=CONST(IF(N=0,C,REF(C,N))),COLORGREEN,DOTLINE;CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N)));CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N)));STICKLINE(时间=1,CS1,CS2,1.2,0),COLOR008888;{涨停2}AAZ:=BARSLAST(TIME=103000);CC:=REF(HHV(C,0),AAZ+1);VV:=REF(HHV(V,0),AAZ+1);ZF:=CC/DYNAINFO(3)<1.05;涨停2:=CROSS(C,CC) AND V>VV AND ZF,COLOR0000FF; DRAWICON(涨停2,RC-0.06,13);A:=O>C AND C>REF(C,1) AND O/REF(C,1)>1.03; DRAWTEXT(ABS(A)>0,L, '假阴'),COLORYELLOW;均价5:AMOUNT/VOL/100,NODRAW;假阴0:=O>C AND 均价5>REF(C,1);DRAWTEXT(假阴0,L-0.2,'假阴真阳'),COLORE8E8E8; STICKLINE(假阴0,O,C,1,0),COLORRED;时间N:=TIME=100000;NN:=BARSLAST(时间N),COLOR808080;常数N:CONST(IF(NN=0,C,REF(C,N))),COLOR004848,DOTLINE;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
{分时主图--止赢止损}
MA1:=EMA(C,30);
MA2:=EMA(C,900);
STICKLINE((MA1>MA2),MA1,MA2,0,0),COLOR1000FF;
STICKLINE((MA1<MA2),MA1,MA2,0,0),COLOR00FF00;
GJ:C,COLORWHITE;
JJ:SUM(C*V,FROMOPEN)/SUM(V,FROMOPEN),COLORYELLOW,LINETHICK1.5;
均量:=MA(V,5);
量连增:=均量>REF(均量,1) AND REF(均量,1)>REF(均量,2);
价连涨:=C>=REF(C,1) AND REF(C,1)>REF(C,2);
价量线上:=C>JJ AND V>均量;
倍量:=V>=REF(V,1)*2 ;
价新高:=C>=HHV(C,FROMOPEN);
量新高:=V>=HHV(V,FROMOPEN);
限幅:=C/DYNAINFO(3)<=1.02;
起爆:=FILTER(量连增AND 价连涨AND 价量线上AND 倍量AND 价新高AND 量新高AND 限幅,20);
DRAWTEXT(起爆,C,'起爆'),COLOR00FFFF;
DRAWICON(起爆,C,1);
STICKLINE(起爆,C,JJ,1,0),COLOR1000FF;
VV:=BARSSINCE(起爆);
起爆价:=REF(C,VV);
起爆时间:=REF(TIME/10000,VV);
收益:=(DYNAINFO(7)-起爆价)/起爆价*100;
DRAWICON(VV>=2,起爆价,13);
DRAWTEXT_FIX(1,0,1,0,'起爆时间:'),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.06,1,0,CONST(起爆时间)),COLOR00FFFF;
DRAWTEXT_FIX(1,0.12,1,0,'起爆价:'),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.17,1,0,CONST(起爆价)),COLOR00FFFF;
DRAWTEXT_FIX(1,0.24,1,0,'收益:'),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.28.06,1,0,CONST(收益)),COLOR00FFFF;
流通盘:CAPITAL*100/100000000,NODRAW;
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),NODRAW;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),NODRAW;
资金出入:=资金流入+资金流出,NODRAW;
NN:=2400,NODRAW;
HD:=HHV(资金出入,NN),NODRAW;
LD:=LLV(资金出入,NN),NODRAW;
最高:=CONST(HD),NODRAW;
最低:=CONST(LD),NODRAW;
HLMAX:=最高;
HLMIN:=最低;
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=(100-0)/2*1.3;
HLMN4:=(100-0)/1*1.3;
中间价轴:=(50-HLMN3)*HLMN2/HLMN4+HLMN1;
轴差:=最高-最低;
DRAWBAND(资金出入,RGB(150,0,150),0,RGB(0,100,0)),NODRAW;
资金流量:资金出入,NODRAW;
资金比:资金出入/SUM(V,FROMOPEN)*100,NODRAW;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2)),NODRAW;
攻击
量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPE N,NODRAW;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),NODRAW;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),NODRAW;
攻击流量:攻击量A+攻击量B,NODRAW;
NOTEXT攻击线:攻击流量,NODRAW;
攻击比:攻击流量/SUM(V,FROMOPEN)*100,COLORRED,NODRAW;
资金攻击度:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50)));
{STICKLINE(资金流量A>0,资金流量A,0,1,0),COLOR0000FF;
STICKLINE(资金流量B<0,资金流量B,0,1,0),COLORFF0000;}
DRAWRECTREL(110,10,400,90,RGB(0,75,200));
DRAWRECTREL(110,10,250,90,RGB(0,250,50));
DRAWRECTREL(110,10,100+CONST(资金流量比*300/100),90,RGB(200,50,0)); DRAWTEXT_FIX(1,0.000,0.00,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),COLORYELLOW;
DRAWRECTREL(610,10,900,90,RGB(0,75,200));
DRAWRECTREL(610,10,750,90,RGB(0,250,50));
DRAWRECTREL(610,10,600+CONST(资金攻击度*300/100),90,RGB(175,50,0)); DRAWTEXT_FIX(1,0.500,0.00,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),COLORYELLOW;
MA30:=EMA(CLOSE,30);
强弱:EMA(CLOSE,900);
STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00DD00;
支撑:L1+P1*0.5/8,COLOR00DD00;
现价:CLOSE,COLORWHITE,LINETHICK1;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★B吸'),COLORWHITE;{吸} DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★S抛'),COLORGREEN;{抛};
{T+1止赢、止损}
止赢:H1,COLORRED,LINETHICK6;
DRAWTEXT(ISLASTBAR,H1,'当日止赢价位'),COLORRED,LINETHICK6;
止损:阻力,COLORBLUE,LINETHICK6;
DRAWTEXT(ISLASTBAR,阻力,'高位止损价位'),COLORBLUE,LINETHICK6;
最后止损:支撑,COLORGREEN,LINETHICK6;
DRAWTEXT(ISLASTBAR,支撑,'低位止损价位'),COLORGREEN,LINETHICK6;
UR:=10;LR:=10;
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;。