量价时空生命线通达信指标公式源码

合集下载

通达信指标公式源码主力状态 价量线主线快线副图指标

通达信指标公式源码主力状态 价量线主线快线副图指标

{价量线主线快线}价量: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),COLOR00CCFF,NODRAW;主线:(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25),COLORCYAN,NODRAW;快线:(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25),COLOR55AAFF,NODRAW;RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;K1:=SMA(RSV,3,1);D1:=SMA(K1,3,1);KK:=INTPART(K1);DD:=INTPART(D1);TFXXS:=KK+DD;{变异KD风险系数}TGLXS:=(TFXXS-REF(TFXXS,1));{变异KD乖离系数:资金流向}{红}STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR0000AA;STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR0022CC; STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR0055FF; {粉}STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORAA00BB; STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORCC22BB; STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFF55BB; {黄}STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR00AAFF; STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR00CCFF; STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR00FFFF; {蓝}STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORFF7700; STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORFFAA22; STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFFFF55; STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,TGLXS+100,8,0),COLORBROWN; STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,TGLXS+100,8,0),COLORWHITE; 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;{主力控盘筹码系数}ZSHJJ:=EMA(ZSHTL,55);{散户警戒}ZZLJJ:=EMA(ZZLKP,55);{主力警戒}散兵坑:IF(ZZLKP<=10,ZZLKP,ZZLKP),COLORMAGENTA,NODRAW;{散户套牢筹码}{好}STICKLINE(C>0,ZSHTL,ZZLKP,2,0),COLOR808080;{散户筹码警戒}STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),COLORC0C0C0;{主力控盘筹码}{粉}STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORAA00BB; STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORCC22BB; STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5,0 ),COLOREE44BB; {蓝}STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORFF7700; STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORFFAA22; STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5 ,0 ),COLORFFFF55;{亮红}STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLOR131FFD; STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5,0 ),COLOR5050FF; STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5,0 ),COLOR7E7EFF;{深蓝}STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLORAA0000; STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5,0 ),COLORCC0000; STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5 ,0 ),COLORFF0000;{主力筹码警戒}{黄}STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,2.5,0 ),COLOR00AAFF; STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,1.5,0 ),COLOR00CCFF; STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,0.5,0 ),COLOR00FFFF;{红}STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,2.5,0 ),COLOR0000AA; STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,1.5,0 ),COLOR0022CC; STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,0.5 ,0 ),COLOR0055FF; {红}STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,2.5,0 ),COLOR0000AA;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,1.5,0 ),COLOR0022CC;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,0.5 ,0 ),COLOR0055FF;{铸顶风险区}{绿}STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,2.5,0),COLOR00AA00; STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1.5,0),COLOR00CC00; STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,0.5,0),COLOR00FF00; {散兵坑}STICKLINE(ZZLKP<=10,ZZLKP,0,5,0),COLORDD00DD;100,COLORGREEN;80,COLORGREEN;{0,COLORGREEN;}{主线快线}价量,COLOR0CC0FF,LINETHICK2;主线,COLOR00FFAA,LINETHICK2;快线,LINESTICK,COLORFF68DD;。

通达信量价时空主图指标公式

通达信量价时空主图指标公式

通达信量价时空主图指标公式DRAWKLINE(HIGH,OPEN,LOW,CLOSE);MA5:MA(C,5);MA6:=MA(C,6);MA10:MA(C,10);MA20:MA(C,20);A2:=REF(MA20,1);J1:=(MA20-A2)/A2*100;MJ1:=MA(J1,3);MA30:MA(C,30);MA60:MA(C,60);MA120:MA(C,120);乖离2:=(MA20-MA30)/MA30*100;VAR1:=IF(BETWEEN(乖离2,-2,5),2,0);MAX1:=MAX(MA20,MA30);MAX2:=MAX(MAX1,MA60);MIN11:=MIN(MA20,MA30);MIN2:=MIN(MIN11,MA60);K1:=(MAX2/MIN2-1)*100;{粘合度符合条件}VAR2:=IF(K1<=8,1,0);上火车轨:=MA20>MA30 AND MA20>REF(MA20,1) AND MA30>REF(MA30,1) AND MA20-MA30>REF((MA20-MA30),1) ;STICKLINE(上火车轨,MA20,MA30,0,0),COLORRED;神枪手:=DRAWTEXT(FILTER(上火车轨AND 'MACD.DIF'<0.15 AND 'MACD.DIF'>REF('MACD.DIF',1) AND MA(V,60)>REF(MA(V,60),1) AND MA(V,5)>MA(V,10) AND J1>REF(J1,1) AND( L<=MA20 AND C>MA20 OR (CROSS(MA5,MA20)) ),5),L*0.98,'←神枪手');神枪手选股:=FILTER(上火车轨AND 'MACD.DIF'<0.15 AND 'MACD.DIF'>REF('MACD.DIF',1) AND MA(V,60)>REF(MA(V,60),1)AND MA(V,5)>MA(V,10) AND J1>REF(J1,1) AND( L<=MA20 AND C>MA20 OR (CROSS(MA5,MA20)) ),5);{44.40%15240}短线暴张:DRAWTEXT(FILTER( (VAR1 OR VAR2) AND MA10>REF(MA10,1) AND COUNT(MA30>REF(MA30,1),3)=3 AND MA30>MA60 AND COUNT(CROSS(MA5,MA30),3) AND J1>MJ1 AND MA(V,5)>MA(V,60)AND MA(V,60)>REF(MA(V,60),1),5),MA60*0.99,'短线暴张'),COLORRED;DRAWTEXT(CROSS('KDJ.K'(5,2,3),'KDJ.D'(5,2,3)) AND 'KDJ.D'(5,2,3)<30 AND J1>MJ1 AND MA60>REF(MA60,1) AND COUNT(J1<1,3)>=1 ,L*0.995,'←买入'),COLORYELLOW;DRAWTEXT(CROSS('KDJ.D'(5,2,3),'KDJ.K'(5,2,3)) AND 'KDJ.D'(5,2,3)>65 AND J11,3)>=1,H*1.005,'←卖出'),COLORGREEN;DRAWTEXT(CROSS('KDJ.D'(18,9,6),'KDJ.K'(18,9,6)) AND 'KDJ.D'(18,9,6)>60 AND 'KDJ.J'(45,15,15)>90,H*1.03,'←顶'),COLORRED;DRAWTEXT(CROSS(MA5,MA6) AND 'KDJ.K'(5,3,3)>=50 AND 'KDJ.J'(5,3,3)<31 ,L*0.92,'←再买'),COLORMAGENTA;XL1:=((LLV(LOW,3) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) >= 1.04));XL2:=(((CLOSE - EMA(CLOSE,21)) / EMA(CLOSE,21)) * 100);XL3:=CROSS(XL2,(0 - 20));DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),(LOW - 0.4),'●买点');DRAWTEXT((XL3 > 0),(LOW - 0.2),'●绝对底部');X6:=REF(CLOSE,1);X7:=((SMA(MAX((CLOSE - X6),0),7,1) / SMA(ABS((CLOSE - X6)),7,1)) * 100);X8:=CROSS(79,X7);X9:=FILTER(X8,4);DRAWTEXT(X9,(HIGH * 1.02),'●出货'),COLOR9000F5;STICKLINE(C>1.098*REF(C,1),C,O,0,0),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;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<>CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<>EE1:=V<>老鼠仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;DRAWTEXT(老鼠仓,(LOW* 0.99),'老鼠仓'),COLOR40CCFF;A74:=MA(CLOSE,20);A75:=(CLOSE > MA(CLOSE,5));A76:=(MA(CLOSE,5) > MA(CLOSE,10));A77:=(CLOSE > MA(CLOSE,10));A78:=(MA(CLOSE,5) > MA(CLOSE,20));A79:=(CLOSE > MA(CLOSE,20));A710:=REF(A74,1);A711:=(A74 > 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左右'),COLORFF00FF ;DRAWTEXT(T2=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'走势趋强,还显不足,短线进场,仓位在1/2左右'),COLORFF00FF ;DRAWTEXT(T3=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'量价良好,没有明显走强,短线进场,仓位1/2左右'),COLORFF00FF ;DRAWTEXT(T4=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'形态尚可,量能不足,未完全走强,短线参与,仓位1/3左右'),COLORFF00FF ;DRAWTEXT(T5=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'形态变坏,重仓者减持大半,清仓者观望'),COLORFF00FF ;DRAWTEXT(T6=1 AND CURRBARSCOUNT=70,AAA*0.98,'随大盘一起下跌,明显缩量走势,考虑到风险,减持或清仓'),COLORFF00FF ;DRAWTEXT(T7=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'该股放量下跌,走势明显偏弱,离场观望'),COLORFF00FF ;DRAWTEXT(T8=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'该股缩量下跌,走势偏弱,离场观望。

通达信价量时空指标公式

通达信价量时空指标公式

通达信价量时空指标公式K线个数:=60;J1:=-49;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D,COLORFF00FF,NODRAW;K1:=1/3*RSV+REF(K,1)/3*2;D1:=1/3*K+REF(D,1)/3*2;JJ:=3*K1-2*D1;J11:=J;J昨:=REF(JJ,1);JX:=IF(J1=-50,J11,IF(J1=-49,J昨,J1));J拐头价验证:=((9/7*JX-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9);J底部上穿此价买:=IF(J拐头价验证<REF(J拐头价验证,1),J拐头价验证,DRAWNULL),COLOR80FFFF,NODRAW;J从顶下穿此价卖:=IF(J拐头价验证>REF(J拐头价验证,1),J拐头价验证,DRAWNULL),COLORFFFF00,NODRAW;J100%价:=CONST(((9/7*100-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));J80%价:=CONST(((9/7*80-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));J50%价:=CONST(((9/7*50-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));J20%价:=CONST(((9/7*20-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));J0%价:=CONST(((9/7*0-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9));STICKLINE(1,J0%价,J0%价,80,-1),COLOR606060;今⽇拐头价:CONST(J拐头价验证),COLOR80FFFF;J%:J,COLORFF00FF,NODRAW;对应股价:((9/7*J-2*REF(K1,1)+12/7*REF(D1,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9),COLORFF0080,NODRAW;RSVD:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*(J100%价-J0%价)+J0%价;KK:=SMA(RSVD,3,1),COLORCC9999;DD:=SMA(KK,3,1),COLOR0080FF;股价反推J值:=3*KK-2*DD,COLORFF0080;{-【主⼒动向】,即原【SUPL】往事如风-QQ:105365158 经海量数据分析及精准校验--}TMP:=LARGEINTRD VOL-LARGEOUTTRDVOL;DDY动因:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);L2有效显⽰数据:=IF(DDY动因>0 OR DDY动因<0 OR TMP>0 OR TMP<0,DDY动因,DRAWNULL),NODRAW;涨跌动因%:IF(L2有效显⽰数据=DRAWNULL,DRAWNULL,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM),COLOR0080FF,NODRAW;买卖⼒度%:IF(L2有效显⽰数据=DRAWNULL,DRAWNULL,(LARGEINTRDVOL-LARGEOUTTRDVOL)*100/VOL),COLOR0000FF,NODRAW;动因柱:=IF(L2有效显⽰数据=DRAWNULL,DRAWNULL,(TRADEOUTNUM-TRADEINNUM)*(J100%价-J0%价)/TRADENUM),COLOR00CCFF,NODRAW;⼒度柱:=IF(L2有效显⽰数据=DRAWNULL,DRAWNULL,(LARGEINTRDVOL-LARGEOUTTRDVOL)*(J100%价-J0%价)/VOL),COLOR0000FF,NODRAW;RSVM:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*(J100%价-J0%价)+J0%价;%K:=MA(RSVM,3);%D:=MA(%K,3),COLORAA00DD;GG:=DRAWBAND(%K,RGB(102,32,51),%D,RGB(0,64,16));{VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;VAR4:=EMA(VAR3*10,3);VAR5:=LLV(LOW,13);VAR6:=HHV(VAR4,13);VAR7:=IF( BARSSINCE(C)>34,1,0);VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;VAR9:=IF(VAR8>100,100,VAR8);}{吸筹:VAR9,LINETHICK0,COLOREE00EE;}{STICKLINE(VAR9>-120,J0%价,VAR9,3,1);STICKLINE(VAR9>1 AND "KDJ.J">REF("KDJ.J",1) AND REF("KDJ.J",1)<REF("KDJ.J",2),J0%价,VAR9,3,0),COLORRED;STICKLINE(VAR9>0.1 AND VAR9<1 AND "KDJ.J">REF("KDJ.J",1) AND REF("KDJ.J",1)<REF("KDJ.J",2),J0%价,VAR9,3,0),COLOR00FFFF;}STICKLINE(1,J100%价,J100%价,80,-1),COLOR606060;STICKLINE(1,J80%价,J80%价,80,-1),COLOR606060;STICKLINE(1,J50%价,J50%价,80,-1),COLOR606060;STICKLINE(1,J20%价,J20%价,80,-1),COLOR606060;{涨跌动因柱}STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,2.3,0),COLOR005A66;STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,1.7,0),COLOR006A88;STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,1.0,0),COLOR007AAA;STICKLINE(动因柱>0 AND V>0,J50%价,动因柱+J50%价,0.33,0),COLOR008ACC;STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,2.3,0),COLOR003300;STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,1.7,0),COLOR004400;STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,1.0,0),COLOR005500;STICKLINE(动因柱<0 AND V>0,J50%价,动因柱+J50%价,0.33,0),COLOR006000;DRAWTEXT(CURRBARSCOUNT=K线个数,J100%价,'↖100%'),COLORA0A0A0;DRAWTEXT(CURRBARSCOUNT=K线个数,J80%价,' ↖80%'),COLORA0A0A0;DRAWTEXT(CURRBARSCOUNT=K线个数,J50%价,' ↖50%'),COLORA0A0A0;DRAWTEXT(CURRBARSCOUNT=K线个数,J20%价,' ↖20%'),COLORA0A0A0;DRAWTEXT(CURRBARSCOUNT=K线个数,J0%价,' ↖0%'),COLORA0A0A0;{--价量乃为指标之母,亦即先有股价、成交量,始有指标的产⽣,成反向推算KDJ价--}DRAWBAND(股价反推J值,RGB(204,0,255),股价反推J值,RGB(255,255,255));DRAWBAND(KK,RGB(153,153,204),KK,RGB(255,255,255));DRAWBAND(DD,RGB(128,128,0),DD,RGB(255,255,255));{通达信主⼒雷达公式}B1:=REF(C,1);B2:=REF(C,2);SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));SM:=IF(REF(SS,1)!=0,REF(SS,1),IF(REF(SS,2)!=0,REF(SS,2),IF(REF(SS,3)!=0,REF(SS,3),IF(REF(SS,5)!=0,REF(SS,5),IF(REF(SS,6)!=0,REF(SS,6),IF(REF(SS,7)!=0,REF(SS,7),0))))));⾦底:=(SS=1 OR SS=2) AND SM<0;绿顶:=(SS=-1 OR SS=-2) AND SM>0;AA:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) AND IF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5),REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) AND REF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1,REF(CLOSE,6) <REF(CLOSE,7))));BB:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) ANDIF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5),REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) AND REF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7))));三平底:=AA AND CLOSE>REF(OPEN,2);三平顶:=BB AND CLOSE<REF(CLOSE,2);C_D1:=(3*C+2*O+L+H)/7;C_D1:=(3*C+2*O+L+H)/7;WMA5:=(5*C_D1+4*REF(C_D1 ,1 )+3*REF(C_D1 ,2 )+2*REF(C_D1 ,3 )+REF(C_D1 ,4 ))/15 COLORYELLOW;C_D2:=REVERSE(C_D1)+2*WMA5 COLORGREEN;WMA5⾦叉:=CROSS(WMA5,C_D2*0.997);WMA5死叉:=CROSS(C_D2,WMA5*0.997);LC:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;主⼒:=EMA((CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*480,2)*5,COLOR0000FF;散户:=EMA((CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*480,7)*5,COLOR00FF00;{股旁⽹-股票公式⽹站 }DRAWICON(CROSS(主⼒,散户) AND 主⼒<-10 AND 散户>REF(散户,1) OR (CROSS(主⼒,散户) AND 散户<-35),J20%价,1); DRAWTEXT(CROSS(主⼒,散户) AND 主⼒<-10 AND (WMA5⾦叉 OR ⾦底 OR 三平底),J20%价,8);DRAWTEXT(CROSS(RSI1,25) AND (WMA5⾦叉 OR ⾦底 OR 三平底),J0%价,9);DRAWTEXT(CROSS(85,RSI1),股价反推J值,10);{买卖⼒度柱}STICKLINE(⼒度柱>0,J50%价,⼒度柱+J50%价,0,0),COLOR0000CC;STICKLINE(⼒度柱<0,J50%价,⼒度柱+J50%价,0,0),COLOR009940;STICKLINE(1,J50%价,J50%价,80,-1),COLOR606060;{--价量乃为指标之母,亦即先有股价、成交量,始有指标的产⽣,成反向推算KDJ价--};。

简单明了通达信指标公式源码

简单明了通达信指标公式源码

简单明了通达信指标公式源码
以下是通达信指标公式的源码(部分):
1.移动平均线(MA)
```
MA(CLOSE,N):收盘价的N日简单移动平均线
MA(C,N):C为输入数据,例如指标的参数可以是成交量、MACD柱等;
```
2.指数平滑移动平均线(EMA)
```
EMA(C,N):收盘价的N日指数平滑移动平均线
```
3.相对强弱指标(RSI)
```
RSI(C,N):C为收盘价序列,N为计算周期;
```
4. 随机相对强弱指标(StochRSI)
```
StochRSI(C, N, M1, M2): C为收盘价序列,N为计算RSI的周期,
M1为计算K值的周期,M2为计算D值的周期;
```
5.BOLL指标(布林线)
```
BOLL(CLOSE,N,P):C为收盘价序列,N为计算布林线的周期,P为布林线上下轨的标准差倍数;
```
6.指数平均数指标(EMA)
```
EMA(CLOSE,N):收盘价序列的N日指数平均数;
```
7.指数平滑异同平均线(MACD)
```
MACD(CLOSE,SHORT,LONG,M):C为收盘价序列,SHORT为快速移动平均线的时间周期,LONG为慢速移动平均线的时间周期,M为移动平均线的移动天数;
```
8.能量潮(OBV)
```
OBV(CLOSE,V):C为收盘价序列,V为成交量序列;
```
以上是通达信指标公式的部分源码,还有其他指标的源码未列出。

通达信软件指标公式源码通达信量学成交量指标公式源码.docx

通达信软件指标公式源码通达信量学成交量指标公式源码.docx

通达信量学成交量指标公式源码{VOLUME:VOL Z VOLSTICK;MAV5:MA(VOLUME,M1);MAV20:MA(VOLUME,20);MAV60:MA(VOLUME,20);MAV120:MA(VOLUME Z M2);}绿低量: = 13;蓝低量:=55;灰低量: = 100;{ ------- VOL •量能饱和---- }Nl:=21;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:IF(SAT>1,1,SAT)*100,COLOROOAAFF,NODRAW;中点:二REFDATE(HHV(V,180)*0.5QATE);STICKLINE(CURRBARSCOUNT=N1,中点*1・9,中点*1.5,100,1),COLOROOAAFF; STICKLINE(CURRBARSCOUNT=N1Z中点*1.88,中点*1.52,量能饱和,0),COLOR0077FF;DRAWTEXT(CU RRBARSCOUNT= N1+3,中点*1.8;饱和度COLORYELLOW;=======}H_L:=0.1*CONST(HHV(VOL,240));{MAV10:MA(V,10),COLORYELLOW;}启动5:=MA(V,5),COLORWHITE;洗盘40:=MA(V,40),COLORBLUE;异动135:=MA(V,135),COLORMAGENTA;WOL:=IF(CURRBARSCOUNT=1 ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL);{模拟量}STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,WOL,O z l,-l),COLOROOCOCO;量:VOL, VOLSTICK;换手:VOL*10000/FINANCE(7),NODRAW; {DYNAINFO(37)*100}换10T:=SUM(换手,10),NODRAW;倍数: = 1・9;倍量:VOL> = REF(V,1)*倍数AND(IF(C<O Z C>REF(C,1),1)),COLORYELLOW,NODRAW;倍缩:REF(V,1)>=VOL*倍数,COLORMAGENTA,NODRAW;平量:RANGE(V/REF(V,1),0.97,1.03) ANDBARSCOUNT(V)>=2,COLORWHITE,NODRAW;彳氐量10: VOL=LLV(VOL,绿彳氐量)AND BARSCOUNT(V)>=绿彳氐量Z COLORGREEN,NODRAW;低量50: VOL=LLV(VOL,蓝低量)AND BARSCOUNT(V)>=蓝低量,COLORBLUE,NODRAW;地量:VOL=LLV(VOL,灰彳氐量)AND BARSCOUNT(V)>二灰彳氐量,COLORGRAY,NODRAW;V1:=VOL*0.9;{图标位置}V2:=VOL*0.8;STICKLINE(倍量/ 0,VI, 1,0),COLORYELLOW;STICKLINE(平量,O z VI, l z0),COLORWHITE;STICKLINE(低量10,0, V2,1,0),COLORLIGREEN;STICKLINE(低量50,0,V2,1,0),COLORBLUE;STICKLINE(地量z O,V2,l z O),COLORGRAY;STICKLINE(倍缩,0,V*0.45,1,0),COLORMAGENTA;均价:=AMOUNT/VOL/100;TJ01:=C<0 AND 均价>REF(CJ){ AND BARSCOUNT(C)>=240};{假阴真阳}; TJ02:=C<0 AND C>REF(C,1);STICKLINE(TJ01 OR TJ02,0,V,0,0),COLORRED;{假阴柱}真阳或假阴:=C>0 OR C>REF(C,1);收阳匸REF(真阳或假阴,3);倍量1:=REF(倍量Q);高量:=REF(V,3)>=H HV(V,7);三日不破:二LLV(C,3)>=REF(L,3);价升:二COUNT(C>=REF(C,1),3)=3;{收盘价逐升}量缩:=COUNT(Vv=REF(V」),3)=3;连阳:=COUNT(真阳或假阴,3)=3;倍量将军柱:二倍量1AND三日不破AND收阳;高量将军柱:二高量AND三日不破AND收阳;将军柱:二倍量将军柱OR高量将军柱;黄金柱:=将军柱AND价升AND量缩AND连阳;STICKLINE(黄金柱Z0.3*V,0.7*V Z1Z0),COLORRED; {红柱}DRAWICON(黄金柱,V*1.5,1);V100:= V<=LLV(V,100)*1.2 AND V>0 AND BARSCOUNT(V)> = 100; 百口地量群:=COUNT(V100,5)>=3;DRAWTEXT(FILTER(百R 地量群,4),V+3*H_L,地量群'),COLORGRAY;长阴短柱:=C/REF(C,l)<=0.96 AND V<HHV(V,30)/1.9;{DRAWTEXT(长阴短柱,V+1.6*H_L;! ^^OLORLICYAN};DRAWLINE(V=LLV(V,3)Z V,V=HHV(V,3),V,0),COLOR9A90FF;DRAWLINE(V=HHV(V Z7),V Z V=LLV(V Z7),V,0),COLOR9AFF89;DRAWLINE(L=LLV(L, 7),V Z H=HHV(H Z7),V Z0),COLOR9AFF89;DRAWLINE(V=HHV(V Z21)Z V,V=LLV(V,21)Z V,0)Z COLORC100FF;DRAWLINE(V=LLV(V,21)Z V,V=HHV(V Z21),V Z0)Z COLORC100FF;DRAWLINE(V=HHV(V/35),V,V=LLV(V,35)/V,0),COLORC1005B;DRAWLINE(V=LLV(V,35)Z V,V=HHV(V Z35),V,0),COLORC1005B;DRAWLINE(V=HHV(V,49)Z V Z V=LLV(V,49),V z0),COLORYELLOW;DRAWLINE(V=LLV(V,49)MV=HHV(V,49)M0),COLOR YELLOW;rT 1 79 地更 0 00 地里群 姬群 停 10^1 oroo 少• 「 倍g ooo 平更:aoo 氐虽M ow。

通达信量能指标公式源码

通达信量能指标公式源码

通达信量能指标公式源码```周期=22if (BarNumber > 周期)当前成交量 = Volume前期成交量 = Ref(Volume, 周期)//计算主力买卖盘力量当前成交量力量 = IFF((Current成交量 - 前期成交量) > 0, (Current成交量 - 前期成交量), 0)主力买卖盘力量=SUM(当前成交量力量,周期)//计算散户买卖盘力量当前成交量力量反=IFF((前期成交量-当前成交量)>0,(前期成交量-当前成交量),0)散户买卖盘力量=SUM(当前成交量力量反,周期)//计算总体买卖盘力量总体买卖盘力量=主力买卖盘力量+散户买卖盘力量//计算主力买卖比例主力买卖比例=IFF(总体买卖盘力量>0,(主力买卖盘力量/总体买卖盘力量)*100,0)//计算散户买卖比例散户买卖比例=100-主力买卖比例//画出主力买卖比例曲线和散户买卖比例曲线Plot(主力买卖比例, "主力买卖比例", colorRed)Plot(散户买卖比例, "散户买卖比例", colorGreen)```这段源码采用了TradingView的Pine Script语言编写。

其中 `周期`为指定的周期长度,`BarNumber`为当前的K线数量,`Volume`为当前K 线的成交量。

通过计算当前成交量和前期成交量的差值,可以得到主力买卖盘力量和散户买卖盘力量。

然后将这些力量进行累计,并计算主力买卖比例和散户买卖比例。

最后,通过`Plot(`函数将主力买卖比例和散户买卖比例画在图表上,使用红色和绿色分别表示。

这段代码的作用是计算并绘制通达信量能指标中的主力买卖比例和散户买卖比例曲线。

这些曲线可以帮助分析市场的买卖力量和趋势,更好地理解市场的活跃度和价格行为。

【股票指标公式下载】-【通达信】资金指标(最高、开盘、收盘、生命线)

【股票指标公式下载】-【通达信】资金指标(最高、开盘、收盘、生命线)

【通达信】资金指标(最高、开盘、收盘、生命线)-指标公式源码VAR1:=SMA(AMOUNT,10,1)/1000000;VAR2:=REF(VAR1,1);VAR3:=MA(REF(CLOSE,1),5);最高:VAR1*HIGH/VAR3*1/10,POINTDOT,COLOR009900,COLORGRAY;最低:VAR1*LOW/VAR3*1/10,POINTDOT,COLOR009900,COLORYELLOW;开盘:VAR1*OPEN/VAR3*1/10,POINTDOT,COLOR009900,COLORMAGENTA;收盘:VAR1*CLOSE/VAR3*1/10,COLOR009900,COLORGREEN,POINTDOT;生命线:EMA(收盘,12),COLORWHITE;昨收盘:=REF(收盘,1),POINTDOT,COLOR009900,LINETHICK0;涨跌:=(收盘-REF(收盘,1))/REF(收盘,1)*100,POINTDOT,COLOR009900,LINETHICK0;STICKLINE(收盘>开盘,收盘,开盘,3,0),COLORRED;STICKLINE(收盘>开盘,最高,MAX(收盘,开盘),0,1),COLORRED; STICKLINE(收盘>开盘,MIN(收盘,开盘),最低,0,1),COLORRED; STICKLINE(收盘<开盘,收盘,开盘,2,0),COLORGREEN;STICKLINE(收盘<开盘,最高,MAX(收盘,开盘),0,1),COLORGREEN; STICKLINE(收盘<开盘,MIN(收盘,开盘),最低,0,1),COLORGREEN;【通达信】资金指标(最高、开盘、收盘、生命线)-指标公式效果图(文档来源:若水财经社区)。

通达信量价趋势副图源码指标公式

通达信量价趋势副图源码指标公式

本副图为图形指标,根据量价关系编程,经多时验证直观且准确,图中有趋势提示,可配合K线主图判断操作A:=EMA(EMA(AMOUNT/10000000,5),10);N1:=A;最高:N1,LINETHICK1;最低:N1,LINETHICK1;收盘:N1,LINETHICK1;开盘:REF(收盘,1),LINETHICK1;均量10:=MA(A,10);B:=收盘>开盘;D:=收盘<开盘;F:=EMA(EMA(C,5),10);N2:=F;收盘1:=N2;开盘1:=REF(收盘1,1);G:=收盘1>开盘1;I:=收盘1<开盘1;DRAWTEXT_FIX(1,0.9,0.42,0,'【量价趋势】'),COLORYELLOW;DRAWTEXT_FIX(收盘1>开盘1 AND ISLASTBAR,0.94,0.58,0 ,'价涨'),COLORRED; DRAWTEXT_FIX(收盘1<开盘1 AND ISLASTBAR,0.94,0.58,0 ,'价跌'),COLORGREEN; DRAWTEXT_FIX(收盘>开盘AND ISLASTBAR,0.91,0.58,0 ,'量增'),COLORMAGENTA; DRAWTEXT_FIX(收盘<开盘AND ISLASTBAR,0.91,0.58,0 ,'量缩'),COLORLIRED;K:=B AND G;{}P:=D AND G;高:=REF(HHV(N1,130),3);上部:REFDATE(高,DATE),COLORWHITE,LINETHICK1;STICKLINE(K,上部,上部*1.05,4,0),COLOR3333FF;STICKLINE(P,上部,上部*1.05,4,0),COLOR3CFFFF;DRAWBAND(开盘,RGB(0,255,100),最高,RGB(255,00,100));DRAWTEXT_FIX(1,0.29,0.1,0,'上部红色为价涨量升,上升趋势;'),COLOR3333FF; DRAWTEXT_FIX(1,0.485,0.1,0,'黄色为价跌量减,量价背离,注意顶部!'),COLOR3CFFFF; DRAWTEXT_FIX(1,0.35,0.25,0,'没有标记的区域包括放量下跌和无量阴跌,都不参与'),COLOR66FF33。

通达信指标公式源码量价趋势

通达信指标公式源码量价趋势

通达信指标公式源码量价趋势
量价趋势指标公式的源码如下:
变量定义:
-VAR1:价格的变化值,即当前价格减去前一天的价格
-VAR2:价格的变化幅度,即VAR1除以前一天的价格
-VAR3:量价趋势指标的计算结果
公式源码:
```
REF(CLOSE,1)=P
VAR1=P-REF(CLOSE,1)
VAR2=VAR1/REF(CLOSE,1)
VAR3=SMA(VAR2,3,1)
```
代码解释:
-REF(CLOSE,1)表示前一天的收盘价,用P表示
-VAR1表示价格的变化值
-VAR2表示价格的变化幅度,即VAR1除以前一天的价格
-VAR3表示量价趋势指标的计算结果,即VAR2的3日简单移动平均
量价趋势指标可以通过观察其数值变化来判断市场的趋势。

当量价趋势指标上升时,表示当前价格的变化幅度较大,市场处于上涨趋势;当量价趋势指标下降时,表示当前价格的变化幅度较小,市场处于下跌趋势。

通过对量价趋势指标的分析,可以帮助投资者更好地把握市场的动向,作出相应的交易决策。

【股票指标公式】-【通达信】换手率 价量时空(副图)

【股票指标公式】-【通达信】换手率 价量时空(副图)

【通达信】换手率价量时空(副图)-指标公式源码买入原则股价突破压力位预测换手大于5 预测倍量大于2在什么时间买自己决断个人建议收盘前半小时可靠性更高换手率指标DRAWGBK(CLOSE>0,STRIP(rgb(0,128,128),rgb(0,64,0),0));yc:=IF(DYNAINFO(7)=CLOSE ANDDYNAINFO(10)=AMOUNT,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),0); sj:=VOL;换手:VOL/CAPITAL*100,LINETHICK0,PRECIS2;预测:yc/sj*换手,LINETHICK0,PRECIS2;预倍:预测/REF(换手,1),LINETHICK0,PRECIS1;实倍:换手/REF(换手,1),LINETHICK0,PRECIS1;线:=0;STICKLINE(C>=REF(C,1),换手,线,7,0),color5454ff;STICKLINE(C>=REF(C,1),换手,线,5,0),color5f5fff;STICKLINE(C>=REF(C,1),换手,线,3,0),color7878ff;STICKLINE(C>=REF(C,1),换手,线,2,0),color9A9Aff;STICKLINE(C>=REF(C,1),换手,线,1,0),colorA8A8ff;STICKLINE(C<REF(C,1),换手,线,7,0),colorFFFF62;STICKLINE(C<REF(C,1),换手,线,5,0),colorFFFF75;STICKLINE(C<REF(C,1),换手,线,4,0),colorFFFF83;STICKLINE(C<REF(C,1),换手,线,3,0),colorFFFF96;STICKLINE(C<REF(C,1),换手,线,2,0),colorFFFFa5;STICKLINE(预测>换手,换手,预测,7,0),coloryellow;L5:MA(换手,5),coloryellow,PRECIS2,LAYER0;L13:MA(换手,13),colorf00ff0,PRECIS2,LAYER1;L21:MA(换手,21),colorgreen,PRECIS2,LAYER2;L55:MA(换手,55),colorwhite,PRECIS2,LAYER3;换手5:SUM(换手,5),LINETHICK0,colorwhite,PRECIS0;换手13:SUM(换手,13),LINETHICK0,colorwhite,PRECIS0;换手21:SUM(换手,21),LINETHICK0,colorwhite,PRECIS0;换手55:SUM(换手,55),LINETHICK0,colorwhite,PRECIS0; DRAWTEXTABS(10,0,' 5换手:'+NUMTOSTRN(换手5,0)),Color00EEFF; DRAWTEXTABS(10,10,'13换手:'+NUMTOSTRN(换手13,0)),Color00EEFF; DRAWTEXTABS(10,20,'21换手:'+NUMTOSTRN(换手21,0)),Color00EEFF; DRAWTEXTABS(10,30,'55换手:'+NUMTOSTRN(换手55,0)),Color00EEFF; MC5:count(换手>10,5),PRECIS0,LINETHICK0,coloryellow;MC10:count(换手>10,10),PRECIS0,LINETHICK0,coloryellow; DRAWTEXTABS(250,0,'5天高换手次数:'+NUMTOSTRN(MC5,0)),Color00EEFF,linethick2; DRAWTEXTABS(242,20,'10天高换手次数:'+NUMTOSTRN(MC10,0)),Color00EEFF,linethick2;强弱:10,colorwhite,linethick3,pointdot;看着花骚自己剪裁一下下面是价量时空这个是主图测试版等优化完在发指标源码{价量时空}ma1:CLOSE,LINETHICK0,PRECIS2;MA5:MA(CLOSE,5),coloryellow,PRECIS2;MA13:MA(CLOSE,13),colorf00ff0,PRECIS2;MA34:MA(CLOSE,34),colorgreen,PRECIS2;MA55:MA(CLOSE,55),colorwhite,PRECIS2;MA89:MA(CLOSE,89),colorgreen,PRECIS2,linethick3,pointdot;MA233:MA(CLOSE,233),colorwhite,PRECIS2,linethick3,pointdot; STICKLINE(C>=O,H,L,1,0),color5454ff;STICKLINE(C>=O,C,O,8,0),color5454ff;STICKLINE(C>=O,C,O,7,0),color5f5fff;STICKLINE(C>=O,C,O,3,0),color7878ff;STICKLINE(C>=O,C,O,2,0),color9A9Aff;STICKLINE(C>=O,C,O,1,0),colorA8A8ff;STICKLINE(C<O,H,L,1,0),colorFFFF54;STICKLINE(C<O,C,O,8,0),colorFFFF54;STICKLINE(C<O,C,O,7,0),colorFFFF62;STICKLINE(C<O,C,O,6,0),colorFFFF75;STICKLINE(C<O,C,O,5,0),colorFFFF83;STICKLINE(C<O,C,O,4,0),colorFFFF96;STICKLINE(C<O,C,O,3.5,0),colorFFFFa5;gg:=PEAKBARS(4,20,1)+1;dd:=TROUGHBARS(4,20,1)+1;VOL1:=MA(VOL,1);VOL5:=MA(VOL,5);最大量:=HHV(VOL1,DD);量支撑:=VOL1=最大量 AND C>REF(C,1);LSJ:BARSLAST(量支撑),LINETHICK0;LGJG:=REF(C,LSJ);LDJG:=REF(L,LSJ);压力:IF(CROSS(VOL5,VOL1),LGJG,REF(LGJG,BARSLAST(CROSS(VOL5,VOL1)))),col orwhite,LINETHICK0;支撑:IF(CROSS(VOL5,VOL1),LDJG,REF(LDJG,BARSLAST(CROSS(VOL5,VOL1)))),col orwhite,LINETHICK0;FILLRGN(压力,支撑,LGJG>LDJG,rgb(128,128,128)),LAYER5; DRAWTEXTABS(10,50,'(34):'+NUMTOSTRN(MA34,2)),colorgreen; DRAWTEXTABS(90,50,'(89):'+NUMTOSTRN(MA89,2)),colorgreen; DRAWTEXTABS(170,50,'(233):'+NUMTOSTRN(MA233,2)),colorwhite;DDJG:=LLV(L,DD);XJSJ:=last(dd>gg);drawtext(DD>0,DDJG*0.95,STR(DD)),colorwhite,align1,valign0,LAYER3; drawtext(XJSJ>0,DDJG*0.99,STR(XJSJ)),coloryellow,align1,valign0,LAYER 3;FILLRGN(DDJG,DDJG*0.91,C>0,rgb(0,0,0)),LAYER5;{}FD10:=DDJG*1.1;FD20:=DDJG*1.2;FD30:=DDJG*1.3;FD40:=DDJG*1.4;FD50:=DDJG*1.5;FD60:=DDJG*1.6;翻1:=DDJG*2;FILLRGN(DDJG,FD20,C>0,rgb(0,50,0)),LAYER6;FILLRGN(FD20,FD40,C>0,rgb(0,80,0)),LAYER6;FILLRGN(FD40,FD60,C>0,rgb(0,100,0)),LAYER6;drawtext(c>FD60,翻1,'');drawtext(c>FD60 and CROSS(c,FD60),翻1,'目标'),Color00EEFF;买入原则股价突破压力位预测换手大于5 预测倍量大于2在什么时间买自己决断个人建议收盘前半小时可靠性更高【通达信】换手率价量时空(副图)-指标公式效果图(文档来源:好股票网)。

通达信指标公式源码主力轨迹公式

通达信指标公式源码主力轨迹公式

通达信指标公式源码主力轨迹公式以下是通达信指标公式的源码,包括主力轨迹公式:一、动量指标(Momentum Indicator):公式:MOM(N)=C-REF(C,N)源码:MOM:REF(C,1)>=REF(C,N)?C-REF(C,N):REF(C,1)-REF(C,N);二、相对强弱指标(Relative Strength Index,RSI):公式:RSI(N)=SMA(MAX(C-REF(C,1),0),N,1)/SMA(ABS(C-REF(C,1)),N,1)*100源码:RSI:EMA(MAX(CLOSE-REF(CLOSE,1),0),N,1)/EMA(ABS(CLOSE-REF(CLOSE,1)),N,1)*100;三、随机指标(Stochastic Oscillator):公式:FASTK(N)=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100源码:N1:=(HIGH-LOW)/N;N2:=(REF(CLOSE,1)-LOW)/N;N3:=(HIGH-LOW)/N;N4:=EMA(CLOSE,N);STO:(N1+N2+N3)/(3*N4)*100;四、布林带指标(Bollinger Bands):公式:UPPER(N)=MA(CLOSE,N)+K*STD(CLOSE,N)LOWER(N)=MA(CLOSE,N)-K*STD(CLOSE,N)源码:LENGTH:=N;SET:ZQ1:=STD(CLOSE,LENGTH);SET:BH:=CLOSE+ZQ1;SET:BL:=CLOSE-ZQ1;BOLL:MA(CLOSE,LENGTH)+K*STD(CLOSE,LENGTH);BOLU:CLOSE+(LLV(LOW,N)-HHV(HIGH,N))*K;BOLD:CLOSE-(HHV(HIGH,N)-LLV(LOW,N))*K;五、主力轨迹指标(Main Power Track):公式:MPT(N)=SUM(VOL*((2*C-H-L)/(H-L)),N)/SUM(VOL*((H+L)/2),N)*100源码:MPT:=SUM(VOL*((2*CLOSE-HIGH-LOW)/(HIGH-LOW)),N)/SUM(VOL*((HIGH+LOW)/2),N)*100;以上是通达信指标公式的部分源码,其中包括动量指标、相对强弱指标、随机指标、布林带指标和主力轨迹指标的源代码。

通达信指标公式源码 天地趋势

通达信指标公式源码 天地趋势

DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'12',0);生命线:=MA(C,60);牛熊线:=MA(C,120);DRAWBAND(生命线,RGB(200,50,55),牛熊线,RGB(0,100,50)); DRAWKLINE(H,O,L,C);股价96:="Y395";增幅96:=XMA(XMA(XMA(股价96,3),3),3)-REF(XMA(XMA(XMA(股价96,3),3),3),1);X396:=XMA(股价96,3);J396:=(XMA(股价96,3)*3+0.5*股价96-0.5*REF(股价96,1)+增幅96)/3;Y396:IFF(CURRBARSCOUNT=1,J396,X396),LINETHICK2,COLORGREEN;IF(Y396>REF(Y396,1),Y396,DRAWNULL),COLORRED,LINETHICK2;高险区1:Y396*1.1,COLORLIRED,COLORFFFF00;高风区2:Y396*1.125,COLORLIRED,COLORFF0000;高风区3:Y396*1.15,COLORLIRED,COLOR00FF00;良机区1:Y396*0.9,COLORLIBLUE,COLOR00FFFF;良机区2:Y396*0.875,COLORLIBLUE,COLORFF00FF;良机区3:Y396*0.85,COLOR0000FF;WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;WSR2:=CROSS(WSR1,5);WSR3:=CROSS(8,WSR1);WSR4:=CROSS(WSR1,-5);WSR5:=CROSS(WSR1,-8);WSR6:=WSR3;WSR7:=WSR4 OR WSR5;WSR8:=WSR7 AND FILTER(WSR7,5);WSR10:DRAWICON(WSR8,L-0.01,1);WSR9:=WSR6 AND FILTER(WSR6,5);WSR11:DRAWICON(WSR9,H+0.01,2);WSR12:=O<良机区3;DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1); W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1); XG:=W1 OR W2;VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,10)/VAR1/7;VAR4:=DMA(VAR2,VOL/VAR3);VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);XG3:=XG AND XG1 AND L<良机区1;WSR13:=O>良机区3 AND L<良机区1 OR XG3;DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,23);WSR14:=H>高风区3;DRAWICON(WSR14 ANDFILTER(WSR14,15),H+0.03,19);WSR15:=H<高风区3 AND H>高风区2;DRAWICON(WSR15 ANDFILTER(WSR15,5),H+0.03,15);WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);WSR19:=(WSR16 + WSR17 + WSR18)/3;WSR20:=(C-MA(C,3))/MA(C,3);WSR21:=(C-MA(C,8))/MA(C,8);WSR22:=(C-MA(C,18))/MA(C,18);WSR23:=(WSR20 + WSR21 + WSR22)/3;WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);WSR28:=(WSR25 + WSR26 + WSR27)/3;WSR29:=(C-MA(C,6))/MA(C,6);WSR30:=(C-MA(C,12))/MA(C,12);WSR31:=(C-MA(C,24))/MA(C,24);WSR32:=(WSR29 + WSR30 + WSR31)/3;WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR37:=(WSR34 + WSR35 + WSR36)/3;WSR38:=(C-MA(C,13))/MA(C,13);WSR39:=(C-MA(C,34))/MA(C,34);WSR40:=(C-MA(C,55))/MA(C,55);WSR41:=(WSR38 + WSR39 + WSR40)/3;WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR46:=(WSR43 + WSR44 + WSR45)/3;WSR47:=(C-MA(C,30))/MA(C,30);WSR48:=(C-MA(C,60))/MA(C,60);WSR49:=(C-MA(C,90))/MA(C,90);WSR50:=(WSR47 + WSR48 + WSR49)/3;WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);WSR55:=(WSR52 + WSR53 + WSR54)/3;WSR56:=(C-MA(C,60))/MA(C,60);WSR57:=(C-MA(C,120))/MA(C,120);WSR58:=(C-MA(C,220))/MA(C,220);WSR59:=(WSR56 + WSR57 + WSR58)/3;WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60; DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3,'★'),COLOR00FFFF;DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3*0.97,'机'),COLOR00FFFF;时间之窗:=HHVBARS(ZIG(3,M)>REF(ZIG(3,M),1)AND REF(ZIG(3,M), 1)<REF(ZIG(3,M), 2),N);DRAWTEXT(时间之窗=2,L*0.94,'★3天'),COLORRED;DRAWTEXT(时间之窗=4,H*1.06,'★5天'),COLORGREEN;DRAWTEXT(时间之窗=7,L*0.94,'★8天'),COLORRED;DRAWTEXT(时间之窗=12,H*1.06,'★13天'),COLORGREEN;DRAWTEXT(时间之窗=20,L*0.94,'★21天'),COLORLIRED;DRAWTEXT(时间之窗=33,H*1.06,'★34天'),COLORLIGREEN;DRAWTEXT(时间之窗=54,L*0.94,'★55天'),COLORLIRED;{DRAWTEXT(时间之窗=88,H*1.06,'★89天'),COLORLIGREEN; DRAWTEXT(时间之窗=143,L*0.94,'★144天'),COLORLIRED;DRAWTEXT(时间之窗=232,H*1.06,'★233天'),COLORLIGREEN; DRAWTEXT(时间之窗=376,L*0.94,'★377天'),COLORLIRED;DRAWTEXT(时间之窗=609,H*1.06,'★610天'),COLORLIGREEN; }GET:=ZIG(3,3),COLORFFFFFF;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;V1:=(C+H+L)/3;MA3:=MA(V1,2);MA5:=MA(V1,5);DRAWBAND(MA2,RGB(200,50,55),MA5,RGB(0,100,50));遵:IF(MA2>=MA5,MA2,DRAWNULL),COLORRED;守:IF(MA5>=MA2,MA5,DRAWNULL),COLORFF9900;纪:IF(MA2>=MA5,MA5,DRAWNULL),COLOR00FFFF;律:IF(MA5>=MA2,MA2,DRAWNULL),COLOR00FF00; DRAWTEXT_FIX(1,0.0,0.00,0,EXTERNSTR(0,1))COLOR0077FF;。

通达信指标公式源码量学经典主图指标

通达信指标公式源码量学经典主图指标

{灯塔太极}TAIJI_A:=YEAR=2014 AND MONTH=11 AND DAY=24;TAIJI_B:=YEAR=2014 AND MONTH=11 AND DAY=27;TAIJI_C:=YEAR=2014 AND MONTH=7 AND DAY=22;TAIJI_D:=YEAR=2014 AND MONTH=8 AND DAY=29;DATA1:=YEAR=2014 AND MONTH=8 AND DAY=19;DATA2:=YEAR=2014 AND MONTH=8 AND DAY=22;DATA3:=YEAR=2014 AND MONTH=8 AND DAY=21;DATA4:=YEAR=2014 AND MONTH=8 AND DAY=20;O线:=DRAWLINE(DATA1,C,DATA4,REF(C,1),1),COLORMAGENTA,LINETHICK1; A线:=DRAWLINE(DATA1,C,DATA4,H,1),COLORMAGENTA,LINETHICK1;B线:=DRAWLINE(DATA1,C,DATA3,L,1),COLORMAGENTA,LINETHICK1;C线:=DRAWLINE(DATA1,C,DATA2,L,1),COLORMAGENTA,LINETHICK1;太极当值1:=DRAWLINE(TAIJI_A,C,TAIJI_B,L,3),COLORRED,LINETHICK2;太极当值2:=DRAWLINE(TAIJI_C,O,TAIJI_D,O,3),COLORRED,LINETHICK2;明日太极当值1:=太极当值1+(太极当值1-REF(太极当值1,1)),NODRAW,COLORWHITE;明日太极当值2:=太极当值2+(太极当值2-REF(太极当值2,1)),NODRAW,COLORWHITE;{---------------------------------------------------------------------------};所属板块:=STRCAT('所属板块:',STRCAT(STRCAT(STRCAT(' 【行业】:',HYBLOCK),STRCAT(' 【地域】:',DYBLOCK)),STRCAT(' 【概念】:',GNBLOCK))); DRAWTEXT_FIX(O>0,0.005,0.00,0,所属板块);均价:AMOUNT/VOL/100,NODRAW,COLOR00FF00;涨停:=(C+0.005-REF(C,1))/REF(C,1)*100>=10;STICKLINE(涨停=1,O,C,3,0),COLORMAGENTA;向上跳空:=MIN(C,O)>REF(MAX(C,O),1);明日涨停参考:C*1.1,NODRAW,COLORYELLOW; STICKLINE(向上跳空=1,O,C,0.4,0),COLORYELLOW;虚三一:MAX(H,L)-(H-L)/3,NODRAW,COLORFFFFFF;虚二一:(L+H)/2,NODRAW,COLORFFFFFF;虚三二:MIN(H,L)+(H-L)/3,NODRAW,COLORFFFFFF;三一:MAX(O,C)-ABS(O-C)/3,NODRAW,COLOR00FFFF;二一:(O+C)/2,NODRAW,COLOR00FFFF;三二:MIN(O,C)+ABS(O-C)/3,NODRAW,COLOR00FFFF;AA11:=MAX(O,C)<(REFXV(C,1)+REFXV(C,2)+REFXV(C,3))/3;高于实顶:IF(AA11,1,0),COLORFFFFFF,NODRAW;收阴:=O>C AND (O-C)/O>0.04;收阳:=O<C AND (C-O)/O>0.04;实体大于4%:=IF(O>C,收阴,收阳);STICKLINE(实体大于4%,二一,二一,2,0),COLORGRAY;。

量价分析通达信指标公式源码

量价分析通达信指标公式源码

量价分析通达信指标公式源码引言
本文档提供了量价分析指标在通达信软件中的源代码。

通过这
些代码,用户可以在通达信软件中使用量价分析指标进行技术分析。

简介
通达信软件是一款常用于股票行情分析的软件。

它提供了一系
列内置的技术指标,包括量价分析指标。

量价分析指标可以用来分
析交易量和价格之间的关系,从而帮助用户研判股票的走势。

通达信量价分析指标源码
源码示例1: 量比指标
量比指标是一种用于衡量股票成交量相对于其平均水平的指标。

通达信软件中的量比指标源码示例如下:
公式A:(C / MA(C, [日均交易天数], 1))/[5日平均换手率]]
解释:其中C代表当天收盘价,MA代表移动平均线,[日均
交易天数]是计算移动平均线时的天数,[5日平均换手率]是计算5
日平均换手率。

源码示例2: 量缩比指标
量缩比指标是一种用于衡量股票成交量在变动过程中的幅度和
速度的指标。

通达信软件中的量缩比指标源码示例如下:公式B: NVIC [(I1 x HG) / (LG x D)]
解释:其中I1代表今天的成交量,HG代表最高价减去开盘价,LG代表开盘价减去最低价,D代表最高价减去最低价。

结论
本文档提供了两个量价分析指标的通达信源码示例,包括量比指标和量缩比指标。

用户可以根据这些源码,在通达信软件中运行量价分析指标进行股票技术分析。

请注意,本文档中的源码示例仅供参考,具体使用时需要根据实际情况进行调整和优化。

同时,请确保使用合法的数据和正确的计算方法,以得到准确的分析结果。

生命线指标-通达信-带均量(1)

生命线指标-通达信-带均量(1)

生命线指标(通达信)VoLUME:VOL,VOLSTICK;降:COUNT(CLOSE>REF(CLOSE,1),2)=2 AND COUNT(VOLVREF(VOL,1),2)=2;BLZ:=VOL>REF(V,1)*1.9;BLZ1:=VOLVREF(LLV(VOL,13),1);BLZ2:=VOLVREF(LLV(VOL,55),1);STICKLINE(BLZ,0,V,1,0),COLORYELLOW;倍量柱:BLZ,COLORYELLOW;STICKLINE(倍量柱,O,V,3,O),COLORYELLOW;DRAWTEX倍量柱,VOL+3OOO,'倍'),COLORYELLOW;HJZ:=(3*C+H+L+O)/6;HJZ2:=(8*HJZ+7*REF(HJ Z, 1)+6*REF(HJ Z, 2)+5*REF(HJ Z, 3)+4*REF(HJ Z,4)+3*REF(HJ Z,5)+2*REF(HJ Z,6)+REF(HJ Z, 8))/36;HJZ3:=VOL=HHV(VOL,1O) AND VOL〉2*REF(VOL,1) AND CLOSE〉HJZ2 AND C〉O;生命线:FlLTER(HJZ3,5),STICK,COLORRED;STICKLINE(生命线,O,V,3,O),COLORRED;DRAWTEX生命线,VOL+1OOOO,' '),COLORRED;倍缩量:VOL∕REF(VOL,1)〈O.5,COLORBLUE;STICKLINE(倍缩量,O,V,3,O),COLORBLUE;T:=DYNAINFO(8)>O;VO:=VOL=LLV(VOL,1OO) AND T;地量柱:T AND VO,COLORMAGENTA;STICKLINE(地量柱,O,V,3,O),COLORMAGENTA;DRAWTEX地量柱,VOL+3OOO,’地'),COLORMAGENTA;MA1:MA(VOL,M1);MA2:MA(VOL,M2);MA3:MA(VOL,M3);1、找到软件的功能—公式系统-------------- 公式管理器(快捷键CTRL+F,出现如下图2、点击技术指标公式------ 新建功能,如下图复制上面的指标代码黏贴到空白处,然后点确定就可以了SMI I 厂密码保护厶館务輕式⅛⅛型其他类型 脸■式版本α埜式描述 WI —4 ∣⅛⅛⅛-ε I 蚤粗-IP I ⅛⅛⅛i3-t61 V 画娃方迭副图昱示小披-硯省 1 23 Γ最小 自动 「额外丫轴分弄值1 洞辑損作扌融国数扌臥熒爛引入∙⅛式测试公式 LZ: =uυL 〉WtHU τl J *7 .V ;ILZI ∑—∪□L〈RΓΓ(LLU (UOL ,1∏) ,1);LzZ I —UDUREF (LLU (IIOL 9ES] ,1); JICKLIt E (BLZ l .叭 p 0), COLOR V ELLOW ; 咅量柱:BLZ t COLORVELI QU ;:T[CKLIH 匚(宿童农* J U f ,H)。

量价时空生命线通达信指标公式源码

量价时空生命线通达信指标公式源码

“量价时空” 是进阶高手必备的知识,而生命线指标也是掌握量价时空的重要工具指标。

指标在传统VOL基础上,加上地量柱,倍量柱,生命线和倍缩量。

让大家一目了然!生命线指标源码如下:VOLUME:VOL,VOLSTICK;降:COUNT(CLOSE>REF(CLOSE,1),2)=2 AND COUNT(VOL<REF(VOL,1),2)=2;T:=DYNAINFO(8)>0;VO:VOL=LLV(VOL,100) AND T;地量柱:T AND VO,COLORMAGENTA;STICKLINE(地量柱,0,V,3,0),COLORMAGENTA;DRAWTEXT(地量柱,VOL+3000,'地'),COLORMAGENTA;BLZ:=VOL>REF(V,1)*1.9;BLZ1:=VOL<REF(LLV(VOL,13),1);BLZ2:=VOL<REF(LLV(VOL,55),1);STICKLINE(BLZ,0,V,1,0),COLORYELLOW;倍量柱:BLZ,COLORYELLOW;STICKLINE(倍量柱,0,V,3,0),COLORYELLOW;DRAWTEXT(倍量柱,VOL+3000,'倍'),COLORYELLOW;HJZ:=(3*C+H+L+O)/6;HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ, 5)+2*REF(HJZ,6)+REF(HJZ,8))/36;HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;生命线:FILTER(HJZ3,5),STICK,COLORRED;STICKLINE(生命线,0,V,3,0),COLORRED;DRAWTEXT(生命线,VOL+10000,' '),COLORRED;倍缩量:VOL/REF(VOL,1)<0.5,COLORBLUE;STICKLINE(倍缩量,0,V,3,0),COLORBLUE;。

时空模式通达信指标公式源码

时空模式通达信指标公式源码

HH:=HHV(H,120);LL:=LLV(L,120);上涨:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L==LL)+1)),NODRAW,COLOR0000FF; 下跌:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H==HH)+1)),NODRAW,COLOR00FF00; ↑空间%:=(C/REF(L,上涨)-1)*100,NODRAW,COLOR00FFFF;最高%:=(HH/REF(L,上涨)-1)*100,NODRAW,COLORFF00FF;↓空间%:=(C/REF(H,下跌)-1)*100,NODRAW,COLOR888899;最低%:=(LL/REF(H,下跌)-1)*100,NODRAW,COLORFF0000;判断:=下跌OR 上涨OR 上涨==0 OR 下跌==0;天线:=IFF(判断,REFDATE(REF(H,下跌),DATE),DRAWNULL),POINTDOT,LINETHICK3,COLOR00FF00;地线:=IFF(判断,REFDATE(REF(L,上涨),DATE),DRAWNULL),POINTDOT,LINETHICK3,COLOR0000FF;中线:=IFF(判断,REFDATE((天线-地线)*0.5+地线,DATE),DRAWNULL),POINTDOT,LINETHICK3,COLORWHITE;低吸:=IFF(判断,REFDATE((天线-地线)*0.191+地线,DATE),DRAWNULL),POINTDOT,LINETHICK3,COLOR0066FF;关注:=IFF(判断,REFDATE((天线-地线)*0.382+地线,DATE),DRAWNULL),POINTDOT,LINETHICK3,COLOR00CCFF;警示:=IFF(判断,REFDATE((天线-地线)*0.618+地线,DATE),DRAWNULL),POINTDOT,LINETHICK3,COLORCCFF00;风险:=IFF(判断,REFDATE((天线-地线)*0.809+地线,DATE),DRAWNULL),POINTDOT,LINETHICK3,COLOR66FF00; STICKLINE(1,地线,地线+(中线-地线)*(20/20),12,0),COLOR000000; STICKLINE(1,地线,地线+(中线-地线)*(19/20),12,0),COLOR000008; STICKLINE(1,地线,地线+(中线-地线)*(18/20),12,0),COLOR000010; STICKLINE(1,地线,地线+(中线-地线)*(17/20),12,0),COLOR000018; STICKLINE(1,地线,地线+(中线-地线)*(16/20),12,0),COLOR000020; STICKLINE(1,地线,地线+(中线-地线)*(15/20),12,0),COLOR000028; STICKLINE(1,地线,地线+(中线-地线)*(14/20),12,0),COLOR000030; STICKLINE(1,地线,地线+(中线-地线)*(13/20),12,0),COLOR000038; STICKLINE(1,地线,地线+(中线-地线)*(12/20),12,0),COLOR000040; STICKLINE(1,地线,地线+(中线-地线)*(11/20),12,0),COLOR000048; STICKLINE(1,地线,地线+(中线-地线)*(10/20),12,0),COLOR000050; STICKLINE(1,地线,地线+(中线-地线)*(9/20),12,0),COLOR000058; STICKLINE(1,地线,地线+(中线-地线)*(8/20),12,0),COLOR000060; STICKLINE(1,地线,地线+(中线-地线)*(7/20),12,0),COLOR000068; STICKLINE(1,地线,地线+(中线-地线)*(6/20),12,0),COLOR000070; STICKLINE(1,地线,地线+(中线-地线)*(5/20),12,0),COLOR000078; STICKLINE(1,地线,地线+(中线-地线)*(4/20),12,0),COLOR000080; STICKLINE(1,地线,地线+(中线-地线)*(3/20),12,0),COLOR000088; STICKLINE(1,地线,地线+(中线-地线)*(2/20),12,0),COLOR000090; STICKLINE(1,地线,地线+(中线-地线)*(1/20),12,0),COLOR000098; STICKLINE(1,天线,天线-(天线-中线)*(20/20),12,0),COLOR000000; STICKLINE(1,天线,天线-(天线-中线)*(19/20),12,0),COLOR080800; STICKLINE(1,天线,天线-(天线-中线)*(18/20),12,0),COLOR101000; STICKLINE(1,天线,天线-(天线-中线)*(17/20),12,0),COLOR181800; STICKLINE(1,天线,天线-(天线-中线)*(16/20),12,0),COLOR202000; STICKLINE(1,天线,天线-(天线-中线)*(15/20),12,0),COLOR282800; STICKLINE(1,天线,天线-(天线-中线)*(14/20),12,0),COLOR303000; STICKLINE(1,天线,天线-(天线-中线)*(13/20),12,0),COLOR383800; STICKLINE(1,天线,天线-(天线-中线)*(12/20),12,0),COLOR404000; STICKLINE(1,天线,天线-(天线-中线)*(11/20),12,0),COLOR484800; STICKLINE(1,天线,天线-(天线-中线)*(10/20),12,0),COLOR505000; STICKLINE(1,天线,天线-(天线-中线)*(9/20),12,0),COLOR585800; STICKLINE(1,天线,天线-(天线-中线)*(8/20),12,0),COLOR606000; STICKLINE(1,天线,天线-(天线-中线)*(7/20),12,0),COLOR686800; STICKLINE(1,天线,天线-(天线-中线)*(6/20),12,0),COLOR707000; STICKLINE(1,天线,天线-(天线-中线)*(5/20),12,0),COLOR787800; STICKLINE(1,天线,天线-(天线-中线)*(4/20),12,0),COLOR808000; STICKLINE(1,天线,天线-(天线-中线)*(3/20),12,0),COLOR888800; STICKLINE(1,天线,天线-(天线-中线)*(2/20),12,0),COLOR909000; STICKLINE(1,天线,天线-(天线-中线)*(1/20),12,0),COLOR989800; STICKLINE(判断,天线,天线*1.003,20,0),COLOR00C6FF; STICKLINE(判断,地线,地线*0.997,20,0),COLOR00C6FF;外框定位:=FILTER(BACKSET(ISLASTBAR,30),30);STICKLINE(外框定位,天线,地线,2,0),COLOR00C6FF;STICKLINE(BACKSET(外框定位,8),风险*1.001,风险*0.999,12,0),COLOR00C6FF; STICKLINE(BACKSET(外框定位,8),低吸*1.001,低吸*0.999,12,0),COLOR00C6FF; STICKLINE(BACKSET(外框定位,8),关注*1.001,关注*0.999,12,0),COLOR00C6FF; STICKLINE(BACKSET(外框定位,8),警示*1.001,警示*0.999,12,0),COLOR00C6FF; STICKLINE(BACKSET(外框定位,1),中线*1.001,中线*0.999,12,0),COLOR00C6FF; STICKLINE(EXIST(外框定位,20),风险*1.001,风险*0.999,12,0),COLOR00C6FF; STICKLINE(EXIST(外框定位,20),低吸*1.001,低吸*0.999,12,0),COLOR00C6FF; STICKLINE(EXIST(外框定位,10),关注*1.001,关注*0.999,12,0),COLOR00C6FF; STICKLINE(EXIST(外框定位,10),警示*1.001,警示*0.999,12,0),COLOR00C6FF; STICKLINE(EXIST(外框定位,5),中线*1.001,中线*0.999,12,0),COLOR00C6FF; STICKLINE(判断AND CLOSE>OPEN,HIGH,CLOSE,0,0),COLORRED;STICKLINE(判断AND CLOSE>OPEN,LOW,OPEN,0,0),COLORRED;STICKLINE(判断AND CLOSE>OPEN,CLOSE,OPEN,2,1),COLORRED;STICKLINE(判断AND CLOSE==OPEN,HIGH,LOW,0,0),COLORWHITE;STICKLINE(判断AND CLOSE==OPEN,CLOSE,OPEN,2,0),COLORWHITE; STICKLINE(判断AND CLOSE<OPEN,HIGH,LOW,0,0),COLORGREEN;STICKLINE(判断AND CLOSE<OPEN,CLOSE,OPEN,2,0),COLORGREEN;MID_DX:=(3*C+L+H)/5;乾坤线:WMA(MID_DX,20),COLOR00C6FF;STICKLINE(上涨==0,天线,天线-0.90*(天线-H),0,0),COLORRED;STICKLINE(下跌==0,地线,地线+0.90*(L-地线),0,0),COLORGREEN;STICKLINE(上涨==0,H,L,0,0),COLORRED;STICKLINE(上涨==0,C,O,3,0),COLORRED;STICKLINE(下跌==0,H,L,0,0),COLORCYAN;STICKLINE(下跌==0,C,O,3,0),COLORCYAN;绘图判断:=FILTER(BACKSET(ISLASTBAR,27),27);判2:=FILTER(BACKSET(ISLASTBAR,33),33);DRAWTEXT(判2,天线,'风险区'),COLORWHITE;DRAWTEXT(判2,风险,'警戒区'),COLORWHITE;DRAWTEXT(判2,关注+(警示-关注)*0.8,'观察区'),COLORWHITE;DRAWTEXT(判2,关注,'关注区'),COLORWHITE;DRAWTEXT(判2,低吸,'低吸区'),COLORWHITE;TRAND:=IFF(REF(乾坤线,1)>REF(乾坤线,2),1,0);TRAND1:=REF(CLOSE,1)>=REF(地线,1) AND REF(CLOSE,1)<REF(低吸,1),NODRAW; TRAND2:=REF(CLOSE,1)>=REF(低吸,1) AND REF(CLOSE,1)<REF(关注,1),NODRAW; TRAND3:=REF(CLOSE,1)>=REF(关注,1) AND REF(CLOSE,1)<REF(中线,1),NODRAW; TRAND4:=REF(CLOSE,1)>=REF(中线,1) AND REF(CLOSE,1)<REF(警示,1),NODRAW; TRAND5:=REF(CLOSE,1)>=REF(警示,1) AND REF(CLOSE,1)<REF(风险,1),NODRAW; TRAND6:=REF(CLOSE,1)>=REF(风险,1) AND REF(CLOSE,1)<REF(天线,1),NODRAW; TEMP:=IFF(TRAND4 AND TRAND==0,中线,IFF(TRAND4 AND TRAND==1,警示,IFF(TRAND5 AND TRAND==0,警示,IFF(TRAND5 AND TRAND==1,风险,IFF(TRAND6 AND TRAND==0,风险,IFF(TRAND6 AND TRAND==1,天线,DRAWNULL))))));今日目标:=IFF(TRAND1 AND TRAND==0,地线,IFF(TRAND1 AND TRAND==1,低吸,IFF(TRAND2 AND TRAND==0,低吸,IFF(TRAND2 AND TRAND==1,关注,IFF(TRAND3 AND TRAND==0,关注,IFF(TRAND3 AND TRAND==1,中线,TEMP)))))),NODRAW,COLOR1C6CC6;顶:天线,NODRAW,COLOR00FF00;险:风险,POINTDOT,COLOR66FF00;预:警示,POINTDOT,COLORCCFF00;中:中线,POINTDOT,COLORWHITE;注:关注,POINTDOT,COLOR00CCFF;低:低吸,POINTDOT,COLOR0066FF;底:地线,NODRAW,COLOR0000FF;DRAWTEXT_FIX(1,0,0.05,0,'【1.乾坤线:乾坤线向上,代表短期价格上升趋势;乾坤线向下,代表短期价格下跌趋势】'),COLORLIGRAY;DRAWTEXT_FIX(1,0,0.1 ,0,'【2.红色立体K线所在位置为阶段最低点】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.15,0,'【3.蓝色立体K线所在位置为阶段最高点】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.20,0,'【4.风险区:适宜谨慎,随时高抛】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.25,0,'【5.警戒区:注意风险,逢高卖出】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.30,0,'【6.观察区:多空不明,建议观望;】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.35,0,'【7.关注区:风险降低,逢低吸纳】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.40,0,'【8.低吸区:价格洼地,随时抄底】'),COLORLIGRAY; DRAWTEXT_FIX(1,0,0.45,0,'【9.乾坤线落在某一区域内时,该线所指向的最近一条参考线为短期目标位】'),COLORLIGRAY;。

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

“量价时空” 是进阶高手必备的知识,而生命线指标也是掌握量价时空的重要工具指标。

指标在传统VOL基础上,加上地量柱,倍量柱,生命线和倍缩量。

让大家一目了然!
生命线指标源码如下:
VOLUME:VOL,VOLSTICK;
降:COUNT(CLOSE>REF(CLOSE,1),2)=2 AND COUNT(VOL<REF(VOL,1),2)=2;
T:=DYNAINFO(8)>0;
VO:VOL=LLV(VOL,100) AND T;
地量柱:T AND VO,COLORMAGENTA;
STICKLINE(地量柱,0,V,3,0),COLORMAGENTA;
DRAWTEXT(地量柱,VOL+3000,'地'),COLORMAGENTA;
BLZ:=VOL>REF(V,1)*1.9;
BLZ1:=VOL<REF(LLV(VOL,13),1);
BLZ2:=VOL<REF(LLV(VOL,55),1);
STICKLINE(BLZ,0,V,1,0),COLORYELLOW;
倍量柱:BLZ,COLORYELLOW;
STICKLINE(倍量柱,0,V,3,0),COLORYELLOW;
DRAWTEXT(倍量柱,VOL+3000,'倍'),COLORYELLOW;
HJZ:=(3*C+H+L+O)/6;
HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ, 5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;
生命线:FILTER(HJZ3,5),STICK,COLORRED;
STICKLINE(生命线,0,V,3,0),COLORRED;
DRAWTEXT(生命线,VOL+10000,' '),COLORRED;
倍缩量:VOL/REF(VOL,1)<0.5,COLORBLUE;
STICKLINE(倍缩量,0,V,3,0),COLORBLUE;。

相关文档
最新文档