小牛买卖波段 通达信指标公式源码
通达信指标公式源码超准超准的买卖指标
通达信指标公式源码超准超准的买卖指标通达信是国内股市行情软件中比较常用的一个,其中包含了很多常用的指标,包括MACD、RSI、KDJ等等。
下面列举几个常用的指标的源码:1.MACD指标:其中包含了两个变量:参数快线天数和参数慢线天数。
```MA1:=(CLOSE-REF(CLOSE,参数快线天数))/(参数快线天数-1);DIF:=(CLOSE-REF(CLOSE,参数慢线天数))/(参数慢线天数-1);DEA:EMA(DIF,参数横坐标);MACD:(REF(DIF-DEA,1)*2));```2.RSI指标:参数N代表计算RSI的周期。
```LC:=REF(CLOSE,1);AA:=CLOSE-LC;AVG1:=SMA(IF(AA>0,AA,0),参数N,1);AVG2:=SMA(IF(AA<0,-AA,0),参数N,1);RSI:100-100/(1+AVG1/AVG2);```3.KDJ指标:参数N代表计算KDJ的周期,参数M1和参数M2分别代表K线的移动平均线的周期。
```LC:=REF(CLOSE,1);HD:=HHV(HIGH,参数N);LD:=LLV(LOW,参数N);RSV:=(CLOSE-LD)*100/(HD-LD);K:SMA(RSV,参数M1,1);D:SMA(K,参数M2,1);J:3*K-2*D;```以上是部分常用指标的源码,其中还有很多其他指标的源码未一一列举。
这些指标的使用可以帮助投资者进行技术分析,辅助股票的买卖决策。
但需要注意的是,指标仅仅是辅助工具,不能单独作为投资的决策依据,投资者在使用指标的同时,还需要结合其他的市场因素进行综合分析。
波段买卖分析(主图 指标) 通达信指标公式源码
波段买卖分析(主图指标)说明,含未来函数,不加密,不选股,持股分析参考。
MB1:=EMA(WINNER(C)*100,5);MB2:=EMA(MB1,2);MB3:=EMA(MB2,2);MB4:=EMA(MB3,2);N:=5;VAR2:=MB1;VAR3:=DRAWLINE(VAR2>=HHV(VAR2,N)=1,VAR2,VAR2<=LLV(VAR2,N)=1,VAR2,0); 顶:=IF(VAR2=VAR3,VAR2,DRAWNULL);XG:=REF(VAR2,1)=REF(VAR3,1) AND VAR2>REF(VAR2,1);买入条件:=TFILTER(XG,顶,1);卖出条件:=TFILTER(顶,XG,0);买入价:=IF(买入条件,C,DRAWNULL);卖出价:=IF(卖出条件,C,DRAWNULL);DRAWICON(买入条件,L*0.98,1);DRAWICON(卖出条件,H*1.02,2);DRAWNUMBER(买入条件,L*0.96,买入价),COLORRED;DRAWNUMBER(卖出条件,H*1.04,卖出价),COLORGREEN;DRAWNUMBER(卖出条件,H*1.06,(C/REF(C,BARSLAST(买入条件))-1)*100),COLORYELLOW;成交收益:=IF(卖出条件,(C/REF(C,BARSLAST(买入条件))-1)*100*0.994,DRAWNULL); 年收益:=SUM(成交收益,250);年成交数:=IF(ISLASTBAR,SUM(卖出条件,250),DRAWNULL);DRAWTEXT_FIX(ISLASTBAR,0.00,0.00,0,STRCAT('年交易次数: ',CON2STR(年成交数,0))),COLORLIRED;DRAWTEXT_FIX(ISLASTBAR,0.00,0.05,0,STRCAT('年交易收益: ',CON2STR(年收益,2))),COLORLIRED;DRAWTEXT_FIX(说明=1,0.00,0.10,0,'红箭头是买入信号,红数字是买入参考价'),COLORRED;DRAWTEXT_FIX(说明=1,0.00,0.15,0,'绿箭头是卖出信号,绿数字是卖出参考价'),COLORGREEN;DRAWTEXT_FIX(说明=1,0.00,0.20,0,'黄色数字是盈亏百分比'),COLORYELLOW;。
波段王 通达信指标公式源码
益盟主图MA10:MA(CLOSE,10),LINETHICK1,COLORYELLOW;MA20:MA(CLOSE,20),LINETHICK1,COLORMAGENTA;MA62:MA(CLOSE,62),LINETHICK1,COLORGREEN;{VAR444:=C;操作:=MA(VAR444,5);生命线:HHV(操作,13),LINETHICK2,COLORYELLOW;收盘破此线短逃}愚公:IF(1>10,HIGH*1.03,DRAWNULL),POINTDOT,LINETHICK9,COLORYELLOW; 买线:=EMA(C,4);卖线:=EMA(SLOPE(C,20)*10+C,35);DRAWICON(CROSS(买线,卖线),LOW*0.98,7);DRAWICON(CROSS(卖线,买线),HIGH*1.02,8);STICKLINE(买线>=卖线,LOW,HIGH,0,0),COLORLIRED;STICKLINE(买线>=卖线,CLOSE,OPEN,3,2),COLORLIRED;STICKLINE(买线<卖线,LOW,HIGH,0,0),COLORCYAN;STICKLINE(买线<卖线,CLOSE,OPEN,3,2),COLORCYAN;STICKLINE(OPEN>CLOSE,CLOSE,OPEN,2.5,0),COLORCYAN;涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;DRAWTEXT(涨停,L-0.1,'涨停'),COLORRED;C3:=REF(C,1);跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,4,0),COLORBLUE;STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;波段王VAR1:=(CLOSE+HIGH+LOW+OPEN)/4;VAR2:=SUMBARS(VOL,CAPITAL);VAR3:=HHV(VAR1,VAR2);VAR4:=LLV(VAR1,VAR2);VAR5:=(2*VAR1-VAR4-REF(VAR4,1))/(VAR3-VAR4);VAR6:=(VAR1-VAR4)/(VAR3-VAR4);VAR7:=IF(VAR1<=VAR4,VAR5*60,VAR6*60);VAR8:=600*(EMA(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30);VAR9:=EMA(VAR8,7);VARA:=(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))*100; VARB:=(-100)*(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))+5; VARC:=HHV(HIGH,9)-LLV(LOW,9);VARD:=HHV(HIGH,9)-CLOSE;VARE:=CLOSE-LLV(LOW,9);VARF:=VARD/VARC*100-70;VAR10:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100; VAR11:=(2*CLOSE+HIGH+LOW)/4;VAR12:=SMA(VARE/VARC*100,3,1);VAR13:=LLV(LOW,34);VAR14:=SMA(VAR12,3,1)-SMA(VARF,9,1);VAR15:=IF(VAR14>100,VAR14-100,0);VAR16:=HHV(HIGH,34);VAR17:=EMA((VAR11-VAR13)/(VAR16-VAR13)*100,8);VAR18:=EMA(VAR17,5);STICKLINE(VAR17-VAR18>0,VAR17,VAR18,8,1), ,COLORRED ; STICKLINE(VAR17-VAR18<0,VAR17,VAR18,8,1), ,COLORGREEN ;。
波段买卖通达信指标公式源码
共享一个实战指标:波段买卖,交易成功率90%以上,主抓上升大波段,无未来!随机翻阅个股进行测试,如图1,图2,图3特意找寻了一支下跌趋势中的个股,信号准确率依旧很高,基本能抓住主升波段赢利20%-100%,偶尔买入后无赢利也是在1-5%以内的止损;大赚而小亏,实战性很强!O1:(SUM(EMA((CLOSE+LOW)/2,1)/3,3)),COLOR00FFFF,LINETHICK1;O2:EMA(O1,3),COLORFF00FF,LINETHICK1;O3:EMA(O2,3),COLOR00FF00,LINETHICK1;MMM:=MA(CLOSE,20);DRAWTEXT((CLOSE<MMM),MMM,'*'),COLOR00FF00,LINETHICK5;DRAWTEXT((CLOSE>MMM),MMM,'*'),COLOR0000FF,LINETHICK5;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(VAR9,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); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3.2,0),COLORFF3300; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2.7,0),COLORFF5500;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2.1,0),COLORFF7700; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),1.5,0),COLORFF9900; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0.9,0),COLORFFBB00; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0.3,0),COLORFFDD00; DRAWTEXT(FILTER(VAR19=1,5),LOW,' 买入'),COLORFF00FF;DRAWICON(FILTER(VAR19=1,5),LOW,9);DRAWTEXT(FILTER(VAR1A=1,5),HIGH,' 卖出'),COLOR00FF00;DRAWICON(FILTER(VAR1A=1,5),HIGH,15);。
通达信指标公式源码 精准波段买卖副图指标
Z1:=STRCAT('【',STRCAT(CODE,STKNAME));Z2:=STRCAT(' 行业:',HYBLOCK);Z3:=STRCAT(' 地域:',DYBLOCK);Z4:=STRCAT(STRCAT(' 概念:',GNBLOCK),'】');Z5:=STRCAT(Z1,Z2);Z6:=STRCAT(Z3,Z4);Z7:=STRCAT(Z5,Z6);DRAWTEXT_FIX(1,0,0.0,0,Z7),COLOR00EEEE;DRAWTEXT_FIX(1,0,0.06,0,STRCAT('【风格:',STRCAT(FGBLOCK,'】'))),COLOREEEE00; 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);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA; S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,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;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;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;STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;DRAWTEXT(CROSS(EMA(CLOSE,2),EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),(LOW*0.99),'加点仓准备吃肉'),LINETHICK3,COLORF00FF0;DRAWTEXT(CROSS(EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42),EMA(CLOSE,2)),(HIGH* 1.01),'↓猪八戒背媳妇跑'),LINETHICK3,COLORFFFFFF;STICKLINE((EMA(CLOSE,2) >=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),LOW,HIGH,0.1,0),COLOR0000FF; STICKLINE((EMA(CLOSE,2)>=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),CLOSE,OPEN,3,0),COLOR0000AA; STICKLINE((EMA(CLOSE,2)>=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),CLOSE,OPEN,2,0),COLOR0000CC; STICKLINE((EMA(CLOSE,2)<EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),CLOSE,OPEN,2,0),COLORCCCC00; STICKLINE((EMA(CLOSE,2)<EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),CLOSE,OPEN,3,0),COLORAAAA00; STICKLINE((EMA(CLOSE,2)<EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42)),LOW,HIGH,0.1,0),COLORFFFF00; STICKLINE((CROSS(EMA(CLOSE,2),EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42))ORCROSS(EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42),EMA(CLOSE,2))),LOW,HIGH,0.1,0),COLOR00FFFF;STICKLINE((CROSS(EMA(CLOSE,2),EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42))ORCROSS(EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42),EMA(CLOSE,2))),OPEN,CLOSE,3,0),CO LOR00AAAA;STICKLINE((CROSS(EMA(CLOSE,2),EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42))ORCROSS(EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42),EMA(CLOSE,2))),OPEN,CLOSE,2,0),CO LOR00CCCC;MAA5:MA(C,5),COLORFF00FF,LINETHICK5;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;。
通达信指标公式源码 波段抄底
DRAWGBK(O>C,RGB(0,78,188),RGB(255,158,255),0,'01',0); {买卖决策}TYP:=(H+L+C)/3;LC:=REF(C,1);{NO.1}VAR001:=(TYP-MA(TYP,15))/(0.016*AVEDEV(TYP,15));VAR002:=SMA(MAX(C-LC,0),6,1)/SMA(ABS(C-LC),6,1)*100;B001:=IF(CROSS(VAR001,-150),1,0);S001:=IF(CROSS(80,VAR002),1,0);{NO.2}VAR003:=EMA(100*(C-LLV(L,31))/(HHV(H,31)-LLV(L,31)),3)/4; B002:=IF(VAR003<1,1,0);S002:=IF(VAR003>23,1,0);{NO.3}VAR004:=(C-LLV(L,18))/(HHV(H,18)-LLV(L,18))*100;VAR005:=EMA(VAR004,3);VAR006:=EMA(VAR005,3);VAR007:=(3*VAR005-2*VAR006);VAR008:=REF(COUNT(VAR007<REF(VAR007,1),5)>=3,1) AND REF(VAR007,1)<20;VAR009:=VAR007>REF(VAR007,1);B003:=IF(FILTER(VAR008 AND VAR009,3),1,0);{NO.4}VAR010:=AMOUNT/VOL/1000;VAR011:=(3*H+L+O+2*C)/7;VAR012:=SUM(AMOUNT,13)/VAR010/1000;VAR013:=DMA(VAR011,VOL/VAR012);VAR014:=(CLOSE-VAR013)/VAR013*1000;B004:=IF(CROSS(VAR014,-166),1,0);B005:=IF(CROSS(VAR014,-120),1,0);B006:=IF(CROSS(VAR014,-88),1,0);{NO.5}VAR015:=(TYP-MA(TYP,15))/(0.015*AVEDEV(TYP,15));VAR016:=(TYP-MA(TYP,70))/(0.015*AVEDEV(TYP,70));VAR017:=IF(VAR015>=150 AND VAR015<200 AND VAR016>=150 AND VAR016<200,100,0);VAR018:=0-IF(VAR016>=200,200,VAR017)+400;S003:=IF(VAR018=300,1,0);{NO.6}VAR019:=DMA((3*H+L+O+2*C)/7,VOL/(SUM(AMOUNT,13)/(AMOUNT/VOL/1 000)/1000));B007:=IF(CROSS((C-VAR019)/VAR019*1000,-166),1,0);{NO.7}VAR020:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;VAR021:=SMA(VAR020,2,1);B008:=IF(VAR021<10,1,0);{NO.8}VAR022:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),5)/SUM(IF(TYP<REF(TYP,1), TYP*VOL,0),5);MFI:=IF(CROSS(100-(100/(1+VAR022)),20),1,0);RSI:=SMA(MAX(C-LC,0),5,1)/SMA(ABS(C-LC),5,1)*100;B009:=IF(MFI,1,0);B010:=IF(CROSS(RSI,20),1,0);{NO.9}VAR023:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1 ));VAR024:=REF(C,VAR023+1)>C ANDREF("RSI.RSI1"(6,12,24),VAR023+1)<"RSI.RSI1"(6,12,24) ANDCROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));VAR025:=IF(VAR024>0,1,0);B011:=IF(VAR025,1,0);{NO.10}VAR026:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));VAR027:=(TYP-MA(TYP,70))/(0.015*AVEDEV(TYP,70));VAR028:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR029:=100-ABS(VAR028);VAR030:=IF(BARSCOUNT(C)<13,100,IF(VAR029<88 AND VAR028>0,1,0)); VAR031:=IF(BARSCOUNT(C)<13,-100,0-IF(VAR029<92 AND VAR028<0,1,0)); VAR032:=IF(BARSCOUNT(C)<70,1,IF(VAR027>=200 ANDVAR026>=150,1,0));B012:=IF(VAR031,1,0);S004:=IF(VAR030,1,0);S005:=IF(VAR032,1,0);{NO.11}VAR033:=SMA(MAX(C-LC,0),4.1,1)/SMA(ABS(C-LC),4.1,1)*100;VAR034:=3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA ((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1);B013:=IF(CROSS(VAR033,11)*80,1,0);B014:=IF(CROSS(VAR034,3),1,0);B015:=IF(VAR034<=3,1,0);B016:=IF(VAR034<5,1,0);B017:=IF(VAR034<7,1,0);{NO.12}VAR035:=AMOUNT/VOL;VAR036:=L<VAR035*0.9;VAR037:=(C-LC)/LC*100>1.2;VAR038:=L< MA(C,5)*0.921;VAR039:=VOL< MA(V,5)*1.5;B018:=IF(VAR036 AND VAR037 AND VAR038 AND VAR039,1,0);{NO.13}VAR040:=100-3*(SMA(((C-LLV(L,75))/(HHV(H,75)-LLV(L,75)))*100,20,1))+2 *(SMA(SMA(((C-LLV(L,75))/(HHV(H,75)-LLV(L,75)))*100,20,1),15,1));VAR041:=100-3*(SMA(((O-LLV(L,75))/(HHV(H,75)-LLV(L,75)))*100,20,1))+2 *(SMA(SMA(((O-LLV(L,75))/(HHV(H,75)-LLV(L,75)))*100,20,1),15,1));VAR042:=VAR040<REF(VAR041,1) AND VOL>REF(VOL,1) AND C>LC;VAR043:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;VAR044:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VAR045:=SMA(VAR044,13,8);VAR046:=SMA(VAR043,21,8);VAR047:=SMA(VAR045,13,8);VAR048:=FILTER((COUNT((VAR047-VAR046<(-65)),3)=3),34);VAR049:=MA(C,80)-(MA(C,13))/(3);VAR050:=MA((C-VAR049)/(VAR049),1);VAR051:=(EMA(VAR050,12))*0.69999998;VAR052:=EMA(VAR050,3);VAR053:=IF((LLV(VAR052-VAR051,12)>0),0,(-30));VAR054:=FILTER((COUNT((VAR053<(-20)),3)=3),34);B019:=IF(VAR048,1,0);B020:=IF(VAR054,1,0);{NO.14}VAR055:=C/REF(C,1)>1.045;VAR056:=C/HHV(H,34)<0.7;VAR057:=MAX(FORCAST(COST(24)/L,3),SMA(COST(24)/L,3,1))>1.526 ;VAR058:=VAR055 AND VAR056 AND VAR057;B021:=IF(VAR058,1,0);{NO.15}VAR059:=LLV(L,60);VAR060:=HHV(H,60);VAR061:=EMA((C-VAR059)/(VAR060-VAR059)*100,5);VAR062:=EMA(0.667*REF(VAR061,1)+0.333*VAR061,2);VAR063:=CROSS(VAR062,VAR061) AND VAR061>85;S006:=IF(VAR063,1,0);{NO.16}VAR064:=REF(L,1);VAR065:=SMA(ABS(L-VAR064),13,1)/SMA(MAX(L-VAR064,0),13,1)*4; VAR066:=EMA(VAR065,13);VAR067:=LLV(L,34);VAR068:=EMA(IF(L<=VAR067,VAR066,0),3);B022:=IF(VAR068>REF(VAR068,1),1,0);{NO.17}VAR069:=IF(HHV((MA(C,1)<HHV(MA(TYP,5),10)),5),0,1);VAR070:=IF(LLV((MA(C,1)<LLV(MA(TYP,5),10)),5),1,0);VAR071:=IF(LLV((MA(C,1)<LLV(MA(TYP,5),10)),10),1,0);S007:=IF(VAR069,1,0);B023:=IF(VAR070,1,0);B024:=IF(VAR071,1,0);{NO.18}VAR072:=SUM(MAX(MAX((H-L),ABS((H-LC))),ABS((LOW-LC))),5); VAR073:=H-REF(H,1);VAR074:=REF(L,1)-L;VAR075:=SUM(IF(((VAR073>0)AND(VAR073>VAR074)),VAR073,0),5); VAR076:=SUM(IF(((VAR074>0)AND(VAR074>VAR073)),VAR074,0),5); VAR077:=(VAR075*100)/VAR072;VAR078:=(VAR076*100)/VAR072;VAR079:=MA(((ABS((VAR078-VAR077))/(VAR078+VAR077))*100),3); VAR080:=IF(((VAR079>88)AND(VAR077<5.8)),80,0);B025:=IF(VAR080,1,0);{NO.19}VAR081:=INDEXV*INDEXC;VAR082:=EMA(VAR081,5)/EMA(INDEXV,5);VAR083:=(INDEXC-VAR082)/VAR082*100;VAR084:=VAR083<=-1.5 AND VAR083>-100;VAR085:=SUM(VAR084>0,11)/SUM(VAR084=0,11);VAR086:=VAR085<5 AND VAR085>=0.25;VAR087:=(TYP-MA(TYP,13))/(0.015*AVEDEV(TYP,13));VAR088:=EMA(VAR087,3);VAR089:=SUM(MAX(0,H-REF(TYP,1)),21)/SUM(MAX(0,REF(TYP,1)-L),21)*100 ;VAR090:=REF(MA(VAR089,3),2.2);VAR091:=CROSS(VAR090,VAR089) AND VAR089>150;VAR092:=IF(VAR086 AND CROSS(VAR087,VAR088),1,0),,COLORRED;VAR093:=IF(VAR091,1,0),,COLORGREEN;S008:=IF(VAR093,1,0);B026:=IF(VAR092,1,0);{NO.20}VAR094:="RSI.RSI1"(3,14,24);VAR095:="RSI.RSI2"(3,14,24);VAR096:=IF((VAR095-VAR094)/VAR094>5,50,0);B027:=IF(VAR096,1,0);{NO.21}VAR097:=REF(L,1);VAR098:=SMA(ABS(L-VAR097),3,1)/SMA(MAX(LOW-VAR097,0),3,1)*100; VAR099:=EMA(IF(C*1.2,VAR098*10,VAR098/10),3);VAR100:=LLV(L,38);VAR101:=HHV(VAR099,38);VAR102:=IF(LLV(L,90),1,0);VAR103:=EMA(IF(L<=VAR100,(VAR099+VAR101*2)/2,0),3)/618*VAR102; VAR104:=VAR103>5;VAR105:=REF((L+O+C+H)/4,1);VAR106:=SMA(ABS(L-VAR105),13,1)/SMA(MAX(L-VAR105,0),10,1);VAR107:=EMA(VAR106,10);VAR108:=LLV(L,33);VAR109:=EMA(IF(L<=VAR108,VAR107,0),3);B028:=IF(COUNT(VAR104,2)=2 AND VAR109>REF(VAR109,1),1,0); {NO.22}VAR110:=SMA(MAX(C-LC,0),5,1)/SMA(ABS(C-LC),5,1)*100;VAR111:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;VAR112:=SMA(VAR111,3,1);VAR113:=SMA(VAR112,3,1);VAR114:=(VAR113/2+40)*1.1;VAR115:=SMA(VAR114,3,1);VAR116:=IF(CROSS(VAR115,VAR110),1,0);VAR117:=IF(CROSS(80,VAR110),1,0);S009:=IF(VAR116,1,0);S010:=IF(VAR117,1,0);{ m}{NO.23}VAR118:=(2*C+H+L)/4;VAR119:=EMA((VAR118-LLV(L,34))/(HHV(H,34)-LLV(L,34))*100,6);VAR120:=EMA(0.667*REF(VAR119,1)+0.333*VAR119,4);VAR121:=3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA ((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1);VAR122:=SMA(MAX(C-LC,0),6,1)/SMA(ABS(C-LC),6,1)*100;VAR123:=100*VOL/CAPITAL;VAR124:=IF(IF(COUNT(C<LC,8)/8>0.3 AND COUNT(VAR119>VAR120,3) AND REF(L,1)=LLV(L,120) AND C>O,1,0),52,0);VAR125:=IF(CROSS(VAR121,3),52,0);VAR126:=IF(CROSS(84,VAR122),(-1)*VAR122,0);VAR127:=IF(REF(0.34*VAR123,1)>4 AND REF(0.34*VAR123,1)<4.2,-60,0); B029:=IF(VAR124,1,0);B030:=IF(VAR125,1,0);S011:=IF(VAR126,1,0);S012:=IF(VAR127,1,0);{NO.24}VAR128:=SMA(MAX(C-LC,0),18,1)/SMA(ABS(C-LC),18,1)*100;VAR129:=SMA(MAX(C-LC,0),5,1)/SMA(ABS(C-LC),5,1)*100;S013:=IF(CROSS(68,VAR128),1,0);S014:=IF(CROSS(84,VAR129),1,0);{NO.25}VAR130:=IF(C/O>1.02 AND "BIAS.BIAS3"<-13,1,0);B031:=IF(VAR130,1,0);{NO.26}VAR131:=SUM(MAX(MAX(H-L,ABS(H-LC)),ABS(L-LC)),7);VAR132:=H-REF(H,1);VAR133:=REF(L,1)-L;VAR134:=SUM(IF(VAR132>0 AND VAR132>VAR133,VAR132,0),7);VAR135:=SUM(IF(VAR133>0 AND VAR133>VAR132,VAR133,0),7);VAR136:=VAR134*100/VAR131;VAR137:=VAR135*100/VAR131;VAR138:=MA(ABS(VAR137-VAR136)/(VAR137+VAR136)*100,3);B032:=IF(VAR138>90 AND VAR136=0,1,0);【买点】:B001+B002+B003+B004+B005+B006+B007+B008+B009+B010+B011 +B012+B013+B014+B015+B016+B017+B018+B019+B020+B021+B022+B023+B024+B025+B026+B027+B028+B029+B03 0+B031+B032,COLOR0000FF,NODRAW;【风险】:S001+S002+S003+S004+S005+S006+S007+S008+S009+S010+S011+ S012+S013+S014,COLOR00EE00,NODRAW;STICKLINE(【买点】,0,【买点】*5,0,0),COLORRED;STICKLINE(【风险】,0,【风险】*8,0,0),COLORGREEN;DRAWBAND(【买点】*5,RGB(211,0,0),【风险】*8,RGB(0,155,0)); ZZ:=VAR121>REF(VAR121,1) AND REF(VAR121,1)<12;买点累和:SUM(【买点】,21),COLOR880088,NODRAW;STICKLINE(FILTER(买点累和>50&&ZZ,5),88,0,1.5,1),COLOR0000FF; VV:=SMA(VAR121,5,4);RR:=SUM(CROSS(VAR121,VV),2)>0;FF:=VAR121<REF(VAR121,1) AND REF(VAR121,1)>80;MM:=REF(【买点】,1)>=6 AND 【买点】<REF(【买点】,1);SS:=REF(【风险】,1)>=4 AND 【风险】<REF(【风险】,1); STICKLINE(FILTER(ZZ&&MM,3),0,66,1,0),COLOR00FFFF; STICKLINE(FILTER(RR&&MM,3),0,36,1,0),COLORFF66FF; STICKLINE(SS&&FF,0,66,1,0),COLORFF8800;趋势:VAR121,COLOR00AAFF,LINETHICK1,NODRAW;DRAWBAND(趋势,RGB(255,155,0),VV,RGB(0,0,155));DRAWICON(【风险】>=3,90,2);DRAWICON(【买点】>=6,90,1);DRAWNUMBER(【风险】>=3,100,(【风险】)),COLOR00FF00; DRAWNUMBER(【买点】>=6,100,(【买点】)),COLOR00FFFF; DRAWTEXT(CURRBARSCOUNT=88,66,'====【买入不涨,逄高离场!】===='),COLOR000000;。
通达信指标公式源码 牛股主图指标
价量:=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);主力活跃力度:=(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25);快线:=(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25);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;TGLXS:=(TFXXS-REF(TFXXS,1));主力筹码:=EMA(WINNER(CLOSE)*70,3);散户筹码:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);金叉疯牛:=EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24)) /4,2);界:=MA(CLOSE,27);持股时段:IF((金叉疯牛>界)AND(散户筹码<主力筹码)AND((主力活跃力度>50)OR(主力活跃力度>REF(主力活跃力度,1))),-40,0),COLORRED,NODRAW;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);{//资金流入强度}BB:=MA(C,1);持币阶段:SMA(SMA(SMA(BB,2,1),2,1),2,1);主升持股波段:=HHV(MA(持币阶段,1),13);SH8:=EMA(ZSHTL,8);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);牛股出现预警:=WINNER(C/1.10)*100,COLOR00FFFF,NODRAW;主力赢利25持仓:=WINNER(C/1.25)*100,COLORFF00FF,NODRAW;散户套牢筹码:=散户筹码/(主力筹码+散户筹码)*100;主升浪波段:=主力筹码/(主力筹码+散户筹码)*100,COLORFF6100,NODRAW; 主力主导行情:=EMA(主升浪波段,55),NODRAW,COLORFF00FF;M:=60;N:=30;SHX:=100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)) COLORGRAY;庄家主力线:=50-SMA(SMA(SMA(SHX,2,1),2,1),2,1)/2,COLOR00FFFF,LINETHICK2;散户持股线:=50-HHV(MA(庄家主力线,1),13)/2,COLORFF00FF,LINETHICK4; 跌幅:=(REF(C,1)-C)/REF(C,1)*100;涨幅:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,POINTDOT,COLOR009900,LI NETHICK0;ER:=V/FINANCE(7)*100;A0:=TMA(ER,(1-ER),1);MAXCYC:=DMA((C+O)/2,ER/TMA(ER,(1-ER),1));T1:=BARSLAST(C>MAXCYC*POW(1.1,0.9));T2:=BARSLAST(C<MAXCYC*POW(1.1,-0.9));T3:=CROSS(T1,T2) OR CROSS(T2,T1) OR BARSSINCE(T1+1)=0 OR BARSSINCE(T2+1)=0 OR BARSCOUNT(C)=0;T4:=REF(MAXCYC,BARSLAST(T3));HZ:=HHV((H+L)/2,120);AA:=(2*C+H+L)/4;VAR1:=IF(DATE=10301201,0,1);VAR2:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);VAR3:=EMA(CLOSE,3);VAR4:=(2*CLOSE+LOW+HIGH)/4*VAR1;VAR5:=VAR2-VAR3;VAR6:=CLOSE*VOL;VAR7:=EMA((EMA(VAR6,3)/EMA(VOL,3)+EMA(VAR6,6)/EMA(VOL,6)+EMA(VA R6,12)/EMA(VOL,12)+EMA(VAR6,24)/EMA(VOL,24))/4,13);VAR8:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;VAR9:=(CLOSE+OPEN)/2;MA5:=MA(CLOSE,5);VAR11:=3*SMA((C-LLV(L,480))/(HHV(H,480)-LLV(L,480))*100,5,1)-2*SMA(SMA((C-LLV(L,480))/(HHV(H,480)-LLV(L,480))*100,180,1),15,1);超级主升:=EMA(VAR11,5);主升1:=超级主升-100;D8:=EMA(C,5);D2:=(EMA(C,1)+EMA(C,5)+EMA(C,10)+EMA(C,15)+EMA(C,20)+EMA(C,25)+ EMA(C,30)+EMA(C,35)+EMA(C,40)+EMA(C,45)+EMA(C,50)+EMA(C,55)+EMA(C,60)+EMA(C,65)+EMA(C,70)+EMA(C,75)+EMA (C,80)+EMA(C,85)+EMA(C,90)+EMA(C,95)+EMA(C,100)+EMA(C,105)+EMA(C,110)+EMA(C,115)+EMA(C,120)+EMA(C,12 5)+EMA(C,130)+EMA(C,135)+EMA(C,140)+EMA(C,150))/30;DDE:=(D8/D2)*100;主升2:=DDE-110;A:=(H+L+2*C)/4;A1:=(A-REF(A,3))/3+A;J:=EMA(HHV(A1,20),60),LINETHICK3;CB5:=EMA(COST(80),30),CIRCLEDOT;HMX:=EMA(1.4*EMA(FORCAST(A1,20),40),20),LINETHICK2;金牛线:=(J+CB5+HMX)/3,LINETHICK2;MA20:=MA(C,20);UP:=EMA(EMA(C*1.38,50),50),DOTLINE,COLOR0000FF;白色:=SMA(HIGH,21,2)*1.05;黄色:=SMA(LOW,21,2)*0.95;中线:=(白色+黄色)/2;UP1:=中线+2*STD(中线,20);UP2:=REF(UP1,0);CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(A1,20))/MA(A1,20);DT:=DMA(CLOSE,CC);通道3:=(1+9/100)*DT;通道4:=(1-7/100)*DT;界限:=(REF((金牛线+UP+EMA(UP1*1.04,40)+通道3)/4,10)+MA(C,20)*1.04)/2;AHC1:=H*VOL;AHC24:=EMA((EXPMA(AHC1,180)/EXPMA(VOL,180)+EXPMA(AHC1,360)/EXPMA(VOL,360)+EXPMA(AHC1,720)/EXPMA(VOL,720)+EXPMA(AHC1,1440)/EXP MA(VOL,1440))/4,34);C上X:=1.06*AHC24;C下X:=AHC24*0.94;AHC22:=EMA((EXPMA(AHC1,27)/EXPMA(VOL,27)+EXPMA(AHC1,54)/EXPMA(V OL,54)+EXPMA(AHC1,108)/EXPMA(VOL,108)+EXPMA(AHC1,316)/EXPMA(VOL ,316))/4,34);上X:=1.06*AHC22;下X:=AHC22*0.94;AHC23:=EMA((EXPMA(AHC1,5)/EXPMA(VOL,5)+EXPMA(AHC1,10)/EXPMA(VO L,10)+EXPMA(AHC1,20)/EXPMA(VOL,20)+EXPMA(AHC1,40)/EXPMA(VOL,40))/ 4,34);D上X:=1.06*AHC23;D下X:=AHC23*0.94;T:=(C上X+D上X+上X)/3*1.05;主升3:=(MA5*2/(界限+T)-1)*100;CBX80:=MA(COST(80),20);主升4:=(MA5/CBX80-1)*100;FT:=((HHV(H,42)-LLV(L,42)))/2+LLV(L,42);FT1:=ABS(HHV(H,40)-LLV(L,40)-LLV(L,40))+FT*0.5;主升5:=(FT/FT1-1)*100;P:=EMA(EMA(C*1.14,55),20);主升6:=(MA5/P-1)*100;金K线:=(EMA(HHV(H,60),60)+EMA(FT,453)*1.62)/2;主升7:=(MA5/金K线-1)*100;超牛拉升:=(主升1+主升2+主升3+主升4+主升5+主升6+主升7)/2,LINETHICK2;SMA2:=MA(持币阶段,3);V1:=(C*2+H+L)/4*10;V2:=EMA(V1,13)-EMA(V1,21);V3:=EMA(V2,5);V4:=2*(V2-V3)*100,COLORRED,LINETHICK2;筹码进:=IF(V4>=0,V4,0);VARAA:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR21:=SMA(ABS(HIGH-VARAA),13,1)/SMA(MIN(HIGH-VAR1,0),10,1); VAR31:=EMA(VAR21,10);VAR41:=HHV(HIGH,33);VAR51:=EMA(IF(HIGH>=VAR41,VAR31,0),3);主力抬轿:=IF(VAR51<REF(VAR51,1)AND(涨幅>0)AND(筹码进>150)AND(持股时段<-18)AND(跌幅<3),筹码进,0),COLORRED,NODRAW;上轨:=EMA(VAR8*1.15,15),COLORRED,LINETHICK1;黄线:=(EMA(VAR9,3)+EMA(VAR9,6)+EMA(VAR9,12)+EMA(VAR9,24))/4,COLOR YELLOW,LINETHICK1;HH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*RE F(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8* REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*R EF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1;LL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L, 5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*RE F(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF (L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1;VAR80:=3*SMA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,5,1)-2*SMA(S MA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,180,1),15,1);疯牛潜力股:=EMA(VAR80,5), NODRAW,COLOR6600FF;牛熊分道:EMA(HH,90),COLORYELLOW,LINETHICK2;下:=牛熊分道-((C-牛熊分道)*C-牛熊分道)/牛熊分道*1.68,LINETHICK3,COLORRED;下轨:=MA(下,14),COLORGREEN,LINETHICK2;IF(持股时段<-28 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK6;IF(持股时段<-28 AND 疯牛潜力股>50 AND BARSCOUNT(C)>250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK6;IF(疯牛潜力股>50 AND BARSCOUNT(C)>250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股<=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORGREEN,LINETHICK6;IF(上轨>=下轨AND 下轨>REF(下轨,1),下轨,DRAWNULL),COLORGREEN,LINETHICK6;IF(持股时段<-28 AND BARSCOUNT(C)<250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK6;IF(持股时段=0 AND BARSCOUNT(C)<250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF00FF,LINETHICK6;IF(疯牛潜力股>50 AND 上轨>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1) AND 牛熊分道>=下轨,上轨,DRAWNULL),COLORFF00FF,LINETHICK4;IF(疯牛潜力股>50 AND 上轨>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),上轨,DRAWNULL),COLORFF00FF,LINETHICK4;IF(COUNT(C>上轨,5)>=2 AND 上轨>=牛熊分道AND 疯牛潜力股>REF(疯牛潜力股,1) AND 涨幅>0.5,上轨,DRAWNULL),COLOR0000FF,LINETHICK4;不参与阶段:IF(上轨<下轨,上轨,上轨),COLORGREEN,LINETHICK2;分道关注:IF(上轨>=下轨AND 牛熊分道<下轨AND 下轨<REF(下轨,1),下轨,DRAWNULL),COLORFF00FF,LINETHICK2;IF(上轨>=下轨AND 牛熊分道<下轨AND 下轨<REF(下轨,1),下轨,DRAWNULL),COLORFF00FF,LINETHICK2;行情主升浪:IF(持股时段<-28 AND 疯牛潜力股>50 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK2;IF(持股时段<-28 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK2;IF(持股时段<-28 AND 疯牛潜力股>50 AND BARSCOUNT(C)>250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK2;IF(疯牛潜力股>50 AND BARSCOUNT(C)>250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股<=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORGREEN,LINETHICK2;IF(上轨>=下轨AND 下轨>REF(下轨,1),下轨,DRAWNULL),COLORGREEN,LINETHICK2;IF(持股时段<-28 AND BARSCOUNT(C)<250 AND 上轨>=下轨AND 牛熊分道>=下轨AND 疯牛潜力股>=REF(疯牛潜力股,1),下轨,DRAWNULL),COLORFF0080,LINETHICK2;IF(疯牛潜力股>50 AND 上轨>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1) AND 牛熊分道>=下轨,上轨,DRAWNULL),COLORFF00FF,LINETHICK2;IF(疯牛潜力股>50 AND 上轨>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),上轨,DRAWNULL),COLORFF00FF,LINETHICK2;超级疯牛分界:IF(持股时段<-28 AND 疯牛潜力股>50 AND 上轨>=下轨AND 疯牛潜力股>REF(疯牛潜力股,1),上轨,DRAWNULL),COLORRED,LINETHICK2; IF(COUNT(C>上轨,5)>=2 AND 上轨>=牛熊分道AND 疯牛潜力股>REF(疯牛潜力股,1) AND 涨幅>0.5,上轨,DRAWNULL),COLORRED,LINETHICK2;开口选股:=BARSLASTCOUNT(上轨>下轨)=1,NODRAW;DRAWICON(开口选股,MIN(下轨,上轨)*1.08,26);DRAWTEXT(开口选股,LOW,71),COLORYELLOW;DRAWTEXT(开口选股,上轨*1.13,'开始关注'),COLORRED;变盘加速上扬:=CROSS(牛熊分道,下轨);DRAWICON(变盘加速上扬,LOW*0.9,25);{重仓介入}重仓目标:=FILTER((COUNT(变盘加速上扬,5)=1),15),COLORFFFF00,LINETHICK2;STICKLINE(重仓目标>0.8,牛熊分道*0.8,牛熊分道*0.88,0.5,0),COLORFFFF00,LINETHICK2;STICKLINE(重仓目标>0.8,牛熊分道*0.8,牛熊分道*0.86,2,0),COLORFF0080,LINETHICK2;STICKLINE(重仓目标>0.8,牛熊分道*0.8,牛熊分道*0.84,4,0),COLORFF00FF,LINETHICK2;DRAWTEXT(重仓目标>0.8,牛熊分道*0.76,'重点目标'),COLORRED;超强自选:=(CROSS(CLOSE,下轨) AND CROSS(CLOSE,超级疯牛分界) AND COUNT(上轨>下轨,2)=1 AND REF(下轨,2)>REF(上轨,2));STICKLINE(重仓目标>0.8 OR 超强自选,牛熊分道*0.8,牛熊分道*0.88,0.5,0),COLORFFFF00,LINETHICK2;STICKLINE(重仓目标>0.8 OR 超强自选,牛熊分道*0.8,牛熊分道*0.86,2,0),COLORFF0080,LINETHICK2;STICKLINE(重仓目标>0.8 OR 超强自选,牛熊分道*0.8,牛熊分道*0.84,4,0),COLORFF00FF,LINETHICK2;DRAWTEXT(重仓目标>0.8 OR 超强自选,牛熊分道*1.05,'重点目标'),COLORRED;VARA:=SMA(AMOUNT,10,1)/1000000;VARB:=REF(VARA,1);VARC:=MA(REF(CLOSE,1),5);最高:=VARA*HIGH/VARC*1/10,POINTDOT,COLOR009900,COLORGRAY;最低:=VARA*LOW/VARC*1/10,POINTDOT,COLOR009900,COLORYELLOW; 开盘:=VARA*OPEN/VARC*1/10,POINTDOT,COLOR009900,COLORMAGENTA; 收盘:=VARA*CLOSE/VARC*1/10,COLOR009900,COLORGREEN,POINTDOT; 涨跌:=(收盘-REF(收盘,1))/REF(收盘,1)*100,POINTDOT,COLOR009900,LINETHICK0;STICKLINE((CLOSE>下轨AND 涨跌>15 AND CLOSE<上轨AND OPEN<上轨AND 下轨<牛熊分道),CLOSE,OPEN,3,0),COLORYELLOW;{超强突破}自选:=IF((CROSS(CLOSE,上轨) AND 下轨<=牛熊分道),18,0),COLORRED,LINETHICK2;重点自选:=FILTER((自选>8),20),COLORRED,LINETHICK2;STICKLINE(重点自选,CLOSE*1.1,CLOSE*1.15,0.5,0),COLORRED; DRAWICON(重点自选,CLOSE*1.06,12),COLORRED;DRAWTEXT(重点自选,CLOSE*1.2,'快马加鞭'),COLORRED;STICKLINE((涨跌>20 AND CLOSE>上轨),OPEN+(CLOSE-OPEN),OPEN,3,0),COLORRED;STICKLINE((涨幅>5 AND 涨跌>0 AND 涨跌<20 AND CLOSE>上轨AND OPEN<上轨),CLOSE,OPEN,3,0),COLORRED;STICKLINE((涨幅>5 AND 涨跌>0 AND 涨跌<20 AND CLOSE>上轨AND OPEN<上轨),OPEN+(CLOSE-OPEN)*2/3,OPEN,3,0),COLORBLUE; STICKLINE((涨跌>40 AND CLOSE>上轨AND OPEN<上轨),OPEN+(CLOSE-OPEN)/3,OPEN+(CLOSE-OPEN)*2/3,3,0),COLORYELLOW; STICKLINE((涨跌>20 AND CLOSE>上轨AND OPEN<上轨),OPEN+(CLOSE-OPEN)/3,OPEN+(CLOSE-OPEN)*2/3,3,0),COLORBLUE; STICKLINE((涨跌>10 AND CLOSE>上轨AND OPEN>上轨),OPEN+(CLOSE-OPEN)/3,OPEN+(CLOSE-OPEN)*2/3,3,0),COLORYELLOW; DRAWICON(变盘加速上扬,LOW*0.9,25);{大胆博}MB5:=MA(C,5);MA10:=MA(C,10);MA30:=MA(C,30);FA:=BARSLAST(CROSS(MA10,MB5)) AND CROSS(MB5,MA10);FB:=FA AND MB5>MA30 AND MA10>MA30 AND MA10>REF(MA10,1); DRAWTEXT(FB,L-0.58,'★红牛'),COLORRED;V11:=EMA(CLOSE,5);V22:=EMA(EMA(CLOSE,90)*1.01,10);DRAWTEXT(CROSS(V11,V22),V11+0.05,'牛起步'),COLOR00FF00;VAR11A:=LLV(LOW,21);VAR22A:=HHV(HIGH,21);AK1:=EMA((((CLOSE - VAR11A) / (VAR22A - VAR11A)) * 100),5);AK:=EMA((((CLOSE - VAR11A) / (VAR22A - VAR11A)) * 50),13);AB:=CROSS(AK1,AK);DRAWTEXT((AB = 1),(LOW * 0.99),'○牛窝'),COLORYELLOW;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,COLOR0099FF; DRAWTEXT(老鼠仓,L*0.99,'老鼠仓'),COLOR0099FF;VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW)*(0.93),'★大胆搏'),COLOR00FFFF;DRAWTEXT(FILTER((VAR4AA>90),35),(LOW)*(0.99000001),'★加仓'),COLOR00FFFF;A1AA:=9;A2AA:=(REF(CLOSE,A1AA+1)<CLOSE);DRAWTEXT(FILTER((A2AA>-0.5),84),(HIGH)*(1.05),'小心变盘'),COLORFFFFFF;VAR6A:=REF(C,1);VAR7A:=SMA(MAX(C-VAR6A,0),6,1)/SMA(ABS(C-VAR6A),6,1)*100; DRAWTEXT(CROSS(82,VAR7A),H*1.01,'逃顶')COLORYELLOW;。
小牛主图指标通达信指标公式源码
该指标可以用来抄底,也可以用来抓牛股。
DRAWTEXT_FIX(1,0.8,0,0,'情剩制作'),COLORRED;Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;ZK1:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLOR BLUE;ZD1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COL ORRED;ZD2:EMA(ZD1,25),LINETHICK2;DRAWBAND(ZD1,RGB(55,0,0),ZD2,RGB(0,91,0));DRAWKLINE(H,O,L,C);STICKLINE(ZD1>LOW ANDZD1<HIGH,ZD1,MIN(MIN(OPEN,CLOSE),ZD1),2,0),COLORYELLOW;STICKLINE(ZD1>MIN(C,O) ANDZD1<MAX(C,O),ZD1,MIN(OPEN,CLOSE),2,0),COLORYELLOW;STICKLINE(ZD1>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(ZD1>HIGH,HIGH,LOW,0,0),COLORYELLOW;VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) ANDCROSS(VAR23,MA(VAR23,2));XG:=ZD1>HIGH AND 回调买AND L<=ZD1;DRAWTEXT(XG,L,'▲买入'),COLORRED;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLO SE)-LOW)));QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOS E,OPEN))));QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX( OPEN,CLOSE))));QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OP EN)-JJ)));DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK; V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);V5:=SMA(V2*120/FROMOPEN*5,2,1);V10:=SMA(V5,5,1);V20:=SMA(V10,5,1);DY:=CURRBARSCOUNT=1 AND C<REF(C,1);DY2:=REF(V2,1)-DY;XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<ZK1; {DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}DRAWTEXT(XG2 AND L<ZD1,L,'↖牛暴涨'),COLORRED;所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [地域]—',DYBLOCK)),STRCAT(' [概念]—',GNBLOCK)));总股本:=STRCAT(STRCAT(' 总股本:',CON2STR(TOTALCAPITAL/1000000,2)),'亿');流通盘:=STRCAT(STRCAT(' 流通盘:',CON2STR(CAPITAL/1000000,2)),'亿');全流通:=STRCAT(STRCAT(' 全流通:',CON2STR(CAPITAL/TOTALCAPITAL*100,2)),'%');市值:=STRCAT(STRCAT(' 流通市值:',CON2STR((CAPITAL/1000000)*C,2)),'亿');上市日期:=STRCAT(' 上市日期:',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));股本市值:=STRCAT('【股本市值】',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市日期));市盈率:=STRCAT(' 市盈率:',CON2STR(C/FINANCE(33),2));市销率:=STRCAT(' 市销率:',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));市净率:=STRCAT(' 市净率:',CON2STR(C/FINANCE(34),2));净资收益率:=STRCAT(' 净资收益率:',CON2STR(FINANCE(33)/FINANCE(34)*100,2));毛利率:=STRCAT(' 毛利率:',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));净利润率:=STRCAT(' 净利率:',CON2STR(FINANCE(30)/FINANCE(20)*100,2));主营利润率:=STRCAT(' 主营利润率:',CON2STR(FINANCE(23)/FINANCE(20)*100,2));当前业绩:=STRCAT('【当前业绩】',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));DRAWTEXT_FIX(ISLASTBAR,0.005,0.02,0,所属板块),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.005,0.07,0,股本市值),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.005,0.12,0,当前业绩),COLORMAGENTA;。
通达信指标公式源码小试牛刀
通达信指标公式源码小试牛刀通达信是一种非常流行的股票分析软件,提供了丰富的技术指标,供投资者使用。
每个指标都有一套独特的计算公式,可以用于识别市场趋势和价格走势,并提供买入或卖出的信号。
以下是通达信指标公式源码的一些示例。
1. 移动平均线(Moving Average,简称MA)移动平均线是一种常见的趋势指标,用于平滑价格数据,并显示出价格的长期趋势。
通达信中的移动平均线指标公式如下:MA(CLOSE,N):收盘价的N日简单移动平均线。
源码示例:```AVG:MA(CLOSE,N);```2. 相对强弱指标(Relative Strength Index,简称RSI)相对强弱指标用于衡量市场的超买和超卖情况,范围从0到100。
通达信中的相对强弱指标公式如下:RSI(CLOSE,N):N日相对强弱指标。
源码示例:```RSI:RSI(CLOSE,N);```3. 成交量指标(Volume Index,简称VI)成交量指标是一种衡量市场活跃度的指标。
通达信中的成交量指标公式如下:VI(VOLUME,N):N日成交量指标。
源码示例:```VI:VI(VOLUME,N);```4. 布林带(Bollinger Bands,简称BOLL)布林带是一种用于测量价格波动的指标。
通达信中的布林带指标公式如下:BOLL(CLOSE,N,K):N日布林带中轨、上轨和下轨。
源码示例:```BOLL:BOLL(CLOSE,N,K);```5. 相对强弱指标(Moving Average Convergence Divergence,简称MACD)MACD是一种常用的趋势指标,用于衡量价格的动能和趋势方向。
通达信中的MACD指标公式如下:MACD(CLOSE,SHORT,LONG,M):MACD、DIFF和DEA。
源码示例:```MACD:MACD(CLOSE,SHORT,LONG,M);```以上只是通达信中的一小部分指标公式示例,通达信提供了很多其他的指标,每个指标都有不同的计算公式。
通达信指标公式源码绝密买卖点指标
{买卖密码}JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR55:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR66:=(VAR55 + ((VAR55 * 6) / 100));短买春:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRAW;Q1:=CONST(IF(短买春,0,IF(秋离场,150,IF(红持股,150,IF(急速超跌关注,150,100))))),NODRAW; Q2:=CONST(IF(短买春,80,IF(秋离场,100,IF(红持股,0,IF(急速超跌关注,150,100))))),NODRAW;Q3:=CONST(IF(短买春,0,IF(秋离场,20,IF(红持股,70,IF(急速超跌关注,150,100))))),NODRAW;DD1:=EMA((O+H+L)/3,4)COLORWHITE,NODRAW;DD2:=EMA(C+(H-L)*0.618,3)COLORYELLOW,NODRAW;密码1:DD2+(DD2-DD1)*0.618,NODRAW,COLORWHITE;{明卖}密码2:EMA((O+H+L)/3,4)+((H+L)/2-REF((O+H+L)/3,3))/4,NODRAW;{明买}密码3:=MA(REF(密码1,1),1)*1,COLORLIMAGENTA,NODRAW;{今卖}密码4:=REF(密码2,1),COLORLIMAGENTA,NODRAW;{今买}密码5:=MA(REF(DD2,1),1)*1,COLORLIMAGENTA,NODRAW;{今卖}密码6:=REF(DD1,1),COLORLIMAGENTA,NODRAW;{今买}{黄金买点:=EMA((O+H+L)/3,4)COLORWHITE,NODRAW;黄金卖点:=EMA(C+(H-L)*0.618,3)COLORYELLOW,NODRAW;预测明日卖点:黄金卖点+(黄金卖点-黄金买点)*0.618,NODRAW,COLORWHITE;预测明日买点:EMA((O+H+L)/3,4)+((H+L)/2-REF((O+H+L)/3,3))/4,NODRAW;今卖:MA(REF(预测明日卖点,1),1)*1,COLORLIMAGENTA,NODRAW;今买:REF(预测明日买点,1),COLORLIMAGENTA,NODRAW;}换:IF(CAPITAL>0,V/CAPITAL*100,V),NODRAW;收:=FINANCE(33),NODRAW;流:FINANCE(7)/100000000,NODRAW;TT:=IF(ISLASTBAR,240/FROMOPEN,1);NN:=120;HH:=HHV(V*TT,NN);LL:=LLV(V,NN);最高:=CONST(HH);最低:=CONST(LL);RCC:=最高*0.9-(最高-最低)*0.5;RHL:=RCC;HLMAX:=最高;HLMIN:=最低;HLMN1:=(HLMAX+HLMIN)/2;HLMN2:=HLMAX-HLMIN;HLMN3:=(100-0)/2*1.3;HLMN4:=(100-0)/1*1.3;P:=最高/120;{顶底摸块}神:=2*SMA(V*((C+L)/2+(H+C)/2+L)/3,2,1)/SMA(V,2,1)-(3*HHV(SMA(V*((C+L)/2+(H+C)/2+L)/3,2,1)/ SMA(V,2,1),2)-2*SMA(V*((C+L)/2+(H+C)/2+L)/3,2,1)/SMA(V,2,1));奇:=(2*神+EMA((2*(C+L)/2+(H+C)/2+L+O)/5,2)+2*((EMA((C*2+H+L+O)/5,5)+MA((C*2+H+L+O)/5,13)+MA((C *2+H+L+O)/5,21))/3)+((EMA((C*2+H+L+O)/5,13)+MA((C*2+H+L+O)/5,21)+MA((C*2+H+L+O)/5,34))/3)+((EMA((C*2+H+L+O)/5,2 1)+MA((C*2+H+L+O)/5,34)+MA((C*2+H+L+O)/5,55))/3))/7;分清:=(FORCAST(HHV((C+L)/2,1),21)+(EMA(((C+L)/2+L+(H+C)/2)/3,55)-(C-EMA(((C+L)/2+L+(H+C)/2)/3, 55))))/2;放心买入:=(((C+L)/2+(H+C)/2+L)/3+(3*(C+H+L+(O+C+L)/3)/4-2*(C+L)/2))/2;强:=(EMA((分清+3*((EMA(放心买入,5)*5+分清)/6+((EMA(奇,5)+EMA(奇,8)+EMA(奇,13))/3))/2)/4,3)/3),POINTDOT,COLOR00FFFF;验证:=((((C+L)/2-LLV(L,24))/(HHV((H+C)/2,24)-LLV(L,24))*1.1*(C+L)/2));续持验证:=EMA((2*(5*((EMA((2*C+L)/3,2)-EMA((2*C+H)/3,5))-EMA((EMA((2*C+L)/3,2)-EMA((2*C+H)/3,5)),21)))+(((C*2+H)/3+(C*2+H)/3)/2)+EMA(验证,2))/4,2),COLOR555555;AR:=(2*(C+L)/2+REF((C+L)/2,1))/3;BR:=(7*(C+L)/2+6*REF((C+L)/2,1)+5*REF((C+L)/2,2)+4*REF((C+L)/2,3)+3*REF((C+L)/2,4)+2*REF((C+L)/2,5)+REF((C+L)/2,6))/28;VARA2:=LLV(MA(LOW,3),3);VARA3:=HHV(MA(HIGH,3),3);比:=TT;昨V:=REF(V,1);T:=IF(ISLASTBAR,IF(FROMOPEN>60,IF(FROMOPEN-INTPART(FROMOPEN/60)*60=0,1,60/(FROMOPEN-INTPART(FROMOPEN/60)*60)),60/FROMOPEN),1);WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;买盘2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8));卖盘2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7));买盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,买盘1,买盘2);卖盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,卖盘1,卖盘2);DRAWBAND(最高,RGB(Q1,Q2,Q3),0,DRAWNULL);买卖差:=买盘-卖盘;STICKLINE(C>=O,0,买盘+卖盘,2.8,1),COLORRED;STICKLINE(C<O,0,买盘+卖盘,2.8,1),COLORFFFF00;STICKLINE(买卖差>=0,0,买盘,2.5,0),COLORRED;STICKLINE(买卖差>=0 AND C>=MA(C,30),0,买盘,3.0,0),COLORRED;STICKLINE(买卖差>=0,0,卖盘,1.1,0),COLOR998800;STICKLINE(买卖差>=0 AND C>=MA(C,30),0,卖盘,1.5,0),COLORDDCC00;STICKLINE(买卖差<0,0,买盘,2.5,0),COLORRED;STICKLINE(买卖差<0 AND C>=MA(C,30),0,买盘,3.0,0),COLORRED;STICKLINE(买卖差<0,0,卖盘,1.1,0),COLOR998800;STICKLINE(买卖差<0 AND C>=MA(C,30),0,卖盘,1.5,0),COLORDDCC00;A1:=REF(CLOSE,1);B1:=(买盘+卖盘)<MA(V,60)/3 ;{B1:=V<MA(V,60)/3 ;}B2:=MA(V,5)/2>V AND V>B1;STICKLINE(B1,0,卖盘,2,0),COLORYELLOW;((80-HLMN3)*HLMN2/HLMN4+HLMN1),COLORCCCCCC,LINETHICK1,DOTLINE;((50-HLMN3)*HLMN2/HLMN4+HLMN1),COLORCCCCCC,LINETHICK1,DOTLINE;((20-HLMN3)*HLMN2/HLMN4+HLMN1),COLORCCCCCC,LINETHICK1,DOTLINE;KA:=(EMA((CLOSE-VARA2)/(VARA3-VARA2)*100,4)-50)*0.5+50;DB:=EMA(0.667*REF(KA,1)+0.333*KA,2);JJ:=3*KA-2*DB;((KA-HLMN3)*HLMN2/HLMN4+HLMN1),COLORFFF111,LINETHICK1;((DB-HLMN3)*HLMN2/HLMN4+HLMN1),COLOR00FF00,LINETHICK1;((JJ-HLMN3)*HLMN2/HLMN4+HLMN1),COLORFF00FF,LINETHICK1;IF(续持验证<强,-5*P,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;IF(续持验证>=强,-5*P,DRAWNULL),CIRCLEDOT,COLORRED,LINETHICK1;IF(续持验证>= REF(续持验证,1),-15*P,DRAWNULL),CIRCLEDOT,COLORRED,LINETHICK1; IF(续持验证< REF(续持验证,1),-15*P,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1; STICKLINE(1,HLMAX,HLMAX*0.96,3,0),COLORGREEN;红灯买:STICKLINE(密码1>密码3,HLMAX,HLMAX*0.96,3,0),COLORRED;STICKLINE(1,HLMAX*0.98,HLMAX*0.98,3,0),COLORWHITE;STICKLINE(1,HLMAX*0.93,HLMAX*0.89,3,0),COLORRED;绿灯卖:STICKLINE(密码2<=密码4,HLMAX*0.93,HLMAX*0.89,3,0),COLORGREEN; STICKLINE(1,HLMAX*0.91,HLMAX*0.91,3,0),COLORWHITE;操作段1:STICKLINE(密码1>(密码3) AND C>密码 2 OR 密码2>密码4,HLMAX*0.82,HLMAX*0.86,3,0),COLORRED;操作段2:STICKLINE(C>密码 2 AND 密码1>密码3,HLMAX*0.82,HLMAX*0.86,3,0),COLORMAGENTA;操作段3:STICKLINE(密码1<密码 3 AND 密码2>密码4,HLMAX*0.82,HLMAX*0.86,3,0),COLORYELLOW;STICKLINE(密码1>(密码3) AND C>密码2 OR 密码2>密码4 OR C>密码2 AND 密码1>密码3,HLMAX*0.84,HLMAX*0.84,3,0),COLORWHITE;。
波段操盘(主图 源码)通达信指标公式源码
波段操盘(主图源码)这个指标在大智慧上用了段时间个人感觉还不错挺清爽的一目了然O1:(SUM(EMA((CLOSE+LOW)/2,1)/3,3)),COLOR00FFFF,LINETHICK1;O2:EMA(O1,3),COLORFF00FF,LINETHICK1;O3:EMA(O2,3),COLOR00FF00,LINETHICK1;MMM:=MA(CLOSE,20);DRAWTEXT((CLOSE<MMM),MMM,'*'),COLOR00FF00,LINETHICK5;DRAWTEXT((CLOSE>MMM),MMM,'*'),COLOR0000FF,LINETHICK5;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(VAR9,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); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3.2,0),COLORFF3300;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2.7,0),COLORFF5500;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2.1,0),COLORFF7700;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),1.5,0),COLORFF9900;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0.9,0),COLORFFBB00; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0.3,0),COLORFFDD00; DRAWTEXT(FILTER(VAR19=1,5),LOW,'买进'),COLORFF00FF;DRAWICON(FILTER(VAR19=1,5),LOW,9);DRAWTEXT(FILTER(VAR1A=1,5),HIGH,'逃顶'),COLOR00FF00; DRAWICON(FILTER(VAR1A=1,5),HIGH,15);。