战必胜分时图指标通达信指标公式源码
通达信指标公式源码分时趋势(分时副图)
分时趋势(分时副图)源码如下: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,COLORBROWN;支撑绿色:L1+P1*0.5/8,COLOR00DD00;现价:CLOSE,COLORWHITE,LINETHICK2;STICKLINE(CROSS(支撑绿色,现价),支撑绿色,阻力棕色,1,0),COLORYELLOW; BG:=IF(DATE<=1150530,1,0);GH:=BETWEEN((DCLOSE*BG)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/ SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))),1.05,0.95);VB:=IF(GH=0,MA((DCLOSE*BG),BARSCOUNT((DCLOSE*BG))),(SUM(AMOUN T,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG))))); 快趋势线:EXPMA((DCLOSE/VB),21),COLORYELLOW,NODRAW;慢趋势线:EXPMA((DCLOSE/VB),54),COLORGREEN,NODRAW;A1:=C/快趋势线;A2:=C/慢趋势线;A:=IF(C/快趋势线=A1,快趋势线*A1,快趋势线);B:=IF(C/慢趋势线=A2,慢趋势线*A2,慢趋势线);顶点:=IF(CURRBARSCOUNT<=330,CONST(IF(ISLASTBAR=1,HHV(A,BARSLAST(CURRBARSCOUNT=100)),1)),DRAWNULL),COLORCC3299, DOTLINE;低点:=IF(CURRBARSCOUNT<=330,CONST(IF(ISLASTBAR=1,LLV(A,BARSLAST(CURRBARSCOUNT=100)),1)),DRAWNULL),COLORLIGREEN, COLORBROWN,DOTLINE;中线:(顶点+低点)/2,COLORBLUE;V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势线:=EMA(V11,3);V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;BB:=(趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10); CCC:=(趋势线>=90 AND V12) AND FILTER((趋势线>=90 AND V12),10);见顶清仓:=STICKLINE(趋势线>=90 AND V12,中线,A,2,0),COLORCYAN; STICKLINE(快趋势线>1 AND 快趋势线>REF(快趋势线,1) AND 快趋势线>慢趋势线,A,MA30,1,0),COLORMAGENTA;B1:A,LINETHICK1;B2:B,LINETHICK1;B3:MA30,LINETHICK1;DRAWICON(CCC,A,12);DRAWICON(BB,A,23);DRAWICON(CROSS(快趋势线,中线),A,1);DRAWICON(CROSS(慢趋势线,中线) AND (快趋势线>中线),中线-0.002,15); DRAWICON(CROSS(快趋势线,慢趋势线),B,13);DRAWICON(CROSS(慢趋势线,快趋势线),B,2);DRAWTEXT(CROSS(中线,快趋势线),中线,'注意'),COLORWHITE; DRAWTEXT(CROSS(EXPMA((DCLOSE/VB),20),1),A-0.025,'涨'),COLORRED; DRAWTEXT(BB,A-0.015,'↑补仓'),COLORLIRED;DRAWTEXT(CROSS(快趋势线,中线),A-0.055,'↑买进'),COLORYELLOW; DRAWTEXT(LONGCROSS(支撑绿色,现价,2),支撑绿色*1.001,'↑B'),COLORYELLOW;DRAWTEXT(LONGCROSS(现价,阻力棕色,2),现价,'↓抛'),COLORGREEN;。
通达信指标公式源码 分时主图指标
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;。
通达信分时主图通达信指标公式源码
通达信分时主图一、先建引用指标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);四、注意事项分时主图中的红绿箭头是即时动态的,会根据行情变化的,只能参考。
通达信指标公式源码 好用分时突破指标
均线: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, LINETHICK1;均线H:=(均线*1.007 ),COLORLICYAN;均线L:=(均线/1.005 ),COLORWHITE;均线横盘:=C<均线H AND C>均线L;放量:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/ CLOSE)<1;收:DYNAINFO( 3),COLORWHITE,LINETHICK2;横涨:=横盘AND 放量AND (C>均线H);横跌:=横盘AND 放量AND CROSS(均线L,C) ;突破:=FILTER(横涨,100);下破:=FILTER(横跌,50) ;DRAWTEXT(突破,C*1.01,'突破'),COLORWHITE;现价:C,COLORWHITE;AA:=MA((2*CLOSE+HIGH+LOW)/4,5);谷1:AA*102/100,COLORMAGENTA;BGTYU:=IF(DATE<=1130107,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOS E*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,BARSCOUN T((DCLOSE*BGTYU)))));DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.98,'买进'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.99,1);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/V BNH),120)),现价,'主穿散')COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),现价*0.98,55),COLORWHITE;MA30:=EMA(CLOSE,30);强弱界定:=EMA(CLOSE,900);DRAWICON(CROSS(MA30,强弱界定),现价*0.98,34);VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR3:=(VAR1+VAR2)/2;VAR4:=EMA(VAR3,30);VAR5:=EMA(VAR3,60);VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);趋势关注:=IF(CROSS(VAR1,EMA(VAR1,60)) ANDVAR6,1,0);DRAWBAND(VAR1*0.96,RGB(150,30,30),EMA(VAR1,60)*0.96,RGB( 0,110,30));DRAWTEXT(趋势关注=1,C*0.97,'转折'),COLORWHITE;DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIFF,9),COLORFFFF00;MACD:=(DIFF-DEA)*2;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA);DRAWTEXT(底背离,L*0.98,'↖底背'),COLORYELLOW; GDK:=(SMA(C,2,1)-SMA(C,6,1))*8;ZSR:DYNAINFO( 3)*0.96;STICKLINE(GDK>0,ZSR,ZSR+GDK,0,0) ,COLORRED;STICKLINE(GDK<=0,ZSR,ZSR+GDK,0,0) ,COLORGREEN;STICKLINE(GDK>0 ,ZSR+GDK*0.05,ZSR+GDK*0.15,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.2,ZSR+GDK*0.35,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.4,ZSR+GDK*0.55,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.6,ZSR+GDK*0.75,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.8,ZSR+GDK*0.95,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.86,ZSR+GDK*0.999,0,0) ,COLORRED; STICKLINE(GDK<=0 ,(ZSR+GDK*0.05),(ZSR+GDK*0.15),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.2),(ZSR+GDK*0.35),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.4),(ZSR+GDK*0.55),0,0),COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.6),(ZSR+GDK*0.75),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.8),(ZSR+GDK*0.95),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.86),(ZSR+GDK*0.999),0,0) ,COLORGREE N;均价:DYNAINFO(11),COLORGREEN,DOTLINE;神奇:=HHV(MA(H,13),45),COLORGREEN,LINETHICK4;奇特:=LLV(MA(H,13),1),COLORWHITE;STICKLINE(神奇=奇特,DYNAINFO( 3)*0.935,DYNAINFO( 3)*0.938,2,1),COLORMAGENTA;MA25:= EMA(CLOSE,25);牛熊分水岭:=EMA(CLOSE,905);STICKLINE((MA25 > 牛熊分水岭),DYNAINFO( 3)*0.925,DYNAINFO( 3)*0.928,4,0),COLORRED; 均线2:=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; 均线H1:=(均线2*1.005 ),COLORFF6600;均线L1:=(均线2/1.002 ),COLOR00FF00;均线横盘1:=C<均线H1 AND C>均线L1;STICKLINE(均线横盘1,DYNAINFO( 3)*0.921,DYNAINFO( 3)*0.923,3,0),COLORYELLOW;。
【指标公式源码下载】通达信超准分时图指标公式
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),1.02+0.005,18);
STICKLINE(EXPMA((DCLOSE/VBNH),120)>1.003 ,1.03,1.039,1.0,0),COLORMAGENTA; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.028,'买进'),COLORWHITE;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.036,'观察分时量'),COLORWHITE;
高线:1.03,COLORRED,LINETHICK3;
黄色起动线:EXPMA((DCLOSE/VBNH),20),COLORYELLOW,POINTDOT;
绿色散户线:EXPMA((DCLOSE/VBNH),120),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/VBNH),120)),EX PMA((DCLOSE/VBNH),60)*1,1);
文档之家?指标公式源码下载通达信超准分时图指标公式
【指标公式源码下载】通达信超准分时图指标公式
通达信超准分时图指标公式
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG TYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);
通达信指标公式源码 股神必胜 主图源码
股神必胜源码N:=13;M:=55;P:=3;RSV1:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;RSV2:=(CLOSE-LLV(LOW,M))/(HHV(HIGH,M)-LLV(LOW,M))*100;J1:=3*SMA(RSV1,P,1)-2*SMA(SMA(RSV1,P,1),P,1);J2:=3*SMA(RSV2,P,1)-2*SMA(SMA(RSV2,P,1),P,1);支撑位:IF(CROSS(J1,J2),LOW,REF(LOW,BARSLAST(CROSS(J1,J2))));压力位:IF(CROSS(J2,J1),HIGH,REF(HIGH,BARSLAST(CROSS(J2,J1))));YC_VAR1:=EMA(CLOSE,5);YC_VAR2:=EMA(CLOSE,10);YC_VAR3:=EMA(CLOSE,20);YC_VAR4:=EMA(CLOSE,30);YC_VAR5:=(YC_VAR1+YC_VAR2+YC_VAR3+YC_VAR4)/4;YC_VAR6:=(YC_VAR5-REF(YC_VAR5,15))/REF(YC_VAR5,15)*100;YC_买进:=((CLOSE-REF(MA(CLOSE,6),1))/6+MA(CLOSE,6))*1.004;买进条件:=CROSS(CLOSE,YC_买进) AND YC_买进>REF(YC_买进,1),LINETHICK0; YC_加仓:=((CLOSE-REF(MA(CLOSE,18),1))/18+MA(CLOSE,18))*1.004;加仓条件:=CROSS(CLOSE,YC_加仓) AND YC_加仓>REF(YC_加仓,1),LINETHICK0; YG_回挡:=SMA(HIGH,21,2) * 1.05;YG_卖出:=(CLOSE < REF(CLOSE,1) AND HIGH > YG_回挡) AND CLOSE < YG_回挡;◆满仓:=买进条件AND 加仓条件,LINETHICK0;STICKLINE(YC_VAR6<1*REF(YC_VAR6,1),H,O,0,0),COLORBLUE;STICKLINE(YC_VAR6<1*REF(YC_VAR6,1),C,L,0,0),COLORBLUE;STICKLINE(YC_VAR6<1*REF(YC_VAR6,1),C,O,4,1),COLORBLUE;STICKLINE(C<=O,C+C/500,O-O/500,3,0),COLORGREEN;STICKLINE(C>O AND 加仓条件,C,H,0,0),COLORYELLOW;STICKLINE(C>O AND 加仓条件,L,O,0,0),COLORYELLOW;STICKLINE(C>O AND 加仓条件,C,O,4,0),COLORYELLOW;STICKLINE(C>O AND 买进条件,C,H,0,0),COLORRED;STICKLINE(C>O AND 买进条件,L,O,0,0),COLORRED;STICKLINE(C>O AND 买进条件,C,O,4,0),COLORRED;STICKLINE(C>O AND 加仓条件AND 买进条件,C,H,0,0),COLORFF0080;STICKLINE(C>O AND 加仓条件AND 买进条件,L,O,0,0),COLORFF0080; STICKLINE(C>O AND 加仓条件AND 买进条件,C,O,4,0),COLORFF0080; STICKLINE(C<O AND YG_卖出,H,O,0,0),COLORBLUE;STICKLINE(C<O AND YG_卖出,C,L,0,0),COLORBLUE;STICKLINE(C<O AND YG_卖出,C,O,3,0),COLORBLUE;DRAWTEXT(买进条件AND 加仓条件=1,L/1.01,'买'),COLORRED; DRAWTEXT(买进条件AND 加仓条件=1,L/1.03,'进'),COLORRED; DRAWTEXT(加仓条件AND 买进条件=1,L/1.01,'加'),COLORYELLOW; DRAWTEXT(加仓条件AND 买进条件=1,L/1.03,'仓'),COLORYELLOW;。
战斗主图通达信指标公式源码
战斗主图通达信指标公式源码1.简介2.源码以下是战斗主图通达信指标公式的源码示例:include计算战斗主图double calculateBattleGraph(double open。
double close。
double high。
double low) {double battleGraph = (high + low + close * 2) / 4;return battleGraph;int main() {double open = 10.0;double close = 12.0;double high = 13.0;double low = 9.0;double battleGraph = calculateBattleGraph(open。
close。
high。
low);printf("战斗主图:%.2lf\n"。
battleGraph);return 0;以上源码是一个简单的 C 语言示例,用于计算战斗主图指标。
通过传入开盘价、收盘价、最高价和最低价,将计算后的战斗主图值返回。
在本示例中,开盘价为 10.0,收盘价为 12.0,最高价为13.0,最低价为 9.0.3.使用说明使用以上源码计算战斗主图指标的方法如下:1.将源码保存为一个名为 `battle_graph.c` 的文件,扩展名为 `.c` 表示该文件为 C 语言源码文件。
2.打开一个 C 语言编译器,如 ___。
3.在编译器中打开 `battle_graph.c` 文件。
4.编译并运行源码,得到战斗主图指标的计算结果。
4.注意事项在使用以上源码进行计算之前,需要先安装 C 语言编译器,并确保编译器能正常运行。
本示例中传入的价格数据为虚拟数据,请根据实际情况自行修改。
以上是战斗主图通达信指标公式的源码和使用说明。
希望本文档能帮助您了解该指标的计算方法以及如何使用该源码进行指标计算。
如有任何疑问,可随时联系我们。
通达信-分时指标-主图源码
通达信-分时指标-主图源码通达信-分时指标-主图源码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;。
通达信指标公式源码 好用分时突破指标
均线: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, LINETHICK1;均线H:=(均线*1.007 ),COLORLICYAN;均线L:=(均线/1.005 ),COLORWHITE;均线横盘:=C<均线H AND C>均线L;放量:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/ CLOSE)<1;收:DYNAINFO( 3),COLORWHITE,LINETHICK2;横涨:=横盘AND 放量AND (C>均线H);横跌:=横盘AND 放量AND CROSS(均线L,C) ;突破:=FILTER(横涨,100);下破:=FILTER(横跌,50) ;DRAWTEXT(突破,C*1.01,'突破'),COLORWHITE;现价:C,COLORWHITE;AA:=MA((2*CLOSE+HIGH+LOW)/4,5);谷1:AA*102/100,COLORMAGENTA;BGTYU:=IF(DATE<=1130107,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOS E*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,BARSCOUN T((DCLOSE*BGTYU)))));DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.98,'买进'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.99,1);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/V BNH),120)),现价,'主穿散')COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),现价*0.98,55),COLORWHITE;MA30:=EMA(CLOSE,30);强弱界定:=EMA(CLOSE,900);DRAWICON(CROSS(MA30,强弱界定),现价*0.98,34);VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR3:=(VAR1+VAR2)/2;VAR4:=EMA(VAR3,30);VAR5:=EMA(VAR3,60);VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);趋势关注:=IF(CROSS(VAR1,EMA(VAR1,60)) ANDVAR6,1,0);DRAWBAND(VAR1*0.96,RGB(150,30,30),EMA(VAR1,60)*0.96,RGB( 0,110,30));DRAWTEXT(趋势关注=1,C*0.97,'转折'),COLORWHITE;DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIFF,9),COLORFFFF00;MACD:=(DIFF-DEA)*2;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA);DRAWTEXT(底背离,L*0.98,'↖底背'),COLORYELLOW; GDK:=(SMA(C,2,1)-SMA(C,6,1))*8;ZSR:DYNAINFO( 3)*0.96;STICKLINE(GDK>0,ZSR,ZSR+GDK,0,0) ,COLORRED;STICKLINE(GDK<=0,ZSR,ZSR+GDK,0,0) ,COLORGREEN;STICKLINE(GDK>0 ,ZSR+GDK*0.05,ZSR+GDK*0.15,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.2,ZSR+GDK*0.35,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.4,ZSR+GDK*0.55,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.6,ZSR+GDK*0.75,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.8,ZSR+GDK*0.95,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.86,ZSR+GDK*0.999,0,0) ,COLORRED; STICKLINE(GDK<=0 ,(ZSR+GDK*0.05),(ZSR+GDK*0.15),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.2),(ZSR+GDK*0.35),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.4),(ZSR+GDK*0.55),0,0),COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.6),(ZSR+GDK*0.75),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.8),(ZSR+GDK*0.95),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.86),(ZSR+GDK*0.999),0,0) ,COLORGREE N;均价:DYNAINFO(11),COLORGREEN,DOTLINE;神奇:=HHV(MA(H,13),45),COLORGREEN,LINETHICK4;奇特:=LLV(MA(H,13),1),COLORWHITE;STICKLINE(神奇=奇特,DYNAINFO( 3)*0.935,DYNAINFO( 3)*0.938,2,1),COLORMAGENTA;MA25:= EMA(CLOSE,25);牛熊分水岭:=EMA(CLOSE,905);STICKLINE((MA25 > 牛熊分水岭),DYNAINFO( 3)*0.925,DYNAINFO( 3)*0.928,4,0),COLORRED; 均线2:=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; 均线H1:=(均线2*1.005 ),COLORFF6600;均线L1:=(均线2/1.002 ),COLOR00FF00;均线横盘1:=C<均线H1 AND C>均线L1;STICKLINE(均线横盘1,DYNAINFO( 3)*0.921,DYNAINFO( 3)*0.923,3,0),COLORYELLOW;。
通达信决战分时指标源码(见下面效果图)
通达信决战分时指标源码(见下面效果图)决战分时指标副图是盘中及时发现异动个股,及时买进并实现利益最大化的最佳指标.指标性能优于DDX,DDY和其他一切副图指标,是主力的克星,散户的宝典.有了这个指标,买卖情况一目了然.指标用法注意事项:该指标时间一般在开盘一小时后效果最佳,对于盘中异动的个股发现及时,能够捕捉起涨个股,实战成功率在90%以上.由于通达信无法在分时上实现预警功能,因此该指标仅能用于观察,这是唯一美中不足的地方.下面以图例形式介绍该指标的优越性能和实战功效:决战分时指标源码ZX:=DYNAINFO(3);价位轴:=ZX{,COLORLICYAN};DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);DEA:= EMA(DIFF,9);攻击:=2*(DIFF-DEA)*2, COLORSTICK;分时顶:=HHV(H,480),COLORRED,LINETHICK2;现价:C,COLORWHITE,LINETHICK1;W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));均价线:SUM(现价*V,240)/SUM(V,240),COLORYELLOW;分时压力:MA(REF(HHV(C,30),1),2),COLORMAGENTA;分时支撑:MA(REF(LLV(C,30),1),2),COLORBLUE;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1 P1*7/8;支撑:=L1 P1*0.5/8;STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★进'),COLORYELLOW;{吸}DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★出'),COLORRED;{抛};。
通达信指标公式源码 不错的分时指标 副图源码
VAR1:=EMA(EMA(CLOSE,13),13);控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;STICKLINE(控盘<0,控盘,0,1,1),COLOR00FF00;STICKLINE(控盘>REF(控盘,1) AND 控盘<0,控盘,0,1,1),COLORFF00FF;无庄控盘:=控盘<0;STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLOR0000FF;有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;VAR2:=100*WINNER(CLOSE*0.95);STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLORFFFF00;主力出货:=控盘<REF(控盘,1) AND 控盘>0;STICKLINE(VAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,1,1),COLOR00FFFF; 高度控盘: VAR2>50 AND COST(85)<CLOSE AND 控盘>0,COLOR00FFFF,LINETHICK2; A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);{分时价格原码}JJ:=DYNAINFO(11);{波段买卖原码}P:=55;S:=8;M1:=3;财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK2;神:=EMA(财,M1),COLORGREEN,LINETHICK1;DRAWBAND(财,RGB(255,0,0),神,RGB(0,100,50));{股价与均线偏离买卖条件}BTJ1:=(C-JJ)/JJ<-0.03;BTJ11:=(C-JJ)/JJ<-0.03;BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005; STJ1:=(C-JJ)/JJ>0.005;{控盘买卖条件}STJ01:=控盘<REF(控盘,1) AND 控盘>0.5;STJ02:=控盘>0;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;{波段买卖条件}BTJ3:=CROSS(财,神) AND 财<-0.3;BTJ32:=CROSS(财,神) AND 财<-0.1;STJ31:=CROSS(神,财);STJ32:=CROSS(神,财) AND 财>1.618;{以下为信号};BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13); DRAWTEXT(BTJ81,神,'↑买底'),COLORRED; DRAWTEXT(BTJ811,神*1.2,'↑有庄'),COLORWHITE; STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);STJ82:=FILTER(STJ02 AND STJ32 ,13);STJ83:=STJ81 AND STJ82;DRAWTEXT(STJ83,神,'↓卖'),COLOR00FF00;DIFF: (EMA(CLOSE,8) - EMA(CLOSE,55))*10,COLORRED; DEA: EMA(DIFF,3),COLORGREEN;庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:FILTER(庄,55),COLORWHITE;DRAWTEXT(BTJ811,有庄,'有庄'),COLORWHITE;。
通达信指标公式源码 分时主图十点画大十字+三日K线
源码:O1:REF(O,1);C1:REF(C,1);H1:REF(H,1);L1:REF(L,1);O2:REF(O,2);C2:REF(C,2);H2:REF(H,2);L2:REF(L,2);O3:REF(O,3);C3:REF(C,3);H3:REF(H,3);L3:REF(L,3);二、分时主图10点画大十字+三日K线,名称随意起。
源码:O1:="SS.O1#DAY";C1:="SS.C1#DAY";H1:="SS.H1#DAY";L1:="SS.L1#DAY";O2:="SS.O2#DAY";C2:="SS.C2#DAY";H2:="SS.H2#DAY";L2:="SS.L2#DAY";O3:="SS.O3#DAY";C3:="SS.C3#DAY";H3:="SS.H3#DAY";L3:="SS.L3#DAY";GGJ:=CONST(IF(BARSLAST(TIME=93100),HHV(H,0),REF(HHV(H,0),BARSLAS T(TIME=93100))));DDJ:=CONST(IF(BARSLAST(TIME=93100),LLV(H,0),REF(LLV(H,0),BARSLAST( TIME=93100))));E1:=IF(BETWEEN(TIME,94900,95700),O1,DRAWNULL);E2:=IF(BETWEEN(TIME,94900,95700),C1,DRAWNULL);E12:=IF(BETWEEN(TIME,94000,94800),O2,DRAWNULL);E22:=IF(BETWEEN(TIME,94000,94800),C2,DRAWNULL);E13:=IF(BETWEEN(TIME,93100,93900),O3,DRAWNULL);E23:=IF(BETWEEN(TIME,93100,93900),C3,DRAWNULL);时间:=TIME=100000;N:=BARSLAST(时间);CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N)));CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N)));三高:=IF(BETWEEN(TIME,93100,100000),MAX(H1,MAX(H2,H3)),DRAWNULL); 三低:=IF(BETWEEN(TIME,93100,100000),MIN(L1,MIN(L2,L3)),DRAWNULL);三日高:=IF(BETWEEN(TIME,95700,100000),MAX(H1,MAX(H2,H3)),DRAWNULL);三日低:=IF(BETWEEN(TIME,95700,100000),MIN(L1,MIN(L2,L3)),DRAWNULL); 三日高1:=IF(BETWEEN(TIME,94900,93100),MAX(H1,MAX(H2,H3)),DRAWNULL);三日低1:=IF(BETWEEN(TIME,954900,93100),MIN(L1,MIN(L2,L3)),DRAWNULL);三日高2:=IF(BETWEEN(TIME,94000,93100),MAX(H1,MAX(H2,H3)),DRAWNULL);三日低2:=IF(BETWEEN(TIME,94000,93100),MIN(L1,MIN(L2,L3)),DRAWNULL); DRAWBAND(三日高,RGB(0,0,0),三日低,RGB(0,0,0));STICKLINE(TIME=95300 AND C1>O1,H1,L1,1,0),COLOR0000CC; STICKLINE(TIME=95300 AND C1<O1,H1,L1,1,0),COLORFFFF54; STICKLINE(TIME=95300 AND C1=O1,H1,L1,1,0),COLORWHITE; DRAWBAND(IF(C1>O1,E2,DRAWNULL),RGB(204,0,0),E1,RGB(204,0,0)); DRAWBAND(IF(C1<O1,E2,DRAWNULL),RGB(84,255,255),E1,RGB(84,255,255) );DRAWBAND(IF(C1=O1,E2,DRAWNULL),RGB(255,255,255),E1,RGB(255,255,2 55));DRAWBAND(三日高1,RGB(0,0,0),三日低1,RGB(0,0,0));STICKLINE(TIME=94400 AND C2>O2,H2,L2,1,0),COLOR0000CC; STICKLINE(TIME=94400 AND C2<O2,H2,L2,1,0),COLORFFFF54; STICKLINE(TIME=94400 AND C2=O2,H2,L2,1,0),COLORWHITE;DRAWBAND(IF(C2>O2,E22,DRAWNULL),RGB(204,0,0),E12,RGB(204,0,0)); DRAWBAND(IF(C2<O2,E22,DRAWNULL),RGB(84,255,255),E12,RGB(84,255,2 55));DRAWBAND(IF(C2=O2,E22,DRAWNULL),RGB(255,255,255),E12,RGB(255,255 ,255));DRAWBAND(三日高2,RGB(0,0,0),三日低2,RGB(0,0,0));STICKLINE(TIME=93500 AND C3>O3,H3,L3,1,0),COLOR0000CC; STICKLINE(TIME=93500 AND C3<O3,H3,L3,1,0),COLORFFFF54; STICKLINE(TIME=93500 AND C3=O3,H3,L3,1,0),COLORWHITE; DRAWBAND(IF(C3>O3,E23,DRAWNULL),RGB(204,0,0),E13,RGB(204,0,0)); DRAWBAND(IF(C3<O3,E23,DRAWNULL),RGB(84,255,255),E13,RGB(84,255,2 55));DRAWBAND(IF(C3=O3,E23,DRAWNULL),RGB(255,255,255),E13,RGB(255,255 ,255));{ m}STICKLINE(时间=1,三日高,三日低,-1,-1),COLOR0000CC;IF(BETWEEN(TIME,93100,94000) ANDBETWEEN(C,C1,O1),C,DRAWNULL),COLORWHITE;STICKLINE(时间=1,CS1,CS2,-1,-1),COLORGREEN;均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))),COLOR888888;CONST(IF(N,HHV(H,0),REF(HHV(H,0),N))),COLOR888888;CONST(IF(时间,HHV(H,0),REF(HHV(H,0),N))),COLORRED,DOTLINE; CONST(IF(时间,LLV(L,0),REF(LLV(L,0),N))),COLORLIBLUE,DOTLINE;常数:CONST(IF(N=0,C,REF(C,N))),COLORGREEN,DOTLINE; DRAWNUMBER(TIME=93500,常数,常数),COLORMAGENTA; DRAWNUMBER(时间,GGJ*0.999,GGJ),COLORMAGENTA; DRAWNUMBER(时间,DDJ*1.001,DDJ),COLORMAGENTA;IF(BETWEEN(C,三高,三低),C,DRAWNULL),COLORWHITE;IF(C=GGJ,C,DRAWNULL),COLORWHITE;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
分为:阻力中支撑三线。
分时做T。
N0:=STRCAT(CON2STR(YEAR,0),' 年');
Y:=STRCAT(CON2STR(MONTH,0),' 月');
R:=STRCAT(CON2STR(DAY,0),' 日');
SJ:=STRCAT(STRCAT(N0,Y), R);
DRAWTEXT_FIX(C>0,0.68,0,0,SJ);
A:=O>C AND C>REF(C,1) AND O/REF(C,1)>1.03;
DRAWTEXT(ABS(A)>0,L, '假阴'),COLORYELLOW;
DRAWICON(C<O AND C>REF(C,1),H,6);{假阴真阳}
均价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;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.05,0,CODE),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.55,0.05,0,STKNAME)COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.6,0.05,0,HYBLOCK),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.6,0,0,DYBLOCK),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.55,0.85,0,GNBLOCK),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.55,0.90,0,FGBLOCK),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.55,0.95,0,ZSBLOCK),COLORYELLOW; 时间:=TIME=100000;
N:=BARSLAST(时间),COLOR808080;
常数:CONST(IF(N=0,C,REF(C,N))),COLOR004848,DOTLINE;
CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N))),COLORWHITE; CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))),COLORWHITE; STICKLINE(时间=1,CS1,CS2,-1,0),COLOR808080;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORFFFFFF,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,阻力,' 阻力'),COLORFFFFFF;
支撑:L1+P1*0.5/8,COLORFFFFFF,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,支撑,' 支撑'),COLORFFFFFF;
中:(支撑+阻力)/2,COLORFFFFFF,DOTLINE;
现价:CLOSE,COLORWHITE,LINETHICK1;
MR:=C<支撑AND CROSS(C,REF(C,2));
STICKLINE(CROSS(现价,支撑),C,中,2,0),COLOR00CCCC;
STICKLINE(MR=1,支撑,中,2,0),COLOR00CCCC;
DRAWICON(MR=1 OR CROSS(现价,支撑),中,34);
STICKLINE(CROSS(支撑,现价),支撑,(支撑-中)/5+支撑,2,0),COLORMAGENTA; MC:=C>阻力AND CROSS(REF(C,2),C);
STICKLINE(CROSS(阻力,现价),C,中,2,0),COLOR8C8C00;
STICKLINE(MC=1,阻力,中,2,0),COLOR8C8C00;
DRAWICON(MC=1 OR CROSS(阻力,现价),中,35);
STICKLINE(CROSS(现价,阻力),阻力,阻力-(支撑-中)/5,2,0),COLORGREEN; DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,' 中'),COLORFFFFFF;
最新:C,LINETHICK1,COLORWHITE;
IF(C>=REF(C,1),C,DRAWNULL),LINETHICK1,COLORWHITE;
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);。