通达信指标公式源码一线定乾坤 主图源码
一眼定乾坤的成交量副图指标通达信指标公式源码
一眼定乾坤的成交量副图:M1:=5;M2:=10;ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//小筹码估算} ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//小股民套牢筹码比率}ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天数} ZSHJJ:=EMA(ZSHTL,89);{//小股民警戒}ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}SH8:=EMA(ZSHTL,8);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);{//------【数值显示】}散户套牢系数:INTPART(ZSHTL),NODRAW;主力控盘系数:INTPART(ZZLKP),COLOR4080FF,NODRAW;资金流入强度:ZJLRQD,NODRAW,COLOR00FFFF;{☆精确风险}{【参数定义】}RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;K1:=SMA(RSV,10,1);D1:=SMA(K1,5,1);KK:=INTPART(K1);DD0:=INTPART(D1);TFXXS:=KK+DD0;{//变异KD风险系数}TGLD:=MOD(TFXXS,10);{//踏浪涨停概率点}TGLXS:=(TFXXS-REF(TFXXS,1))*10;{//变异KD乖离系数}TYCFX:=TFXXS+TGLXS;{//变异KD预测风险}乖离系数:TGLXS,LINETHICK0,COLORGREEN,NODRAW;{【图解模板】}{级别拐点}{乖离系数}STICKLINE(TGLXS>0,100,100+TGLXS,3,0),COLOR000088;STICKLINE(TGLXS>0,100,100+TGLXS,2.5,0),COLOR000099;STICKLINE(TGLXS>0,100,100+TGLXS,2,0),COLOR0000AA;STICKLINE(TGLXS>0,100,100+TGLXS,1.5,0),COLOR0000BB;{STICKLINE(TGLXS>0,100,100+TGLXS,1.2,0),COLOR0000CC;}STICKLINE(TGLXS>0,100,100+TGLXS,1.0,0),COLOR0000DD;{STICKLINE(TGLXS>0,100,100+TGLXS,0.8,0),COLOR0000EE;}STICKLINE(TGLXS>0,100,100+TGLXS,0.5,0),COLOR0000FF;{//红柱}STICKLINE(TGLXS<0,100,100+TGLXS,3,0),COLOR008800;{STICKLINE(TGLXS<0,100,100+TGLXS,2.8,0),COLOR009900;}STICKLINE(TGLXS<0,100,100+TGLXS,2.5,0),COLOR00AA00;STICKLINE(TGLXS<0,100,100+TGLXS,2,0),COLOR00BB00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.8,0),COLOR00CC00;}STICKLINE(TGLXS<0,100,100+TGLXS,1.5,0),COLOR00DD00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.2,0),COLOR00EE00;}STICKLINE(TGLXS<0,100,100+TGLXS,1,0),COLOR00FF00;{//绿柱}STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,100+TGLXS,8,0),COLORRED; STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,100+TGLXS,8,0),COLORFFFFFF; {【数值显示】}风险系数:TFXXS,LINETHICK2,COLORYELLOW,NODRAW;预测风险:TYCFX,LINETHICK1,COLORFFFFFF,NODRAW;T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);T3:=CONST( ZCMZL=REF(ZCMZL,1));T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);T6:=CONST(TFXXS<=50 );T7:=CONST(TFXXS>=160 );T8:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS<=100 );T9:=CONST( TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS>100); T10:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS>100 ); T11:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS<=100 );T12:=CONST( ZSHTL>90 );T13:=CONST( ZZLKP>75 );T14:=CONST(CROSS(ZCMZL,ZZLJJ) AND ZZLKP>ZZLJJ AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T15:=CONST(CROSS(ZCMZL,ZZLKP) AND ZZLKP>ZZLJJ AND ZZLKP<ZSHTL AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T16:=CONST( CROSS(ZCMZL,ZSHTL) AND ZSHTL>ZZLKP AND ZCMZL>REF(ZCMZL,1)); T17:=CONST( CROSS(ZCMZL,100) AND ZCMZL>REF(ZCMZL,1));T18:=CONST(REF(ZSHTL,1)>90 AND ZSHTL<90 );TS1:=IF(T1=1,0+0.03,0);TS2:=IF(T2=1,TS1+0.03,TS1);TS3:=IF(T3=1,TS2+0.03,TS2);TS4:=IF(T4=1,TS3+0.03,TS3);TS5:=IF(T5=1,TS4+0.03,TS4);TS6:=IF(T6=1,0+0.73,0);TS7:=IF(T7=1,TS6+0.03,TS6);TS8:=IF(T8=1,TS7+0.03,TS7);TS9:=IF(T9=1,TS8+0.03,TS8);TS10:=IF(T10=1,TS9+0.03,TS9);TS11:=IF(T11=1,TS10+0.03,TS10);TS12:=IF(T12,0+0.03,0);TS13:=IF(T13=1,TS12+0.03,TS12);TS14:=IF(T14=1,TS13+0.03,TS13);TS15:=IF(T15=1,TS14+0.03,TS14);TS16:=IF(T16=1,TS15+0.03,TS15);TS17:=IF(T17=1,TS16+0.03,TS16);TS18:=IF(T8=1,TS17+0.03,TS17);DRAWTEXT_FIX(T1,0.66,TS1,0,'★监控:主力增仓'),COLOR8080FF;DRAWTEXT_FIX(T2,0.66,TS2,0,'★监控:主力减仓'),COLORFFFF00;DRAWTEXT_FIX(T3,0.66,TS3,0,'★监控:多空平衡'),COLORGRAY;DRAWTEXT_FIX(T4,0.66,TS4,0,'★监控:主力回补'),COLORFF9933;DRAWTEXT_FIX(T5,0.66,TS5,0,'★监控:主力出逃'),COLORFFFF00;DRAWTEXT_FIX(T6,0.86,TS6,0,'★操作:买入风险'),COLORYELLOW;DRAWTEXT_FIX(T7,0.86,TS7,0,'★操作:卖出风险'),COLORFFFF00;DRAWTEXT_FIX(T8,0.86,TS8,0,'★操作:追涨博弈'),COLOR8080FF;DRAWTEXT_FIX(T9,0.86,TS9,0,'★操作:稳健持股'),COLOR8080FF;DRAWTEXT_FIX(T10,0.86,TS10,0,'★操作:盘跌减仓'),COLORFFFF00;DRAWTEXT_FIX(T11,0.86,TS11,0,'★操作:杀跌空仓'),COLORFFFF00;DRAWTEXT_FIX(T12,0.36,TS12,0,'☆特别提示:筑底散兵坑'),COLOR66FFCC; DRAWTEXT_FIX(T13,0.36,TS13,0,'☆特别提示:铸顶风险区'),COLORFFFF00; DRAWTEXT_FIX(T14,0.36,TS14,0,'☆特别提示:穿越主力'),COLOR8080FF; DRAWTEXT_FIX(T15,0.36,TS15,0,'☆特别提示:穿越主力'),COLORYELLOW; DRAWTEXT_FIX(T16,0.36,TS16,0,'☆特别提示:穿越散户'),COLORGREEN; DRAWTEXT_FIX(T17,0.36,TS17,0,'☆特别提示:全盘穿越'),COLOR3399FF;DRAWTEXT_FIX(T18,0.36,TS18,0,'☆特别提示:神秘黑洞'),COLOR9966FF;{AAA:=REFDATE(HHV(H,30),DATE);T1A:=CONST(IF(ZZNTS,1,0));TS1A:=IF(T1A=1,0+0.03,0);}{DRAWTEXT(T1A=1 AND CURRBARSCOUNT=45 AND PERIOD=5,AAA-(AAA*TS1A),'【走牛天数判断】'),COLORRED,LINETHICK6;}{DRAWNUMBER(T1A=1 AND CURRBARSCOUNT=45-12 AND PERIOD=5,AAA-(AAA*TS1A),CONST(ZZNTS)),COLORRED,LINETHICK6;};三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3);三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3),COLORWHITE;高:=CROSS(CROSS(三日最高,C),0.6),STICK,COLORWHITE;DRAWICON(高>0,高,2);F:=100*(C-REF(C,1))/REF(C,1);博尔:=IF(C<REF(O,1) AND F<0,1,0);P1:=博尔;量化:=IF(C<REF(O,2) AND F<0,1,0);P2:=量化;P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,STICK,COLORFF00FF,LINETHICK1; DRAWICON(P1=0>0,P1=0,1);量:V,VOLSTICK;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN)))); XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2)))));ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);进攻流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22));GJJ:=EMA(进攻流量,8); LLJX:=EMA(进攻流量,3);动态天量:=CONST(IF(V=HHV(V,20),V,REF(V,BARSLAST(V=HHV(V,20))))),COLOR00FF00,POINT DOT;STICKLINE(((HSL * 0.4) >= 0),动态天量+((HSL * 0.4) +LLJX)*20,动态天量,3,0),COLORYELLOW;STICKLINE(((HSL * 0.4) < 0),动态天量+((HSL * 0.4) +LLJX)*20,动态天量,3,0),COLOR00FF00;资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00;资金收支:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净收支:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;收支比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净收支>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW;连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW;近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),COLORYELLOW,NODRAW;三日资金:SUM(资金收支,3),COLORWHITE,NODRAW;五日资金:SUM(资金收支,5),COLORFF00FF,NODRAW;十日资金:SUM(资金收支,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量> 0),动态天量+资金流量*20,动态天量,3,0),COLOR0000FF; STICKLINE((资金流量< 0),动态天量+资金流量*20,动态天量,3,0),COLOR008000;万手:VOL/10000,LINETHICK0;BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD =5,TOTALFZNUM,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1,VVOL,0,-1,-1),COLOR00C0C0;VOLUME:VOL,VOLSTICK;MAVOL1:MA(VOLUME,M1),COLOR80FFFF,LINETHICK1;MAVOL2:MA(VOLUME,M2),COLORFF00FF,LINETHICK1;{变色彩带}VAR1:=(2*CLOSE+HIGH+LOW)/4;操盘线: (EMA(VAR1,2)+EMA(VAR1,3)+EMA(VAR1,5)+EMA(VAR1,8)+EMA(VAR1,11)+EMA(VAR1,1 3))/6.4,COLORFFFF00,LINETHICK1,CIRCLEDOT;IF(操盘线>REF(操盘线,1),操盘线,DRAWNULL),COLOR0000FF,LINETHICK1,CIRCLEDOT;。
通达信操盘手乾坤主图公式源码
通达信操盘手乾坤主图公式源码M1:=36;M:=13;N:=100;M2:=5;SHORT:=21;LONG:=44;MID:=11;SJTJ:=DATE<1590301;MAH:=(H*18+REF(H,1)*17+REF(H,2)*16+REF(H,3)*15+REF( H,4)*14+REF(H,5)*13+REF(H,6)*12+REF(H,7)*11+REF(H,8)*10+R EF(H,9)*9+REF(H,10)*8+REF(H,11)*7+REF(H,12)*6+REF(H,13)*5+ REF(H,14)*4+REF(H,15)*3+REF(H,16)*2+REF(H,17)*1)/171;MAL:=(L*18+REF(L,1)*17+REF(L,2)*16+REF(L,3)*15+REF(L,4) *14+REF(L,5)*13+REF(L,6)*12+REF(L,7)*11+REF(L,8)*10+REF(L,9) *9+REF(L,10)*8+REF(L,11)*7+REF(L,12)*6+REF(L,13)*5+REF(L,14) *4+REF(L,15)*3+REF(L,16)*2+REF(L,17)*1)/171;MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA20:=MA(CLOSE,20);MA60:=MA(CLOSE,60);DK:= SJTJ AND( CLOSE>=MAH OR (C>MA5 AND C>MA10 AND C>MA20 AND C>MA60));KK:= SJTJ AND( MAL>CLOSE OR (C<MA5 AND C<MA10 AND C<MA20 AND C<MA60));DK1:=BARSLAST(DK);KK1:=BARSLAST(KK);DK2:=BARSLAST(CROSS(KK1,DK1));KK2:=BARSLAST(CROSS(DK1,KK1));HS:=DK2<KK2;LS:=KK2<DK2;W2:=OPEN-CLOSE;HT:=IF(OPEN>CLOSE,OPEN,CLOSE);LT:=IF(OPEN<CLOSE,OPEN,CLOSE);STICKLINE(HS,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),D ATE),6,0),COLOR001050;STICKLINE(LS,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),D ATE),6,0),COLORBLACK;STICKLINE(W2>0 AND HS,OPEN,CLOSE,2,0),COLORRED;STICKLINE(W2>0 AND HS,OPEN,H,0.0,0),COLORRED;STICKLINE(W2>0 AND HS,C,L,0.0,0),COLORRED;STICKLINE(W2<=0 AND HS,OPEN,CLOSE,2,1),COLORRED;STICKLINE(W2<=0 AND HS,O,L,0.0,0),COLORRED;STICKLINE(W2<=0 AND HS,C,H,0.0,0),COLORRED;STICKLINE(W2>0 AND LS,OPEN,CLOSE,2,0),COLORGREEN;STICKLINE(W2>0 AND LS,OPEN,H,0.0,0),COLORGREEN;STICKLINE(W2>0 AND LS,C,L,0.0,0),COLORGREEN;STICKLINE(W2<=0 AND LS,OPEN,CLOSE,2,1),COLORGREEN;STICKLINE(W2<=0 AND LS,C,H,0.0,0),COLORGREEN;STICKLINE(W2<=0 AND LS,O,L,0.0,0),COLORGREEN;DRAWTEXT(HS=1 AND REF(LS,1),LOW*0.985,12),COLORYELLOW;DRAWTEXT(LS=1 AND REF(HS,1),H*1.009,13),COLORYELLOW;DRAWNUMBER(ISLASTBAR AND LS,MAH,MAH),COLORYELLOW;DRAWNUMBER(ISLASTBAR AND HS,MAL,MAL),COLORYELLOW;DRAWNUMBER(ISLASTBAR ANDLS,MAH,MAH),COLORYELLOW;DRAWNUMBER(ISLASTBAR AND HS,MAL,MAL),COLORYELLOW;最新价:IF(SJTJ, C,DRAWNULL),LINETHICK0,COLORYELLOW;趋势线:=(MAH+MAL)/2 COLORGREEN,LINETHICK2;趋势线上升:IF(HS,趋势线,DRAWNULL),LINETHICK2,COLORRED;趋势线下降:IF(LS,趋势线,DRAWNULL),LINETHICK2,COLORGREEN;DRAWICON(HS,趋势线*0.995,1);DRAWICON(LS,趋势线*1.005,2);DRAWNUMBER(ISLASTBAR ,C,C),COLORWHITE;DRAWTEXT_FIX(ISLASTBAR,0,0,0,ZDBLOCK),COLORYELLOW;AAA:=CONST(HHV(H,50));PL5:=HHV(H,45);AZ:=BARSCOUNT(CLOSE);AH:=HHV(HIGH,200);AL:=LLV(LOW,200);B0:=(AH-AL)/40;BL1:=HIGH+B0;BL2:=LOW-B0;STICKLINE((AZ+0)/34=FLOOR((AZ+0)/34),BL2,BL2-2*B0,3,0),COLORFFFFFF;DRAWTEXT((AZ+0)/34=FLOOR((AZ+0)/34),BL2-2.2*B0,'时间窗'),COLORFFFFFF;Y:=(HIGH+LOW)/2;AO:=MA(Y,5)-MA(Y,21);DU0:=CROSS(AO,0);UD0:=CROSS(0,AO);TDU0:=BARSLAST(DU0);TUD0:=BARSLAST(UD0);DU3:=REF(DU0,1);UD3:=REF(UD0,1);TDU3:=BARSLAST(DU3);TUD3:=BARSLAST(UD3);劫:IF(TDU3<TUD3,REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2), TUD3)),LINETHICK2,COLORYELLOW;WL1:=REVERSE((HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10)))+1;DRAWTEXT_FIX(ISLASTBAR AND WL1>=REF(WL1,1) AND WL1>=0.55,0.45,0,1,'★'),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND WL1>=REF(WL1,1) AND WL1>=0.65,0.48,0,1,'★'),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND WL1>=REF(WL1,1) AND WL1>=0.75,0.51,0,1,'★'),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND WL1>=REF(WL1,1) AND WL1>=0.85,0.54,0,1,'★'),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR AND WL1>=REF(WL1,1) AND WL1>=0.95,0.57,0,1,'★'),COLORYELLOW;TY:=C;AA1:=REF(TY,10)=HHV(TY,2*10+1);BB1:=FILTER(AA1,10);C1:=BACKSET(BB1,10+1);HD:=FILTER(C1,10);AA2:=REF(TY,10)=LLV(TY,2*10+1);BB2:=FILTER(AA2,10);CC2:=BACKSET(BB2,10+1);LD:=FILTER(CC2,10);前期高位:REF(C,BARSLAST(HD)),COLORBLUE,COLORMAGENTA;STICKLINE(C,前期高位,前期高位,8,0),COLORMAGENTA;前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,LINETHICK1,COLORGREE N;{非常棒}EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;VAR2:=(2*CLOSE+HIGH+LOW)/4;VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←买'),COLORLIRED;DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←抛'),COLORGREEN;DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR9:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20 );卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWICON(卖出<0,H+0.05,2);买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);底1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORMAGENTA;DRAWTEXT(CROSS(买线,卖线)AND V/REF(V,1)>=2.0,L*0.98,'起爆') ,COLORMAGENTA;顶:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CIRCLEDOT,LIN ETHICK5,COLORYELLOW;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;顶1:IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),POINTDOT,LINETHICK9,COLOR GREEN;A0:=(L+H+C*2)/4;A1B:EMA(A0,14),COLORBLUE,LINETHICK2;A2B:=EMA(A0,25),COLORLIBLUE,LINETHICK2;A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100,NODRAW;A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100,NODRAW;看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1 X,0))),DRAWNULL),COLORMAGENTA,LINETHICK4;逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A 1X))),DRAWNULL),COLORCYAN,LINETHICK4;买入持股:IF(A1X>=0,A1B,DRAWNULL)COLORRED,LINETHICK3;卖出空仓:IF(A1X<0 AND A2X<0,A1B,DRAWNULL)COLORGREEN,LINETHICK3;STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;STICKLINE(CROSS(A1X,0),C,O,2,0 ),COLOR0000CC;STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;DIFF :=EMA(CLOSE,7) - EMA(CLOSE,13);DEA := EMA(DIFF,3);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);A2:=BARSLAST(REF(CROSS(K,D),1));B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);{KDJ底背离}LC := REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);TYB:=(HIGH + LOW + 2*CLOSE)/4;CCI4:=(TYB-MA(TYB,28))/(0.015*AVEDEV(TYB,28));B4:=BARSLAST(NOT(MA(C,5)<MA(C,10)<=5) AND CCI4>REF(CCI4,1) AND CROSS(CCI4,-100));底背离:=((B1 AND B2) OR (B2 AND B3) OR (B1 AND B3) OR ( B4 AND CCI4<-90) ) AND D<20 ;DRAWICON(底背离,(LOW * 0.98),1);DRAWTEXT(底背离,(LOW * 0.97),'金底背离'),COLORYELLOW;XL1:=(MA(LOW,2) * 0.96);XL2:=(MA(LOW,26) * 0.85);XL3:(((REF(XL1,1) < XL2) AND (REF(XL1,1) < XL1)) AND(REF(XL1,1) < REF(XL1,2)));DRAWICON(XL3,L*0.99,1);DRAWTEXT(XL3,L*0.99,'短进'),COLORYELLOW;LCD:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LCD,0),4.1,1)/SMA(ABS(CLOSE-LCD),4.1,1)*100;建仓:CROSS(RSI,11),COLORRED;DRAWICON(建仓,H*1.01,1);DRAWTEXT(建仓,H*1.02,'建仓'),COLORRED;。
通达信指标公式源码 均线操盘主图
EMA13:EMA(C,13),COLORRED,LINETHICK2;EMA34:EMA(C,34),COLORYELLOW;EMA55:EMA(C,55),COLORFF00FF;EMA120:EMA(C,120),COLORFFCC66;AR1:=EMA55>EMA34 AND EMA34>EMA13;AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);AR3:=EMA13>=REF(EMA13,2);AR4:=COUNT(CROSS(C,EMA13),AR2)=1;AR5:=AR1 AND AR2 AND AR3 AND AR4;AR6:=AR5 AND FILTER(AR5,10);DRAWTEXT(AR6,L-0.09,'红杏出墙'),COLORYELLOW;{STICKLINE(AR6,H,L,0.5,1),COLORYELLOW;STICKLINE(AR6,O,C,6,1),LINETHICK2,COLORYELLOW;}BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C<0.2;BR3:=C>EMA55 AND (REF(C,1)<REF(EMA55,1) OR REF(C,2)<REF(EMA55,2) OR REF(C,3)<REF(EMA55,3) OR REF(C,4)<REF(EMA55,4) OR REF(C,5)<REF(EMA55,5)); BR4:=BR1 AND BR2 AND BR3;DRAWTEXT(BR4 AND FILTER(BR4,10),L-0.09,'蚂蚁上树'),COLOR00C5FF; {STICKLINE(BR4 AND FILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;STICKLINE(BR4 AND FILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;}CR1:=(C-REF(C,1))/REF(C,1)*100>0.5;CR2:=V>MA(V,5)*0.6;CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;CR4:=ABS(EMA34-EMA55)/EMA55<0.03;CR5:=EMA55<=EMA120 AND EMA55>=REF(EMA55,1);CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);{STICKLINE(CR6,H,L,0.5,1),COLORF00FF0;STICKLINE(CR6,O,C,6,1),LINETHICK2,COLORF00FF0;}DRAWTEXT(CR6,L-0.09,'红衣侠女'),COLORF00FF0;DR1:=EMA13>EMA34 AND EMA34<EMA55;DR2:=BARSLAST(CROSS(C,EMA55) );DR3:=H=HHV(H,DR2);DR4:=BARSLAST(DR3);DR5:=COUNT(O>C AND C<REF(C,1) AND C>EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;DR6:=C>REF(C,1) ;DR7:= DR1 AND DR5 AND DR6 ;DR8:=DR7 AND FILTER(DR7 ,10);DRAWTEXT(DR8,L-0.09,'黑客点击'),COLORD6BA63;{STICKLINE(DR8,H,L,0.5,1),COLORD6BA63;STICKLINE(DR8,O,C,6,1),LINETHICK2,COLORD6BA63;}ER:=BARSLAST(REF(CROSS(EMA55,EMA34),1)) AND CROSS(EMA34,EMA55); DRAWTEXT(ER,L-0.09,'均线互换'),COLOR0099FF;{STICKLINE(ER,H,L,0.5,1),COLOR0099FF;STICKLINE(ER,O,C,6,1),LINETHICK2,COLOR0099FF;}FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34); DRAWTEXT(FR,L-0.09,'梅开二度'),COLORWHITE;STICKLINE(FR,H,L,0,1),COLORWHITE;STICKLINE(FR,O,C,3,1),LINETHICK2,COLORWHITE;GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5) );GR2:=EMA13>EMA34 AND EMA34>EMA55 AND EMA13>REF(EMA13,1);GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(12,26,9)<REF("MACD.MACD"(12,26,9),1);GR6:=GR2 AND GR3 AND GR4;GR7:=GR2 AND GR3 AND GR4 AND GR5;DRAWTEXT(GR6 AND GR7,H+0.13,'见好就收!'),COLOR00FF00;{STICKLINE(GR6 AND GR7,H,H+0.09,4,0),COLOR00FF00;}HR2:=EMA13>=REF(EMA13,3) AND EMA34>=REF(EMA34,1) AND EMA55>=REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS(C,EMA55);DRAWTEXT(HR2 AND FILTER(HR2,10),L-0.09,'三线推进'),COLORFFC8FF;STICKLINE(HR2 AND FILTER(HR2,10),H,L,0,1),COLORFFC8FF;STICKLINE(HR2 AND FILTER(HR2,10),O,C,3,1),LINETHICK2,COLORFFC8FF;。
通达信指标公式源码(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);。
通达信资金博弈定乾坤指标公式源码
通达信资金博弈定乾坤指标公式源码指数趋势:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3),COLORCYAN,DOTLINE,LINETHICK1;主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORRED,LINETHICK2;CN1:=HHV(V,5);{5日最高量}CN2:=O>C;CN02:=C>O;CN03:=C=O;CN04:=((SUM(V,5)/CN1));CN05:=IF(CN04>0.3,1,0);{大资金}CN06:=IF(CN2 AND CN05,V,0);{大资金流出}CN07:=IF(CN02 AND CN05,V,0);{大资金流入}CN08:=IF(CN03 AND CN05,V,0);{不明流向大资金}累积流入:SUM(CN07,9)/10000,COLORFF00FF,LINETHICK2;累积流出:SUM(CN06,9)/10000,COLORGREEN,LINETHICK2;;净流入:(累积流入-累积流出),COLORYELLOW,LINETHICK2;净流入角度:=ATAN((净流入/REF(净流入,1)-1)*100)*57.3,NODRAW;VAR1:=LLV(LOW,21);VAR2:=HHV(HIGH,21);TX98:90,COLOR408080,DOTLINE,LINETHICK1;TX80:70,COLOR408080;TX45:45,COLOR408080;TX20:20,COLOR408080;界:50,COLORRED;80,COLORYELLOW;0,COLORBLUE;DRAWICON(CROSS(累积流入,累积流出) AND REF(累积流入,1)<REF(累积流出,1) AND MA(C,10)>REF(MA(C,10),1),66,34);DRAWICON(CROSS(累积流出,累积流入) AND REF(累积流入,1)>REF(累积流出,1),66,35);DRAWICON(CROSS(主力持仓,50) AND REF(主力持仓,1)<50,88,42);近多:=EXIST(CROSS(主力持仓,50) AND REF(主力持仓,1)<50,3);DRAWTEXT(CROSS(累积流出,累积流入) AND REF(累积流入,1)>REF(累积流出,1) AND 累积流出>净流入AND 主力持仓-REF(主力持仓,1)<REF(主力持仓,1)<REF(主力持仓,2) AND 主力持仓<60 AND MA(C,10)<REF(MA(C,10),1) AND NOT(近多),90,'跑'),COLORGREEN;DRAWICON(CROSS(净流入,累积流出) AND REF(净流入,1)<REF(累积流出,1),48,1);长多:=累积流入>REF(累积流入,1) OR 主力持仓>REF(主力持仓,1);DRAWTEXT(CROSS(累积流出,净流入) AND REF(累积流出,1)<REF(净流入,1) AND 主力持仓>50 AND MA(C,10)>REF(MA(C,10),1),24,'洗'),COLORGREEN;入,1)<REF(累积流出,1),5) AND CROSS(累积流出,净流入) AND REF(累积流出,1)<REF(净流入,1);DRAWTEXT(诱空 AND 主力持仓>50 AND 主力持仓>=REF(主力持仓,1) ,77,'诱'),COLORRED;DRAWTEXT(诱空 AND 主力持仓>50 AND 主力持仓>=REF(主力持仓,1),67,'空'),COLORRED;DRAWTEXT(累积流出>累积流入AND CROSS(主力持仓,累积流入) AND REF(主力持仓,1)<REF(累积流入,1) AND 净流入<50 AND 净流入<REF(净流入,1) AND 主力持仓<REF(主力持仓,1),67,'诱'),COLORGREEN;DRAWTEXT(累积流出>累积流入AND CROSS(主力持仓,累积流入) AND REF(主力持仓,1)<REF(累积流入,1) AND 净流入<50 AND 净流入<REF(净流入,1) AND 主力持仓<REF(主力持仓,1),57,'多'),COLORGREEN;DRAWICON(主力持仓<50 AND REF(主力持仓,1)>50,88,43);DRAWTEXT(主力持仓<80 AND REF(主力持仓,1)>80 AND 累积流入<累积流出 ,39,'空'),COLORGREEN;DRAWTEXT(主力持仓<80 AND REF(主力持仓,1)>80 AND 累积流入<REF(累积流入,1) AND 净流入<REF(净流入,1) AND MA(C,5)<REF(MA(C,5),1),90,'卖'),COLORGREEN;DRAWTEXT(主力持仓<80 AND REF(主力持仓,1)>80 AND 累积流入>累积流出,24,'洗'),COLORGREEN;DRAWTEXT(累积流出>50 AND REF(累积流出,1)<50,34,'回'),COLORGREEN;DRAWTEXT(累积流出>50 AND REF(累积流出,1)<50,24,'调'),COLORGREEN;DRAWTEXT(CROSS(累积流出,累积流入) AND REF(累积流入,1)>REF(累积流出,1) AND CROSS(0,净流入) AND REF(净流入,1)>0 AND 主力持仓<REF(主力持仓,1),-8,'必'),COLORGREEN;入,1)>REF(累积流出,1) AND CROSS(0,净流入) AND REF(净流入,1)>0 AND 主力持仓<REF(主力持仓,1) ,-18,'调'),COLORGREEN;DRAWTEXT(CROSS(累积流入,累积流出) AND REF(累积流入,1)<REF(累积流出,1) AND CROSS(净流入,0) AND REF(净流入,1)<0 AND 主力持仓>REF(主力持仓,1) AND MA(C,5)>REF(MA(C,5),1),-8,'起'),COLORRED;DRAWTEXT(CROSS(累积流入,累积流出) AND REF(累积流入,1)<REF(累积流出,1) AND CROSS(净流入,0) AND REF(净流入,1)<0 AND 主力持仓>REF(主力持仓,1) AND MA(C,5)>REF(MA(C,5),1),-18,'升'),COLORRED;DRAWTEXT(累积流出>累积流入AND REF(累积流出,1)<REF(累积流入,1) AND 主力持仓<60,77,'跑'),COLORGREEN;DRAWTEXT(累积流出>主力持仓AND REF(累积流出,1)<REF(主力持仓,1) AND 主力持仓<60 AND MA(C,10)<REF(MA(C,10),1),90,'跑'),COLORGREEN;DRAWTEXT(CROSS(主力持仓,80) AND REF(主力持仓,1)<80,95,'牛'),COLORRED;DRAWTEXT(CROSS(80,主力持仓) AND REF(主力持仓,1)>80,95,'减'),COLORGREEN;。
分时乾坤决策眼分时主图指标通达信指标公式源码
分时乾坤决策眼使用说明: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;。
通达信指标公式源码 指导线指标 主图源码
{背景长线}UR:=10;LR:=10;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));A:=EMA((LOW+CLOSE+OPEN)/3,28);B:=REF(EMA((LOW+CLOSE+OPEN)/3,28),1);N:=IF(BARSCOUNT(C)>=45,45,BARSCOUNT(C)); D:=C>=MA(C,N);E:=C<MA(C,N);上线:=SMA(C,6.5,1);下线:=SMA(C,13.5,1);上线1:=SMA(C,3,1);下线1:=SMA(C,8,1);{}STICKLINE( A>B OR D>0 OR 上线>下线,UPPER*1.01,LOWER*0.99,4.2,0),COLORADEAEA; STICKLINE( A<B OR E>0 OR 下线>上线,UPPER*1.01,LOWER*0.99,4.2,0),COLORA8A8A8; {背景中线}AA10:=MA(CLOSE,8);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);JJ:=(CLOSE+HIGH+LOW)/3;A1:=EMA(JJ,10);B1:=REF(A1,1);A0:=(L+H+C*2)/4;A111:=EMA(A0,14),LINETHICK2;A211:=EMA(A0,25),LINETHICK2;A1X:=(A111-REF(A111,1))/REF(A111,1)*100,NODRAW;A2X:=(A211-REF(A211,1))/REF(A211,1)*100,NODRAW;看多:=IF(A1X>=0 ANDBARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRA WNULL);逃顶:=IF(A1X<0 ANDBARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRA WNULL);AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF(YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 ANDMONTH<10,REF(AF,1),0)),0);{}STICKLINE(A1>B1 OR AA10>AA12 OR A1X>=0 ORAF>BF ,UPPER,LOWER,4.2,0),COLORADEAEA;STICKLINE(A1<B1 OR AA10<AA12 OR (A1X<0 AND A2X<0) ORAF<BF ,UPPER,LOWER,4.2,0),COLORGRAY;{};DRAWKLINE(H,O,L,C);{MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF( YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL, 8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7 *REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF( YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLOR0000FF;牵牛线:=MA(CLOSE,26),COLORFF00FF;等待:=IF(MA3>辰星线,辰星线,MA3);IF(等待>REF(等待,1),等待,DRAWNULL),LINETHICK2,COLOR0000FF;IF(辰星线>REF(辰星线,1),辰星线,DRAWNULL),LINETHICK2,COLOR0000FF;} {1}{AA05:MA(C,5),LINETHICK3,COLOR00CCFF;五日乖离率:=(C-AA05)/AA05*100;BB051:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB051>30 AND AA05>REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORRED;AA101:=MA(C,10);AA20:=MA(C,20);BB101:=ATAN((AA101/REF(AA101,1)-1)*100)*180/3.1416;IF(BB051<0 AND AA05<REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORGREEN;}{};{1}AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4) +3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;短线:=VAR1,COLORWHITE;中线:=VAR6,COLORYELLOW;DRAWBAND(短线,RGB(220,163,0),中线,RGB(0,0,220));{提示点}买线:=EMA(C,4);卖线:=EMA(SLOPE(C,20)*10+C,35);DRAWTEXT(CROSS(买线,卖线),LOW*0.98,'买'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖线,买线),HIGH*1.02,'卖'),COLORGREEN;{}FF1:=EMA(CLOSE,3);MA151:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF1,MA151),(LOW * 0.99),'上拐点'),COLOR00FFFF; DRAWTEXT(CROSS(MA151,FF1),(HIGH * 1.02),'下拐点'),COLOR00FF00;{}MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);卖:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) ANDCROSS(MA(DX,2),DX);DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖1'),COLORGREEN;{}{}多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3 ,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1) ,3,1),2,1);天线:=78.89;DRAWTEXT(CROSS(天线,多方趋势),H*1.01,'逃顶'),COLOR00FF00; {}VAR51:=3;VAR52:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) -LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE -LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1)); DRAWTEXT(CROSS(VAR52,VAR51), LOW,'←启动')COLORMAGENTA;。
双均线和一线定乾坤通达信指标完整版
双均线和一线定乾坤通达信指标完整版ZQ:=256;DZ:=ZQ/4;A1:=HHV(H,ZQ);A2:=LLV(L,ZQ);{双均线M1 M2 变色设置及交叉}M1:MA(C,DZ),COLORYELLOW;IF(M1>=REF(M1,2),M1,DRAWNULL),COLORMAGENTA,LINETHICK1;M2:MA(C,ZQ),COLORWHITE,LINETHICK2;IF(M2>=REF(M2,2),M2,DRAWNULL),COLORRED,LINETHICK2; DRAWICON( CROSS(M1,M2) ,M2,1),COLORRED;DRAWICON( CROSS(M2,M1) ,M1,2),COLORGREEN; {以下为动态百分比} K2:HHV(HIGH,64);K3:LLV(LOW,64);K4:=(0.382*HHV(HIGH,0)+0.618*LLV(LOW,0));{K1:=(0.809*HHV(HIGH,ZQ)+0.191*LLV(LOW,ZQ));K5:=(0.191*HHV(HIGH,ZQ)+0.809*LLV(LOW,ZQ));}K50%:(0.5*A1+0.5*A2),COLORGREEN,LINETHICK2;K61%:(0.618*A1+0.382*A2),COLORLIBLUE;K38%:(0.382*A1+0.618*A2),COLORLIBLUE;SJ:=BARSLAST(M1<REF(M1,2) );STICKLINE(SJ=1,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=1 ,(K2+K3)*0.5,'开始'),COLORA5A412;STICKLINE(SJ=12,K2,K3,0.01,1),COLORRED; DRAWTEXT(SJ=12 ,(K2+K3)*0.5,'19.1%'),COLORRED; STICKLINE(SJ=24,K2,K3,0.01,1),COLORWHITE; DRAWTEXT(SJ=24 ,(K2+K3)*0.5,'38.2%'),COLORWHITE; STICKLINE(SJ=32,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=32 ,(K2+K3)*0.5,'50.2%'),COLORYELLOW; STICKLINE(SJ=40,K2,K3,0.01,1),COLORBLUE; DRAWTEXT(SJ=40 ,(K2+K3)*0.5,'61.8%'),COLORBLUE; STICKLINE(SJ=52,K2,K3,0.01,1),COLORGREEN; DRAWTEXT(SJ=52 ,(K2+K3)*0.5,'80.9%'),COLORGREEN; STICKLINE(SJ=64,K2,K3,0.01,1),COLORA5A412; DRAWTEXT(SJ=64 ,(K2+K3)*0.5,'100%'),COLORA5A412; STICKLINE(SJ=76,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=76 ,(K2+K3)*0.5,'119.1%'),COLORRED; STICKLINE(SJ=88,K2,K3,0.01,1),COLORWHITE; DRAWTEXT(SJ=88 ,(K2+K3)*0.5,'138.2%'),COLORWHITE; STICKLINE(SJ=96,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=96 ,(K2+K3)*0.5,'150.2%'),COLORYELLOW; STICKLINE(SJ=104,K2,K3,0.01,1),COLORRED; DRAWTEXT(SJ=104 ,(K2+K3)*0.5,'161.8%'),COLORRED; STICKLINE(SJ=128,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=128 ,(K2+K3)*0.5,'200%'),COLORWHITE;TJ:=DZ*1.25;TJCS:=IF(PERIOD=1,TJ*3,TJ/(PERIOD-1));CS:=IF(PERIOD>=1 AND PERIOD<=7,TJCS,DRAWNULL);乾坤线:=(MA(C,CS)+MA(C,CS*2)+MA(C,CS*4))/3;DRAWTEXT(CURRBARSCOUNT=13 ,乾坤线,'乾坤线'),COLORBROWN;积极操盘:IF(乾坤线>REF(乾坤线,2),乾坤线,乾坤线), COLORRED, LINETHICK3;持币观望:IF(乾坤线<REF(乾坤线,2),乾坤线,DRAWNULL), COLORYELLOW, LINETHICK3;END 1 100 189{自动画江恩角度线}DRAWLINE(L=TROUGH(2 ,30,1 ) ,L ,H=PEAK(1 ,30 ,1 ) ,H ,1 ),COLORFF00FF; DRAWLINE(L=TROUGH(2 , 30,1 ) ,L ,H=PEAK(1 ,30 ,1 ) ,H-(PEAK(1 ,30 ,1 )-TROUGH(2 ,30,1 ))/3*2 ,1 ),COLORRED;DRAWLINE(L=TROUGH(2 , 30,1 ) ,L ,H=PEAK(1 ,30 ,1 ) ,H-(PEAK(1 ,30 ,1 )-TROUGH(2 , 30,1 ))/3 ,1 ),COLORYELLOW;DRAWLINE(H=PEAK(1 ,27 ,1 ) ,H ,L=TROUGH(2 ,27 ,1 ) ,L ,1),COLOR00FF00;DRAWLINE(H=PEAK(1 ,27 ,1 ) ,H ,L=TROUGH(2 ,27 ,1 ) ,L+(PEAK(1 ,27 ,1 )-TROUGH(2 ,30 ,1 ))/3 , 1),COLORFFFF00;DRAWLINE(H=PEAK(1 ,27 ,1 ) ,H ,L=TROUGH(2 ,27 ,1 ) ,L+(PEAK(1 ,27 ,1 )-TROUGH(2 ,30 ,1 ))/3*2 , 1),COLORBLUE;{双均线}ZQ:=256;DZ:=ZQ/4;A1:=HHV(H,ZQ);A2:=LLV(L,ZQ);K2:HHV(HIGH,256);K3:LLV(LOW,256);M1:MA(C,DZ),COLORYELLOW;IF(M1>=REF(M1,2),M1,DRAWNULL),COLORMAGENTA,LINETHICK1;M2:MA(C,ZQ),COLORWHITE,LINETHICK2;IF(M2>=REF(M2,2),M2,DRAWNULL),COLORRED,LINETHICK2;DRAWICON( CROSS(M1,M2) ,M2,1),COLORRED;DRAWICON( CROSS(M2,M1) ,M1,2),COLORGREEN;{时间窗口 STAR 为开始时间点 END 为重要的时间高点 ;关于时间最主要的是设置两个关键的低点和高点,根据其周期进行延伸; END 设为变量参数初始值 0 最大值1000 默认值189;如果你还有好的时间方面的研究心得,请联系我开天 qq: 84141829;关于双均线已经有了三篇力作,目前已经公布了两个,不为别的,主要是结交高手,尤其是民间高手,进行学术交流~}STAR:=BARSLAST(L=TROUGH(2 , 30,1 ));SJ:=FLOOR((STAR/END*100));STICKLINE(SJ=0 ,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=0 ,(K2+K3)*0.5,'开始'),COLORA5A412;STICKLINE(SJ=19 ,K2,K3,0.01,1),COLORRED; DRAWTEXT(SJ=19 ,(K2+K3)*0.5,'19.1%'),COLORRED; STICKLINE(SJ=38,K2,K3,0.01,1),COLORWHITE; DRAWTEXT(SJ=38,(K2+K3)*0.5,'38.2%'),COLORWHITE; STICKLINE(SJ=50 ,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=50 ,(K2+K3)*0.5,'50%'),COLORYELLOW; STICKLINE(SJ=61 ,K2,K3,0.01,1),COLORBLUE; DRAWTEXT(SJ=61 ,(K2+K3)*0.5,'61.8%'),COLORBLUE; STICKLINE(SJ=80,K2,K3,0.01,1),COLORGREEN; DRAWTEXT(SJ=80 ,(K2+K3)*0.5,'80.9%'),COLORGREEN; STICKLINE(SJ=100,K2,K3,0.01,1),COLORA5A412; DRAWTEXT(SJ=100 ,(K2+K3)*0.5,'100%'),COLORA5A412; STICKLINE(SJ=120,K2,K3,0.01,1),COLORRED; DRAWTEXT(SJ=120 ,(K2+K3)*0.5,'119.1%'),COLORRED; STICKLINE(SJ=139,K2,K3,0.01,1),COLORWHITE; DRAWTEXT(SJ=139 ,(K2+K3)*0.5,'138.2%'),COLORWHITE; STICKLINE(SJ=150,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=150 ,(K2+K3)*0.5,'150%'),COLORYELLOW; STICKLINE(SJ=161,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=161 ,(K2+K3)*0.5,'161%'),COLORYELLOW; STICKLINE(SJ=180,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=180 ,(K2+K3)*0.5,'180%'),COLORYELLOW; STICKLINE(SJ=200,K2,K3,0.01,1),COLORYELLOW; DRAWTEXT(SJ=200 ,(K2+K3)*0.5,'200%'),COLORYELLOW;得到我的源码的同学请加上以下代码,这是另一个时间窗口~{自然数序列}SJ4:=SJ;STICKLINE(SJ4=5,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=5 ,K61%,'5'),COLORMAGENTA;STICKLINE(SJ4=8,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=8 ,K61%,'8'),COLORMAGENTA;STICKLINE(SJ4=13,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=13 ,K61%,'13'),COLORMAGENTA;STICKLINE(SJ4=21,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=21,K61%,'21'),COLORMAGENTA;STICKLINE(SJ4=34,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=34,K61%,'34'),COLORMAGENTA;STICKLINE(SJ4=55,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=55,K61%,'55'),COLORMAGENTA;STICKLINE(SJ4=89,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=89,K61%,'89'),COLORMAGENTA;STICKLINE(SJ4=144,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=144,K61%,'144'),COLORMAGENTA;STICKLINE(SJ4=233,K61%,K38%,0.01,1),COLORMAGENTA; DRAWTEXT(SJ4=233,K61%,'233'),COLORMAGENTA;。
通达信指标公式源码 自用组合主图
、参数:N1(1 300 5)N2( 1 300 10)N3(1 300 20)N4(1 300 30)P(1 5 2)M(1 60 20)N(1 500 250) M1(1 500 55)买线:INTPART((SUM(CLOSE*VOL*100,6)/SUM(VOL*100,6))*100.17)/100,COLO RFF00FF,LINETHICK2;工作线:EMA(C,13),COLOR0000FF,LINETHICK2;一线:EMA(C,25),COLORWHITE,LINETHICK2;二线:EMA(CLOSE,99),LINETHICK3,POINTDOT,COLORYELLOW;江恩线:EMA(CLOSE,144),LINETHICK3,POINTDOT,COLORFFCC66;EMA1311:=EMA(C,13),COLOR0000FF,LINETHICK2;EMA341:=EMA(C,34),LINETHICK2,POINTDOT,COLORYELLOW;EMA551:=EMA(C,55),LINETHICK2,POINTDOT,COLORFF00FF;EMA120:=EMA(C,120),LINETHICK2,POINTDOT,COLORFFCC66;AR1:=EMA551>EMA341 AND EMA341>EMA1311;AR2:=BARSLAST((C-EMA1311)/EMA1311*100<-6);AR3:=EMA1311>=REF(EMA1311,2);AR4:=COUNT(CROSS(C,EMA1311),AR2)=1;AR5:=AR1 AND AR2 AND AR3 AND AR4;AR6:=AR5 AND FILTER(AR5,10);STICKLINE(AR6,O,C,2.5,0),LINETHICK2,COLORYELLOW;BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5),5)=5;BR2:=ABS((EMA1311-EMA341)+(EMA341-EMA551))/C<0.2;BR3:=C>EMA551 AND (REF(C,1)<REF(EMA551,1) ORREF(C,2)<REF(EMA551,2) OR REF(C,3)<REF(EMA551,3) ORREF(C,4)<REF(EMA551,4) OR REF(C,5)<REF(EMA551,5));BR4:=BR1 AND BR2 AND BR3;STICKLINE(BR4 AND FILTER(BR4,10),O,C,2.5,0),LINETHICK2,COLOR4080FF; CR1:=(C-REF(C,1))/REF(C,1)*100>0.5;CR2:=V>MA(V,5)*0.6;CR3:=COUNT(CROSS(EMA1311,EMA551),3)=1;CR4:=ABS(EMA341-EMA551)/EMA551<0.03;CR5:=EMA551<=EMA120 AND EMA551>=REF(EMA551,1);CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);DR1:=EMA1311>EMA341 AND EMA341<EMA551;DR2:=BARSLAST(CROSS(C,EMA551) );DR3:=H=HHV(H,DR2);DR4:=BARSLAST(DR3);DR5:=COUNT(O>C AND C<REF(C,1) AND C>EMA551 ANDBETWEEN((C-EMA551)/EMA551,0,0.02),DR4)=1;DR6:=C>REF(C,1) ;DR7:= DR1 AND DR5 AND DR6 ;DR8:=DR7 AND FILTER(DR7 ,10);STICKLINE(DR8,O,C,2.5,0),LINETHICK2,COLORFF0080;ER:=BARSLAST(REF(CROSS(EMA551,EMA341),1)) ANDCROSS(EMA341,EMA551);FR:=BARSLAST(REF(CROSS(EMA341,EMA1311),1)) ANDCROSS(EMA1311,EMA341);GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5) );GR2:=EMA1311>EMA341 AND EMA341>EMA551 ANDEMA1311>REF(EMA1311,1);GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(12,26,9)<REF("MACD.MACD"(12,26,9),1);GR6:=GR2 AND GR3 AND GR4;GR7:=GR2 AND GR3 AND GR4 AND GR5;DRAWTEXT(GR6 AND GR7,H+0.13,'*'),COLOR00FF00;HR2:=EMA1311>=REF(EMA1311,3) AND EMA341>=REF(EMA341,1) AND EMA551>=REF(EMA551,1) AND CROSS(C,EMA1311) AND CROSS(C,EMA341) AND CROSS(C,EMA551);STICKLINE(HR2 AND FILTER(HR2,10),O,C,3,0),LINETHICK2,COLORFF80FF; MA1:=EMA(CLOSE,N1);MA2:=EMA(CLOSE,N2);MA3:=EMA(CLOSE,N3);MA4:=EMA(CLOSE,N4);TJ1:=CROSS(MA1,MA2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 OR CROSS(MA1,MA4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 OR CROSS(MA2,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 OR CROSS(MA1,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018; TJ2:=(MAX(MA1,MAX(MA2,MA3))-MIN(MA1,MIN(MA2,MA3)))/MIN(MA1,MIN(MA2,MA3))*100<=P;XG:=TJ1 AND TJ2;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD:=2*(DIFF-DEA);做多:IF(K>D AND MACD>0 AND V>1,2,0),COLORRED,NODRAW;做空:=IF(K<D AND MACD<0 AND V>1,-2,0),COLOR00FF00,NODRAW;强洗:=IF(MACD>0 AND K<D AND V>1,1,0),COLOR0099FF,NODRAW;弱升:=IF(MACD<0 AND K>D AND V>1,-1,0),COLORFFFF00,NODRAW; STICKLINE(FILTER(TJ1,3),C,O,4,0),COLOR0000FF;DRAWICON(FILTER(XG,3),L*0.97,23);GET:=ZIG(3,3),COLORYELLOW;PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF; DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'半仓'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'稳赚'),COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'清'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'有机'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'闪'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'人'),COLORFF00FF; DRAWTEXT(EX2 AND DTJD10=2,H*1.05,'鬼'),COLORFFFF00; DRAWTEXT(EN3 AND ZTJZ10=1,L*0.93,'神'),COLOR0000FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'走'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.95,'买点'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2)AND EX2,H*1.03,'清'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.95,'少买'), LINETHICK3,COLOR00FFFF;HR:=HHV(HIGH,M1);HRY:=LLV(LOW,M1);HRY11:=HR*HRY;HRY33:=SQRT(HRY11),COLORGREEN,LINETHICK2;国:=IF(C>HRY33 AND HRY33 >=REF(HRY33 ,1),HRY33 ,DRAWNULL),LINETHICK2,COLORRED;MA5:=EMA(C,5),COLOR0000FF,LINETHICK2;MA6:=REF(MA1,1),COLORFFFFFF;MA7:=EMA(EMA(C,7),6),COLOR00FFFF,LINETHICK2;DRAWKLINE(H,O,L,C);指标王趋势:=(MA(EMA(EMA(EMA(CLOSE,2),2),2),13)*0.99),COLORGREEN; 金砖线:=(HHV((REF(CLOSE,1)-REF(MA(MAX(MAX((HIGH-LOW),ABS((REF(CLOSE,1 )-HIGH))),ABS((REF(CLOSE,1)-LOW))),13),1)),12));注意:=DRAWTEXT(CROSS(指标王线,MA6),(LOW)*(0.93),'←---注意');笑:=DRAWTEXT(CROSS(指标王线,MA6) AND 指标王线>MA7,H*(0.93),'←-笑');MMS:=MA(SMA((L+H+2*C)/4-REF((L+H+2*C)/4,1),5,1)/SMA(ABS((L+H+2*C )/4-REF((L+H+2*C)/4,1)),5,1)*100,1)+50;G1:=IF(-MMS>95,0,20);UOO:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LL V(CLOSE,7))*100=100)>0AND G1)+1);KS:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 -100));KS1:=IF(BARSCOUNT(C)=1,C/10000,(1-C/SMA(C,13,1))*100);X1:=EMA(((KS/ 10) + EMA(CLOSE,10)),3);AA:=-100*(X1-CLOSE)/X1;AC:=(EMA(AA,5));SSL:=EMA(CLOSE,3);MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);MM:=MA(MMV,1);SA:=(MM*0.985);SS:=(MA(CLOSE,5));DD:=(MA(CLOSE,13));GG:=(MA(CLOSE,21));X2:=IF(((SSL>MM)),MM,SA),COLORFF00FF;Y1:=DMA(((CLOSE+ OPEN) / 2),(VOL / (SMA(VOL,4,1)*4)));上开:=O;上收:=C;上高:=H;上低:=L;JJ:=(上开+上高+上低)/3;A:=EMA(JJ,4);X3:=A,COLORYELLOW,LINETHICK1;B:=REF(A,1);VA1:=EMA(上收,8);VA2:=EMA(上收,20);选手A:=MA(上收,3);箱顶A:=MA(REF(HHV(上收,6),1),3);箱底A:=MA(REF(LLV(上收,3),1),3);T1:=MA(上收,20)>=REF(MA(上收,20),1);T2:=CROSS(选手A,箱底A)AND 箱顶A/箱底A>100/100 AND T1;T3:=CROSS(箱顶A,选手A) AND箱顶A/箱底A>100/100;选手:=MA(上收,2);箱顶:=MA(REF(HHV(上收,30),1),2),COLOR0000FF;箱底:=MA(REF(LLV(上收,30),1),2),COLOR00FF00;T4:=CROSS(选手,箱底)AND 箱顶/箱底>110/100;T5:=CROSS(箱顶,选手) AND箱顶/箱底>110/100;VAR1:=(上收-LLV(上低,27))/(HHV(上高,27)-LLV(上低,27))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);MA20: =MA(C,20);MA30:=MA(C,30);QSXS:=MA20>MA30AND MA20>REF(MA20,1) ANDMA30>REF(MA30,1);ZF:=(C/REF(C,1)-1)*100;TDDF:=(L/REF(C,1)-1)*100<=-5AND(REF(HHV(H,5),1)/L-1)*100>=10;N1:=BARSLAST(CROSS(C,MA(C,5)));N2:=BARSLAST(CROSS(MA(C,5),C)); HM:=IF(N1<N2,N1+1,0)*QSXS;Z2:=HM=1AND ZF>=0 AND C>O AND QSXS;KX1:=ZF<=-3 ANDC<O;XDSJ:=BARSLAST(KX1);KX2:=ZF>=3 AND C>O;JBY:=KX2 AND XDSJ<=2AND C>=REF(O*0.99,XDSJ) ANDZF>ABS(REF(ZF,XDSJ)*0.99);Z3:=IF(FILTER(JBY,1) AND QSXS,5,0);DRAWTEXT(Z2AND Z3 ,LOW*0.99,'送钱来'),COLORFF0080;EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;VAR21:=(2*CLOSE+HIGH+LOW)/4;VAR31:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR41:=LLV(LOW,5); VAR51:=HHV(HIGH,4);散户:=EMA((VAR21-VAR41)/(VAR51-VAR41)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED; DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN;DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR91:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR91,5),5)/EMA(EMA(ABS(VAR91),5),5);VARC:=EMA(EMA(VAR91,20),20)/EMA(EMA(ABS(VAR91),20),20);卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWICON(卖出<0,H+0.05,2);买线:=EMA(CLOSE,2),NODRAW;卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLO RYELLOW;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA( CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;S2:=IF(VC>20 AND FILTER(VC<REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN; A0:=(L+H+C*2)/4;A1:EMA(A0,14)COLORBLUE,LINETHICK2,NODRAW;A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;看多:IF(A1X>=0 ANDBARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRA WNULL),COLORMAGENTA{,LINETHICK2};逃顶:IF(A1X<0 ANDBARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRA WNULL),COLORCYAN,{LINETHICK2};DRAWICON(CROSS(A1X,0),L-0.15,1);VAR111:=C-REF(C,1);VAR211:=100*EMA(EMA(VAR111,6),6)/EMA(EMA(ABS(VAR111),6),6);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAS T(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSL AST(CROSS(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BA RSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAS T(CROSS(MA13,MA5))+1),0),COLOR00FF00;BT:=((LLV(VAR211,2)=LLV(VAR211,7)) AND COUNT(VAR211<0,2) AND CROSS(VAR211,MA(VAR211,2))) ANDREF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);DRAWTEXT(BT,L-0.07,'短牛'),COLORRED;TJ11:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) ANDC<HHV(H,21)*0.82;DRAWTEXT(TJ11,L-0.15,'中牛'),COLORMAGENTA;HR1:=HHV(HIGH,55);HRY2:=LLV(LOW,55);HRY12:=HR1*HRY2;HRY34:=SQRT(HRY12);TJ21:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY34; STICKLINE(TJ21,H,L,2,0),COLORYELLOW;DRAWTEXT(TJ21,L-0.08,'大牛'),COLORYELLOW;ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);DRAWTEXT(ST,H+0.09,'清'),COLOR00FF00;DIF1:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;DEA2:=EMA(DIF1,9),COLORWHITE,LINETHICK2;AA8:=COUNT(CROSS(DIF1,DEA2),BARSLAST(DEA2>=0));二次金叉:=CROSS(DIF1,DEA2) AND DEA2<0 AND COUNT(AA8=2,21)=1; DRAWTEXT(二次金叉,L-0.08,' 二次金叉'),COLORYELLOW;A18:=BARSLAST(REF(CROSS(DIF1,DEA2),1));底背离:=REF(CLOSE,A18+1)>CLOSE AND DIF1>REF(DIF1,A18+1) AND CROSS(DIF1,DEA2);DRAWTEXT(底背离,L-0.08,' 底背离'),COLOR00FF00;。
通达信指标公式源码 通达信筹码一线主图 筹码幅图 无未来 源码
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*15 ,0 ),COLORRED;STICKLINE(ISLASTBAR,B31 ,B31 ,A1*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B32 ,B32 ,A2*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B33 ,B33 ,A3*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B34 ,B34 ,A4*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B35 ,B35 ,A5*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B36 ,B36 ,A6*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B37 ,B37 ,A7*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B38 ,B38 ,A8*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B39 ,B39 ,A9*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B310 ,B310 ,A10*15 ,0 ),COLOR666600; STICKLINE(ISLASTBAR,B311 ,B311 ,A11*15 ,0 ),COLOR666600; STICKLINE(ISLASTBAR,B312 ,B312 ,A12*15 ,0 ),COLOR666600; STICKLINE(ISLASTBAR,B313 ,B313 ,A13*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B314 ,B314 ,A14*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B315 ,B315 ,A15*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B316 ,B316 ,A16*15 ,0 ),COLORRED;STICKLINE(ISLASTBAR,B317 ,B317 ,A17*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B318 ,B318 ,A18*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B319 ,B319 ,A19*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B320 ,B320 ,A20*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B321 ,B321 ,A21*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B322 ,B322 ,A22*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B323 ,B323 ,A23*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B324 ,B324 ,A24*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B325 ,B325 ,A25*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B326 ,B326 ,A26*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B327 ,B327 ,A27*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B328 ,B328 ,A28*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B329 ,B329 ,A29*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B330 ,B330 ,A30*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B331 ,B331 ,A31*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B332 ,B332 ,A32*15 ,0 ),COLORRED;STICKLINE(ISLASTBAR,B333 ,B333 ,A33*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B334 ,B334 ,A34*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B335 ,B335 ,A35*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B336 ,B336 ,A36*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B337 ,B337 ,A37*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B338 ,B338 ,A38*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B339 ,B339 ,A39*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B340 ,B340 ,A40*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B341 ,B341 ,A41*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B342 ,B342 ,A42*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B343 ,B343 ,A43*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B344 ,B344 ,A44*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B345 ,B345 ,A45*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B346 ,B346 ,A46*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B347 ,B347 ,A47*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,B348 ,B348 ,A48*15 ,0 ),COLOR666600;STICKLINE(ISLASTBAR,LB ,LB ,A50*15 ,0 ),COLORRED;当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0);ZX2:=MIN(A1,MIN(A2,MIN(A3,MIN(A4,MIN(A5,MIN(A6,MIN(A7,MIN(A8,MIN(A9,MIN(A 10,MIN(A11,MIN(A12,MIN(A13,MIN(A14,MIN(A15,MIN(A16,MIN(A17,MIN(A18,MIN(A1 9,MIN(A20,MIN(A21,MIN(A22,MIN(A23,MIN(A24,MIN(A25,MIN(A26,MIN(A27,MIN(A28, MIN(A29,MIN(A30,MIN(A31,MIN(A32,MIN(A33,MIN(A34,MIN(A35,MIN(A36,MIN(A37,M IN(A38,MIN(A39,MIN(A40,MIN(A41,MIN(A42,MIN(A43,MIN(A44,MIN(A45,MIN(A46,MI N(A47,MIN(A48,MIN(A49,A50)))))))))))))))))))))))))))))))))))))))))))))))));筹码最低处:COST(ZX2),COLORMAGENTA;DRAWTEXT(ISLASTBAR,筹码最低处,'筹码最低价'),COLORMAGENTA;ZX1:=MAX(A1*15,MAX(A2*15,MAX(A3*15,MAX(A4*15,MAX(A5*15,MAX(A6*15,MAX(A 7*15,MAX(A8*15,MAX(A9*15,MAX(A10*15,MAX(A11*15,MAX(A12*15,MAX(A13*15,M AX(A14*15,MAX(A15*15,MAX(A16*15,MAX(A17*15,MAX(A18*15,MAX(A19*15,MAX(A 20*15,MAX(A21*15,MAX(A22*15,MAX(A23*15,MAX(A24*15,MAX(A25*15,MAX(A26*15 ,MAX(A27*15,MAX(A28*15,MAX(A29*15,MAX(A30*15,MAX(A31*15,MAX(A32*15,MAX (A33*15,MAX(A34*15,MAX(A35*15,MAX(A36*15,MAX(A37*15,MAX(A38*15,MAX(A39* 15,MAX(A40*15,MAX(A41*15,MAX(A42*15,MAX(A43*15,MAX(A44*15,MAX(A45*15,M AX(A46*15,MAX(A47*15,MAX(A48*15,MAX(A49*15,A50*15)))))))))))))))))))))))))))))))))))) )))))))))))));筹码最集中处:COST(ZX1/15),COLORRED,LINETHICK2;入1:IF(筹码最集中处>REF(筹码最集中处,1),筹码最集中处,DRAWNULL),COLORRED,LINETHICK2;出1:IF(筹码最集中处<REF(筹码最集中处,1),筹码最集中处,DRAWNULL),COLORGREEN,LINETHICK2;DRAWTEXT(ISLASTBAR,筹码最集中处,'筹码集中价'),COLORWHITE;STICKLINE(筹码最集中处>LOW AND 筹码最集中处<HIGH,筹码最集中处,MIN(MIN(OPEN,CLOSE),筹码最集中处),2,0),COLORMAGENTA;STICKLINE(筹码最集中处>MIN(C,O) AND 筹码最集中处<MAX(C,O),筹码最集中处,MIN(OPEN,CLOSE),2,0),COLORMAGENTA;STICKLINE(筹码最集中处>HIGH,OPEN,CLOSE,2,0),COLORMAGENTA;STICKLINE(筹码最集中处>HIGH,HIGH,LOW,0,0),COLORMAGENTA;STICKLINE(筹码最集中处>LOW AND 筹码最集中处<HIGH,筹码最集中处,MIN(MIN(OPEN,CLOSE),筹码最集中处),1.5,0),COLORGREEN;STICKLINE(筹码最集中处>MIN(C,O) AND 筹码最集中处<MAX(C,O),筹码最集中处,MIN(OPEN,CLOSE),2,0),COLORGREEN;STICKLINE(筹码最集中处>HIGH,OPEN,CLOSE,2,0),COLORGREEN;STICKLINE(筹码最集中处>HIGH,HIGH,LOW,0,0),COLORGREEN;筹码幅图公式穿越筹码:ABS(WINNER(CLOSE)-WINNER(OPEN))*100,STICK,COLORDDDDFF;换手率::VOL/CAPITAL*100,STICK,COLORFF0099;地量换手:1/换手率:*100,STICK,COLORRED,LINETHICK3;A1:=LLV(HIGH,240);MYP:=100*(CLOSE-A1)/A1;A2:=REF(HHV(CLOSE,240),1);B2:=REF(LLV(CLOSE,240),1);RPY:=100*(CLOSE -B2)/(A2-B2);A3:=1.1*CLOSE;B3:=0.9*CLOSE;ASR:=100*(WINNER(A3)-WINNER(B3));A4:=WINNER(CLOSE);A5:=DMA(A4,VOL/CAPITAL);B4:=DMA(VOL,VOL/CAPITAL)/CAPITAL;A6:=100*VOL/CAPITAL;B6:=100*(WINNER(CLOSE)-REF(WINNER(CLOSE),1));A7:=ABS(B6/A6);CYA:A4/B4*50,COLOR00FF00;CYB:EMA(A4/B4*50,34),COLORFF00FF;CYC::A5/B4*50,COLORFFFF99;CYD:WINNER(CLOSE)/(VOL/CAPITAL),COLORYELLOW,STICK,LINETHICK4; STICKLINE(A7>30 AND (VOL/CAPITAL*100)<=3,地量换手,0,3,0),COLORWHITE; STICKLINE(RPY<75 AND MYP<30 AND ASR>60 AND 穿越筹码>=24 AND (VOL/CAPITAL*100)<=3 AND C>=O,地量换手,0,10,0),COLORFF00FF; STICKLINE(RPY<75 AND MYP<30 AND ASR>60 AND 穿越筹码>=24 AND (VOL/CAPITAL*100)<=3 AND C< O,地量换手,0,10,0),COLORFFFF33;筹码穿透率:=B6/A6;STICKLINE(筹码穿透率>10 AND CLOSE/REF(CLOSE,1)>=1.05 AND换手率:<=3,地量换手,0,10,0),COLORBLUE;。
【股票指标公式下载】-【通达信】一把定乾坤(趋势线、生死线)
【通达信】一把定乾坤(趋势线、生死线)-指标公式源码VAR1:=IF(YEAR>=2334 AND MONTH>0,0,1);VAR2:=(CLOSE-LLV(LOW,80))/(HHV(HIGH,80)-LLV(LOW,80))*200;VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);VAR5:=3*VAR3-2*VAR4;VAR6:=LLV(LOW,5);VAR7:=HHV(HIGH,5);VAR8:=EMA((CLOSE-VAR6)/(VAR7-VAR6)*100,4)*2;VAR9:=EMA(0.667*REF(VAR8,1)+0.333*VAR8,2);VARA:=3*VAR8-2*VAR9;VARB:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);VARC:=POW(MA(LOW,5),2)+MA(LOW,5);VARD:=POW(MA(HIGH,5),2)+MA(HIGH,5);VARE:=(VARB-LLV(VARC,64))/(HHV(VARD,64)-LLV(VARC,64))*150+65-10; VARF:=SMA(VARE,3,1)*1.5-100;VAR10:=SMA(VARF,3,1);VAR11:=3*VARF-2*VAR10;VAR12:=(HIGH+LOW+CLOSE*2)/4;VAR13:=EMA(VAR12,13);VAR14:=STD(VAR12,13);VAR15:=(VAR12-VAR13)*100/VAR14;VAR16:=EMA(VAR15,5);VAR17:=EMA(VAR16,13);VAR18:=EMA(VAR16,13)+200-100;VAR19:=EMA(VAR18,10);VAR1A:=3*VAR18-2*VAR19;VAR1B:=VAR3+VAR8+VARF+VAR18;VAR1C:=VAR4+VAR9+VAR10+VAR19;VAR1D:=VAR5+VARA+VAR11+VAR1A;VAR1E:=(HIGH+LOW+CLOSE)/3;VAR1F:=AMOUNT/VOL/100;VAR20:=SUM(AMOUNT,5)/SUM(VOL,5)/100;VAR21:=(VAR1E-MA(VAR1E,34))/(0.015*AVEDEV(VAR1E,34));VAR22:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);VAR23:=(HIGH+LOW+CLOSE+VAR1E)/4;VAR24:=EMA(VAR23,24);VAR25:=STD(VAR23,24);VAR26:=(VAR23-VAR24)/VAR25*100;VAR27:=(VAR1E-MA(VAR1E,24))/(0.015*AVEDEV(VAR1E,24));VAR28:=EMA(VAR26,5);VAR29:=(VAR1F-MA(VAR1F,21))/(0.015*AVEDEV(VAR1F,21));VAR2A:=(VAR20-MA(VAR20,90))/(0.015*AVEDEV(VAR20,90));VAR2B:=((VAR28+VAR27+VAR21)/3+165)/4;VAR2C:=(EMA(EMA(EMA(VAR2B,15),10),5)-25)*2+VAR22;VAR2D:=(VAR1B+VAR1C+VAR1D*30)/32/5-15;VAR2E:=EMA(VAR2D,13);VAR2F:=(VAR2B+VAR2D)/2/1.1;VAR30:=VAR2F*VAR1;短A: EMA(VAR30,1),COLORRED;短B: EMA(短A,5),COLORFFCC66;趋势线: EMA((VAR2C+VAR2E)/2,2),COLOR0099FF;生死线: EMA(趋势线,40),COLORGREEN,LINETHICK2;VAR31:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;VAR32:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;VAR33:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;VAR34:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);VAR35:=(CLOSE-VAR34)/VAR34*100;VAR36:=REF(VAR35,1)<-40 AND VAR35>REF(VAR35,1) ANDREF(VAR35,1)<REF(VAR35,2) AND VAR35-REF(VAR35,1)>2.5;VAR37:=(MA(AMOUNT,5)/MA(VOL,5)/100-MA(AMOUNT,110)/MA(VOL,110)/100)/(M A(AMOUNT,5)/MA(VOL,5)/100)<-0.273;VAR38:=(CLOSE-MA(CLOSE,30))/MA(CLOSE,30)<-0.125;VAR39:=VAR37 AND VAR38;VAR3A:=VAR31>=-45 AND VAR31<=-10 AND VAR32<=-15 AND VAR33<=-20;VAR3B:=COUNT(VAR3A,1)>=1;VAR3C:=1;VAR3D:=VAR39 AND VAR3B;VAR3E:=(MA(AMOUNT,5)*VAR3C/MA(VOL,5)/100-MA(AMOUNT,125)/MA(VOL,125)/1 00)/(MA(AMOUNT,5)/MA(VOL,5)/100)<(-0.4)*VAR3C;VAR3F:=HHV(HIGH,500);VAR40:=LLV(LOW,500);VAR41:=HHV(HIGH,250);VAR42:=LLV(LOW,250);VAR43:=EMA(CLOSE,34);VAR44:=MA(VAR43*0.82,5);VAR45:=CLOSE-REF(MA(CLOSE,20),11)<-2;VAR46:=LLV(LOW,125);VAR47:=MA((VAR3F*0.45+VAR41*0.5+VAR40+VAR42+VAR46)/5,35);VAR48:=VAR47;VAR49:=SMA(AMOUNT/VOL/100,13,1)*0.85;VAR4A:=CLOSE-REF(MA(CLOSE,20),11);VAR4B:=CLOSE<VAR44 AND VAR3E AND CLOSE<VAR49 OR CLOSE<VAR44 AND VAR45 AND VAR3E OR CLOSE<VAR44 AND CLOSE<VAR49 OR CLOSE<VAR44 AND VAR3E AND CLOSE<VAR49 OR VAR3E AND CLOSE<VAR48 OR VAR3E AND VAR45 AND VAR4A<-1.5 OR VAR3E AND CLOSE<VAR44 OR VAR3E AND VAR4A<-1.5 OR VAR45 AND CLOSE<VAR49 OR CLOSE<VAR48 AND VAR4A<-1.5 OR CLOSE<VAR44 AND VAR45;VAR4C:=VAR37 AND VAR38;VAR4D:=VAR31>=-45 AND VAR31<=-7 AND VAR32<=-11 AND VAR33<=-14;VAR4E:=COUNT(VAR4D,1)>=1;VAR4F:=VAR4C AND VAR4E;VAR50:=VAR3E AND CLOSE<VAR44 AND VAR45 AND CLOSE<VAR48 AND VAR4B AND VAR4F;VAR51:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;VAR52:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;VAR53:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;VAR54:=REF(CLOSE,1);VAR55:=SMA(MAX(CLOSE-VAR54,0),5,1)/SMA(ABS(CLOSE-VAR54),5,1)*100; VAR56:=(HIGH+LOW+CLOSE)/3;VAR57:=(VAR56-MA(VAR56,14))/(0.015*AVEDEV(VAR56,14));VAR58:=REF(CLOSE,2)*0.865;VAR59:=REF(CLOSE,13)*0.772;VAR5A:=MIN(VAR58,VAR59);VAR5B:=100*VOL/CAPITAL;VAR5C:=VAR51>=-15.8 AND VAR51<=-12.2 AND VAR52<=-20.8 AND VAR53<=-27.5 AND VAR55<=11.7 AND VAR57<=-145;鬼指: IF(VAR36 OR VAR3D OR VAR50 OR VAR5C OR (CLOSE-VAR5A)/CLOSE<0.03 AND SUM(VAR5B,5)/5<1.8,100,-32),COLORYELLOW;风险区: STICKLINE(趋势线>105,140,130,10,1),COLORRED;鬼顶: STICKLINE(趋势线>135,140,130,10,0),COLORBLUE;鬼道: STICKLINE(BETWEEN(趋势线,CROSS(趋势线,150),140),-40,-30,0,0),COLORFFCC66;安全区: STICKLINE(趋势线<-15,-41,-31,10,1),COLOR0099FF;鬼底: STICKLINE(趋势线<-26,-41,-31,4,0),COLORWHITE;鬼眼:IF(CROSS(100,短A) OR CROSS(80,短A),105,120),COLORFFCCCC; DRAWTEXT(CROSS(趋势线,130) OR CROSS(趋势线,135) OR CROSS(135,趋势线) OR CROSS(132,趋势线) OR CROSS(130,趋势线) OR CROSS(128,趋势线) OR CROSS(126,趋势线) OR CROSS(124,趋势线),140,'◆'),COLORYELLOW;DRAWICON(CROSS(短B,趋势线) AND 趋势线<=-17 OR CROSS(趋势线,生死线) AND 生死线<=5,{-15}0,1);【通达信】一把定乾坤(趋势线、生死线)-指标公式效果图(文档来源:若水财经社区)。
通达信指标公式源码自用的主图
强势区域:EMA(C,250),COLORYELLOW,DOTLINE;AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);JAX:=DMA((2*CLOSE+LOW+HIGH)/4,AA);压力:(1+9/100)*JAX,COLORLIRED;支撑:(1-9/100)*JAX,COLORLIRED;顶:(1+13/100)*JAX,COLORLIRED;底:(1-13/100)*JAX,COLORLIRED;下降压力线:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLOR YELLOW;DRAWBAND(MA(C,13),RGB(155,50,50),MA(C,21),RGB(83,123,68));DRAWKLINE(H,O,L,C);主力线:MA(C,13),COLORLIRED;工作线:MA(C,21),COLORLIRED;生命线:EMA(CLOSE,60),COLORRED, LINETHICK1;强势判定:EMA(C,250),COLORRED,DOTLINE;ELE:=(((REF(HIGH,1))+(REF(LOW,1))+(REF(OPEN,1))+2*(REF(CLOSE,1)))/5);突破价:=(ELE+((REF(HIGH,1))-(REF(LOW,1)))),NODRAW;阻力价:=(2*ELE-(REF(LOW,1))),NODRAW;DRAWTEXT(ISLASTBAR,强势判定,'←强势判定'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,生命线,'←生命线'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,压力,'←压力'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,支撑,'←支撑'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,顶,'←落袋为安'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,底,'←底.短线机会'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,主力线,'←主力线'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,工作线,'←工作线'),COLORFFCC10,COLORYELLOW;IF(主力线<=REF(主力线,1),主力线,DRAWNULL),COLORGREEN;IF(工作线<=REF(工作线,1),工作线,DRAWNULL),COLORGREEN;IF(压力<=REF(压力,1),压力,DRAWNULL),COLORGREEN;IF(支撑<=REF(支撑,1),支撑,DRAWNULL),COLORGREEN;IF(顶<=REF(顶,1),顶,DRAWNULL),COLORGREEN;IF(底<=REF(底,1),底,DRAWNULL),COLORGREEN;IF(生命线<=REF(生命线,1),生命线,DRAWNULL),COLORGREEN;IF(强势判定<=REF(强势判定,1),强势判定,DRAWNULL),COLORGREEN;。
通达信指标公式源码K线主图 主图指标 源码
源码如下:M5:MA(CLOSE,5);M10:MA(CLOSE,10);M20:MA(CLOSE,20);M30:MA(CLOSE,30);M60:MA(CLOSE,60);M120:MA(CLOSE,120);M250:MA(CLOSE,250);中线【买入】:=COUNT(CLOSE<M20,5)=4 AND CLOSE/M20>1.004 AND CROSS(CLOSE,M20) AND M20>=REF(M20,1),LINETHICK,COLORRED;DRAWTEXT(中线【买入】,LOW*0.95,' 中线【买入】'),COLORRED;VL:=REF(LOW,1);VAR112:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;VAR114:=MA(VAR112,13);VAR115:=LLV(LOW,34);VAR118:=EMA(IF(LOW<=VAR115,VAR114,0),3);VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR 110*10.9;T:=FILTER(IF(VAR111<=VAR110 AND VAR118>REF(VAR118,1),VAR118*8,0),20); DRAWTEXT(T,LOW-0.5,'←洗盘结束'),COLORFF00FF;DRAWTEXT(T,LOW-0.3,'|'),COLORFF00FF;VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR22:=SMA(VAR21,3,1);VAR23:=SMA(VAR22,3,1);VAR24:=SMA(VAR23,3,1);VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.5,'←抄底'),COLORRED;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.3,'|'),COLORRED;VAR29:=CROSS(VAR24,VAR23) AND VAR23>80;DRAWTEXT(FILTER(VAR29,5)=1,HIGH+0.5,'←逃'),COLORGREEN;JG:=CROSS(M5,M10);VOLUME:=VOL,VOLSTICK;MAVOL1:=MA(VOLUME,5);MAVOL2:=MA(VOLUME,10);NL:=CROSS(MAVOL1,MAVOL2);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=(DIF-DEA)*2,COLORSTICK;NA:=CROSS(DIF,DEA);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;KD:=CROSS(K,D) AND CROSS(J,D);一招定乾坤:DRAWTEXT((JG AND NL AND NA) OR (JG AND NL AND KD) OR(JG AND NA AND KD) OR (NL AND NA AND KD),L*0.95,'←一招定乾坤'),COLORYELLOW; X:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.98,'←短进'),COLORLIMAGENTA;空:=EMA(C,5);均衡:=EMA(空,5);中轨:=HHV(MA(H,13),13);VAR5:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11); DRAWTEXT(VAR5,L*0.98,'←追涨'),COLORRED;PT:=EMA(H,20);PAN:=EMA(CLOSE,7);RUO:=MEMA(CLOSE,3);DRAWICON(LONGCROSS(PAN,RUO,0.25) AND PT>H ,L*0.98,1);VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;DRAWTEXT(CROSS(84,VARC),H*1.01,'逃'),COLORYELLOW ;AAA:=CONST(HHV(H,90));R1:=MA(CLOSE,1);R2:=MA(CLOSE,3);R3:=(MA(R2,1)*1);R4:=(MA(R2,3)*1);DRAWTEXT(CROSS(R3,R4),(LOW-0.1),'进场'),COLORYELLOW;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV (H,55)-LLV(L,55))*100,5,1);LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'出局'),COLORGREEN;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR12:=(HIGH+LOW+CLOSE)/3;VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0); VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR18:=100-ABS(VAR17);VAR19:=IF(VAR18<90,VAR18,100);VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,HIGH*1.02,'大笔出货'),LINETHICK1,COLORFFCC66;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;老鼠仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;DRAWTEXT(老鼠仓,(LOW* 0.99),'老鼠仓'),COLOR40CCFF;A75:=(CLOSE > M5);A76:=(M5 > M10);A77:=(CLOSE > M10);A78:=(M5 > M20);A79:=(CLOSE > M20);A710:=REF(M20,1);A711:=(M20 > A710);AVX:=(((((IF(A75,10,(0 - 10)) + IF(A76,10,(0 - 10))) + IF(A77,10,(0 - 10)))+ IF(A78,10,(0 - 10))) + IF(A79,10,(0 - 10))) + IF(A711,10,(0 - 10)));DSLX:=(CLOSE / INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);V1:=MA(VOL,5);V2:=MA(VOL,10);T1:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T2:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T3:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)),1,0));T4:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)),1,0));T5:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T6:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T7:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T8:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T9:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T10:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T11:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T12:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T13:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T14:=CONST(IF( C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T15:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T16:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T17:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T18:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T19:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 < V2)),1,0));T20:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 >= V2)),1,0));T21:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 < V2)),1,0));T22:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)),1,0));T23:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)),1,0)); T24:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)),1,0)); T25:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)),1,0)); DRAWTEXT(T1=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'量能理想,明显走强,中线参与,仓位在2/3左右。
一眼定乾坤的成交量副图指标通达信指标公式源码
一眼定乾坤的成交量副图:M1:=5;M2:=10;ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//小筹码估算} ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//小股民套牢筹码比率}ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天数} ZSHJJ:=EMA(ZSHTL,89);{//小股民警戒}ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}SH8:=EMA(ZSHTL,8);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);{//------【数值显示】}散户套牢系数:INTPART(ZSHTL),NODRAW;主力控盘系数:INTPART(ZZLKP),COLOR4080FF,NODRAW;资金流入强度:ZJLRQD,NODRAW,COLOR00FFFF;{☆精确风险}{【参数定义】}RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;K1:=SMA(RSV,10,1);D1:=SMA(K1,5,1);KK:=INTPART(K1);DD0:=INTPART(D1);TFXXS:=KK+DD0;{//变异KD风险系数}TGLD:=MOD(TFXXS,10);{//踏浪涨停概率点}TGLXS:=(TFXXS-REF(TFXXS,1))*10;{//变异KD乖离系数}TYCFX:=TFXXS+TGLXS;{//变异KD预测风险}乖离系数:TGLXS,LINETHICK0,COLORGREEN,NODRAW;{【图解模板】}{级别拐点}{乖离系数}STICKLINE(TGLXS>0,100,100+TGLXS,3,0),COLOR000088;STICKLINE(TGLXS>0,100,100+TGLXS,2.5,0),COLOR000099;STICKLINE(TGLXS>0,100,100+TGLXS,2,0),COLOR0000AA;STICKLINE(TGLXS>0,100,100+TGLXS,1.5,0),COLOR0000BB;{STICKLINE(TGLXS>0,100,100+TGLXS,1.2,0),COLOR0000CC;}STICKLINE(TGLXS>0,100,100+TGLXS,1.0,0),COLOR0000DD;{STICKLINE(TGLXS>0,100,100+TGLXS,0.8,0),COLOR0000EE;}STICKLINE(TGLXS>0,100,100+TGLXS,0.5,0),COLOR0000FF;{//红柱}STICKLINE(TGLXS<0,100,100+TGLXS,3,0),COLOR008800;{STICKLINE(TGLXS<0,100,100+TGLXS,2.8,0),COLOR009900;}STICKLINE(TGLXS<0,100,100+TGLXS,2.5,0),COLOR00AA00;STICKLINE(TGLXS<0,100,100+TGLXS,2,0),COLOR00BB00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.8,0),COLOR00CC00;}STICKLINE(TGLXS<0,100,100+TGLXS,1.5,0),COLOR00DD00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.2,0),COLOR00EE00;}STICKLINE(TGLXS<0,100,100+TGLXS,1,0),COLOR00FF00;{//绿柱}STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,100+TGLXS,8,0),COLORRED; STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,100+TGLXS,8,0),COLORFFFFFF; {【数值显示】}风险系数:TFXXS,LINETHICK2,COLORYELLOW,NODRAW;预测风险:TYCFX,LINETHICK1,COLORFFFFFF,NODRAW;T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);T3:=CONST( ZCMZL=REF(ZCMZL,1));T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);T6:=CONST(TFXXS<=50 );T7:=CONST(TFXXS>=160 );T8:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS<=100 );T9:=CONST( TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS>100); T10:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS>100 ); T11:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS<=100 );T12:=CONST( ZSHTL>90 );T13:=CONST( ZZLKP>75 );T14:=CONST(CROSS(ZCMZL,ZZLJJ) AND ZZLKP>ZZLJJ AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T15:=CONST(CROSS(ZCMZL,ZZLKP) AND ZZLKP>ZZLJJ AND ZZLKP<ZSHTL AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T16:=CONST( CROSS(ZCMZL,ZSHTL) AND ZSHTL>ZZLKP AND ZCMZL>REF(ZCMZL,1)); T17:=CONST( CROSS(ZCMZL,100) AND ZCMZL>REF(ZCMZL,1));T18:=CONST(REF(ZSHTL,1)>90 AND ZSHTL<90 );TS1:=IF(T1=1,0+0.03,0);TS2:=IF(T2=1,TS1+0.03,TS1);TS3:=IF(T3=1,TS2+0.03,TS2);TS4:=IF(T4=1,TS3+0.03,TS3);TS5:=IF(T5=1,TS4+0.03,TS4);TS6:=IF(T6=1,0+0.73,0);TS7:=IF(T7=1,TS6+0.03,TS6);TS8:=IF(T8=1,TS7+0.03,TS7);TS9:=IF(T9=1,TS8+0.03,TS8);TS10:=IF(T10=1,TS9+0.03,TS9);TS11:=IF(T11=1,TS10+0.03,TS10);TS12:=IF(T12,0+0.03,0);TS13:=IF(T13=1,TS12+0.03,TS12);TS14:=IF(T14=1,TS13+0.03,TS13);TS15:=IF(T15=1,TS14+0.03,TS14);TS16:=IF(T16=1,TS15+0.03,TS15);TS17:=IF(T17=1,TS16+0.03,TS16);TS18:=IF(T8=1,TS17+0.03,TS17);DRAWTEXT_FIX(T1,0.66,TS1,0,'★监控:主力增仓'),COLOR8080FF;DRAWTEXT_FIX(T2,0.66,TS2,0,'★监控:主力减仓'),COLORFFFF00;DRAWTEXT_FIX(T3,0.66,TS3,0,'★监控:多空平衡'),COLORGRAY;DRAWTEXT_FIX(T4,0.66,TS4,0,'★监控:主力回补'),COLORFF9933;DRAWTEXT_FIX(T5,0.66,TS5,0,'★监控:主力出逃'),COLORFFFF00;DRAWTEXT_FIX(T6,0.86,TS6,0,'★操作:买入风险'),COLORYELLOW;DRAWTEXT_FIX(T7,0.86,TS7,0,'★操作:卖出风险'),COLORFFFF00;DRAWTEXT_FIX(T8,0.86,TS8,0,'★操作:追涨博弈'),COLOR8080FF;DRAWTEXT_FIX(T9,0.86,TS9,0,'★操作:稳健持股'),COLOR8080FF;DRAWTEXT_FIX(T10,0.86,TS10,0,'★操作:盘跌减仓'),COLORFFFF00;DRAWTEXT_FIX(T11,0.86,TS11,0,'★操作:杀跌空仓'),COLORFFFF00;DRAWTEXT_FIX(T12,0.36,TS12,0,'☆特别提示:筑底散兵坑'),COLOR66FFCC; DRAWTEXT_FIX(T13,0.36,TS13,0,'☆特别提示:铸顶风险区'),COLORFFFF00; DRAWTEXT_FIX(T14,0.36,TS14,0,'☆特别提示:穿越主力'),COLOR8080FF; DRAWTEXT_FIX(T15,0.36,TS15,0,'☆特别提示:穿越主力'),COLORYELLOW; DRAWTEXT_FIX(T16,0.36,TS16,0,'☆特别提示:穿越散户'),COLORGREEN; DRAWTEXT_FIX(T17,0.36,TS17,0,'☆特别提示:全盘穿越'),COLOR3399FF;DRAWTEXT_FIX(T18,0.36,TS18,0,'☆特别提示:神秘黑洞'),COLOR9966FF;{AAA:=REFDATE(HHV(H,30),DATE);T1A:=CONST(IF(ZZNTS,1,0));TS1A:=IF(T1A=1,0+0.03,0);}{DRAWTEXT(T1A=1 AND CURRBARSCOUNT=45 AND PERIOD=5,AAA-(AAA*TS1A),'【走牛天数判断】'),COLORRED,LINETHICK6;}{DRAWNUMBER(T1A=1 AND CURRBARSCOUNT=45-12 AND PERIOD=5,AAA-(AAA*TS1A),CONST(ZZNTS)),COLORRED,LINETHICK6;};三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3);三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3),COLORWHITE;高:=CROSS(CROSS(三日最高,C),0.6),STICK,COLORWHITE;DRAWICON(高>0,高,2);F:=100*(C-REF(C,1))/REF(C,1);博尔:=IF(C<REF(O,1) AND F<0,1,0);P1:=博尔;量化:=IF(C<REF(O,2) AND F<0,1,0);P2:=量化;P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,STICK,COLORFF00FF,LINETHICK1; DRAWICON(P1=0>0,P1=0,1);量:V,VOLSTICK;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN)))); XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2)))));ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);进攻流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22));GJJ:=EMA(进攻流量,8); LLJX:=EMA(进攻流量,3);动态天量:=CONST(IF(V=HHV(V,20),V,REF(V,BARSLAST(V=HHV(V,20))))),COLOR00FF00,POINT DOT;STICKLINE(((HSL * 0.4) >= 0),动态天量+((HSL * 0.4) +LLJX)*20,动态天量,3,0),COLORYELLOW;STICKLINE(((HSL * 0.4) < 0),动态天量+((HSL * 0.4) +LLJX)*20,动态天量,3,0),COLOR00FF00;资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00;资金收支:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净收支:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;收支比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净收支>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW;连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW;近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),COLORYELLOW,NODRAW;三日资金:SUM(资金收支,3),COLORWHITE,NODRAW;五日资金:SUM(资金收支,5),COLORFF00FF,NODRAW;十日资金:SUM(资金收支,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量> 0),动态天量+资金流量*20,动态天量,3,0),COLOR0000FF; STICKLINE((资金流量< 0),动态天量+资金流量*20,动态天量,3,0),COLOR008000;万手:VOL/10000,LINETHICK0;BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD =5,TOTALFZNUM,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1,VVOL,0,-1,-1),COLOR00C0C0;VOLUME:VOL,VOLSTICK;MAVOL1:MA(VOLUME,M1),COLOR80FFFF,LINETHICK1;MAVOL2:MA(VOLUME,M2),COLORFF00FF,LINETHICK1;{变色彩带}VAR1:=(2*CLOSE+HIGH+LOW)/4;操盘线: (EMA(VAR1,2)+EMA(VAR1,3)+EMA(VAR1,5)+EMA(VAR1,8)+EMA(VAR1,11)+EMA(VAR1,1 3))/6.4,COLORFFFF00,LINETHICK1,CIRCLEDOT;IF(操盘线>REF(操盘线,1),操盘线,DRAWNULL),COLOR0000FF,LINETHICK1,CIRCLEDOT;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
n=1 100 10
CG:MA((LOW+HIGH+CLOSE*2)/4,N);
FL:HHV(CG,3),COLORGREEN,POINTDOT;
FS:IF(CG<FL,(CG-(FL-CG)),FL),COLORGREEN,;
FL1:HHV(CG,5),COLORGREEN,POINTDOT;
FS1:IF(CG<FL1,(CG-(FL1-CG)),FL1),COLORGREEN,;
FL2:HHV(CG,7),COLORGREEN,POINTDOT;
FS2:IF(CG<FL2,(CG-(FL2-CG)),FL2),COLORGREEN,;
FL3:HHV(CG,9),COLORFFABA3,LINETHICK2;
FS3:IF(CG<FL3,(CG-(FL3-CG)),FL3),COLORFFABA3,LINETHICK2;
ZLZC1:=(HHV(H,144)-((HHV(H,144)-LLV(L,144))*0.618)),POINTDOT,LINETHI CK2;
ZLZC2:=(HHV(H,144)-((HHV(H,144)-LLV(L,144))*0.5)),POINTDOT,LINETHIC K2;
ZLZC3:=(HHV(H,144)-((HHV(H,144)-LLV(L,144))*0.382));
POLYLINE:(FS3>MA(FS3,5),FS3),COLOR1010F1,LINETHICK2; STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF; STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF; STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(L OW * 0.98),'*背离'),COLORYELLOW;
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'*背离'),COLORGREEN;
MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6); 买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND
CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'*拉升'),COLORLIMAGENTA;。