波浪操作主图公式通达信指标公式源码
通达信极品波浪主图指标公式
通达信极品波浪主图指标公式N:=13;M:=1;P:=3;P2:=5;P3:=36;P4:=13;P5:=65;A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);B1:=FILTER(A1,3);C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);{高点}A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT((D1 AND E1<E2)));H2:=D1 AND NOT((D2 AND E1>=E2));X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK3;DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK3;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(L D))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BAR SLAST(LD),H,L),0),COLORWHITE,LINETHICK2;{以下是两条趋势线原码}UU:=BACKSET(ISLASTBAR ,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);UU2:=BACKSET(ISLASTBAR ,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);前一低:REF(L,BARSLAST(VV)),COLOR99FF66,LINETHICK1;前二低:REF(L,BARSLAST(XX)),COLORFF66FF,LINETHICK1;前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,LINETHICK1;前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,LINETHICK1;DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK2;DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=60,MA(C,120),' 上升五浪,下跌三浪,趋势自画:');DRAWTEXT(CURRBARSCOUNT=60,MA(C,120)*0.90,' 长短均线,阻力支撑,高低自明:');。
通达信指标公式源码波浪之字主图指标公式
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,13);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,26);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,55);走强一:=BARSLAST(PL5<REF(PL5,1));走弱一:=BARSLAST(PL5>REF(PL5,1));走强二:=BARSLAST(PL10<REF(PL10,1));走弱二:=BARSLAST(PL10>REF(PL10,1));走强三:=BARSLAST(PL20<REF(PL20,1));走弱三:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱二),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱二),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强三),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱三),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱三),0);DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.98,'(Ⅰ)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.02,'(Ⅱ)'),COLORFFFF00; DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.98,'(Ⅲ)'),COLORFFFF00; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'⑴'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'⑵'),COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'⑶'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'⑷'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'【A】'),COLOR00FF00; DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.03,'【B】'),COLOR00FF00; DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'【C】'),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'①'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.94,'②'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'③'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.94,'④'),LINETHICK3,COLOR00FFFF;DMLJ:=HHV(HIGH,120);TY:=CLOSE;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10); A:=REF(CLOSE,BARSLAST(HD));B:=REF(CLOSE,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2;STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100; VAR7:=0;VAR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)), 7)*100;VAR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)), 13)*100;VARA:=BARSCOUNT(CLOSE);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND COUNT(VARB,1)=1;VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);VARE:=EMA(VARD,5);VARF:=TROUGH(3,6,1)<4 AND CROSS(VARD,VARE);VAR10:=IF(TROUGH(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(HIGH+LOW+CLOSE)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,LOW);买点一:=VAR10;买点二:=(VAR11+VAR13+VAR15+VAR17);卖点一:=(VAR12+VAR14+VAR16+VAR18);VAR22:=买点一AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110);VAR1:=MA(CLOSE,6);VAR2:=MA(CLOSE,18);VAR31:=MA(CLOSE,30);VARB1:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);VARC1:=INTPART(VARB1*100)/100;VARD1:=EMA(CLOSE,5)-EMA(CLOSE,10);VARE1:=EMA(VARD1,9);VAR131:=REF(VARE1,1);VAR141:=VARE1;VAR151:=VAR141-VAR131;VAR161:=REF(VARD1,1);VAR171:=VARD1;VAR181:=VAR171-VAR161;VAR191:=OPEN;VAR1A1:=CLOSE;DRAWTEXT(买点一>0,LOW-0.01,'▲买!'),COLORRED; DRAWTEXT(买点二>0,LOW-0.01,'▲买涨'),COLORYELLOW; DRAWTEXT(卖点一>0,HIGH+0.1,'▼卖跌'), COLORWHITE;A1:=BARSCOUNT(CLOSE);AH:=HHV(HIGH,72);AL:=LLV(LOW,72);A0:=(AH-AL)/21;B1:=LOW-A0;DRAWTEXT((A1+0)/15=FLOOR((A1+0)/15),B1-2.5*A0,'▲时窗'),COLORWHITE;VAR51:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1)AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);STICKLINE(VAR51=2,LOW*0.95,LOW*0.98,8,0),COLOR0000FF; DRAWTEXT(VAR51=2,LOW*0.95,'3天'),COLORWHITE; STICKLINE(VAR51=4,HIGH*1.05,HIGH*1.02,8,0),COLOR9966FF; DRAWTEXT(VAR51=4,HIGH*1.06,'5天'),COLORWHITE; STICKLINE(VAR51=7,LOW*0.95,LOW*0.98,8,0),COLOR00FFFF; DRAWTEXT(VAR51=7,LOW*0.95,'8天'),COLORWHITE; STICKLINE(VAR51=12,HIGH*1.05,HIGH*1.02,8,0),COLORFF33FF; DRAWTEXT(VAR51=12,HIGH*1.06,'13天'),COLORWHITE; STICKLINE(VAR51=20,LOW*0.95,LOW*0.98,8,0),COLOR0066FF; DRAWTEXT(VAR51=20,LOW*0.95,'21天'),COLORWHITE; STICKLINE(VAR51=33,HIGH*1.05,HIGH*1.02,8,0),COLORFFFF00; DRAWTEXT(VAR51=33,HIGH*1.06,'34天'),COLORWHITE; STICKLINE(VAR51=54,LOW*0.95,LOW*0.98,8,0),COLORWHITE; DRAWTEXT(VAR51=54,LOW*0.95,'55天'),COLORWHITE; STICKLINE(VAR51=88,HIGH*1.05,HIGH*1.02,8,0),COLOR00FF00; DRAWTEXT(VAR51=88,HIGH*1.06,'89天'),COLORWHITE; STICKLINE(VAR51=143,LOW*0.95,LOW*0.98,8,0),COLORCCFFFF; DRAWTEXT(VAR51=143,LOW*0.95,'144天'),COLORWHITE; STICKLINE(VAR51=232 ,HIGH*1.05,HIGH*1.02,8,0),COLORFF0033;DRAWTEXT(VAR51=232,HIGH*1.06,'233天'),COLORWHITE; STICKLINE(VAR51=376,LOW*0.95,LOW*0.98,8,0),COLORFF9966; DRAWTEXT(VAR51=376,LOW*0.95,'377天'),COLORWHITE;立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2);雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2);惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2);春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2);清明:=FILTER(MONTH=4 AND (DAY=3 OR DAY=6 ),2);谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2);立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2);小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2);芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2);夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2);小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2);大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2);立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2);处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2);白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2);秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2);寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2);霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2);立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2);小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2);大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2);冬至:=FILTER(MONTH=12 AND (DAY=21 OR DAY=23),2);小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2);大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=21),2); GET:ZIG(3,5),COLORWHITE,LINETHICK1;。
通达信指标公式源码 波浪之字主图 主图源码
使用了臭名昭著--未来函数ZIG之字转向指标,包含了波浪顶低、时间窗、买卖点等,不喜欢未来函数的请慎用。
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,13);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,26);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,55);走强一:=BARSLAST(PL5<REF(PL5,1));走弱一:=BARSLAST(PL5>REF(PL5,1));走强二:=BARSLAST(PL10<REF(PL10,1));走弱二:=BARSLAST(PL10>REF(PL10,1));走强三:=BARSLAST(PL20<REF(PL20,1));走弱三:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱二),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱二),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强三),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱三),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱三),0);DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.98,'(Ⅰ)'),COLORFFFF00; DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.02,'(Ⅱ)'),COLORFFFF00; DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.98,'(Ⅲ)'),COLORFFFF00; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'⑴'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'⑵'),COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'⑶'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'⑷'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'【A】'),COLOR00FF00; DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.03,'【B】'),COLOR00FF00; DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'【C】'),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'①'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.94,'②'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'③'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.94,'④'),LINETHICK3,COLOR00FFFF;DMLJ:=HHV(HIGH,120);TY:=CLOSE;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10); A:=REF(CLOSE,BARSLAST(HD));B:=REF(CLOSE,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2;STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100; VAR7:=0;VAR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)), 7)*100;VAR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)), 13)*100;VARA:=BARSCOUNT(CLOSE);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND COUNT(VARB,1)=1;VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);VARE:=EMA(VARD,5);VARF:=TROUGH(3,6,1)<4 AND CROSS(VARD,VARE);VAR10:=IF(TROUGH(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(HIGH+LOW+CLOSE)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,LOW);买点一:=VAR10;买点二:=(VAR11+VAR13+VAR15+VAR17);卖点一:=(VAR12+VAR14+VAR16+VAR18);VAR22:=买点一AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110);VAR1:=MA(CLOSE,6);VAR2:=MA(CLOSE,18);VAR31:=MA(CLOSE,30);VARB1:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);VARC1:=INTPART(VARB1*100)/100;VARD1:=EMA(CLOSE,5)-EMA(CLOSE,10);VARE1:=EMA(VARD1,9);VAR131:=REF(VARE1,1);VAR141:=VARE1;VAR151:=VAR141-VAR131;VAR161:=REF(VARD1,1);VAR171:=VARD1;VAR181:=VAR171-VAR161;VAR191:=OPEN;VAR1A1:=CLOSE;DRAWTEXT(买点一>0,LOW-0.01,'▲买!'),COLORRED;DRAWTEXT(买点二>0,LOW-0.01,'▲买涨'),COLORYELLOW;DRAWTEXT(卖点一>0,HIGH+0.1,'▼卖跌'), COLORWHITE;A1:=BARSCOUNT(CLOSE);AH:=HHV(HIGH,72);AL:=LLV(LOW,72);A0:=(AH-AL)/21;B1:=LOW-A0;DRAWTEXT((A1+0)/15=FLOOR((A1+0)/15),B1-2.5*A0,'▲时窗'),COLORWHITE;VAR51:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1)AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);STICKLINE(VAR51=2,LOW*0.95,LOW*0.98,8,0),COLOR0000FF; DRAWTEXT(VAR51=2,LOW*0.95,'3天'),COLORWHITE;STICKLINE(VAR51=4,HIGH*1.05,HIGH*1.02,8,0),COLOR9966FF; DRAWTEXT(VAR51=4,HIGH*1.06,'5天'),COLORWHITE;STICKLINE(VAR51=7,LOW*0.95,LOW*0.98,8,0),COLOR00FFFF; DRAWTEXT(VAR51=7,LOW*0.95,'8天'),COLORWHITE;STICKLINE(VAR51=12,HIGH*1.05,HIGH*1.02,8,0),COLORFF33FF; DRAWTEXT(VAR51=12,HIGH*1.06,'13天'),COLORWHITE;STICKLINE(VAR51=20,LOW*0.95,LOW*0.98,8,0),COLOR0066FF; DRAWTEXT(VAR51=20,LOW*0.95,'21天'),COLORWHITE;STICKLINE(VAR51=33,HIGH*1.05,HIGH*1.02,8,0),COLORFFFF00; DRAWTEXT(VAR51=33,HIGH*1.06,'34天'),COLORWHITE;STICKLINE(VAR51=54,LOW*0.95,LOW*0.98,8,0),COLORWHITE; DRAWTEXT(VAR51=54,LOW*0.95,'55天'),COLORWHITE;STICKLINE(VAR51=88,HIGH*1.05,HIGH*1.02,8,0),COLOR00FF00; DRAWTEXT(VAR51=88,HIGH*1.06,'89天'),COLORWHITE; STICKLINE(VAR51=143,LOW*0.95,LOW*0.98,8,0),COLORCCFFFF; DRAWTEXT(VAR51=143,LOW*0.95,'144天'),COLORWHITE; STICKLINE(VAR51=232 ,HIGH*1.05,HIGH*1.02,8,0),COLORFF0033; DRAWTEXT(VAR51=232,HIGH*1.06,'233天'),COLORWHITE; STICKLINE(VAR51=376,LOW*0.95,LOW*0.98,8,0),COLORFF9966; DRAWTEXT(VAR51=376,LOW*0.95,'377天'),COLORWHITE;立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2);雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2);惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2);春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2);清明:=FILTER(MONTH=4 AND (DAY=3 OR DAY=6 ),2);谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2);立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2);小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2);芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2);夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2);小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2);大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2);立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2);处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2);白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2);秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2);寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2);霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2);立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2);小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2);大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2);冬至:=FILTER(MONTH=12 AND (DAY=21 OR DAY=23),2);小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2);大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=21),2);GET:ZIG(3,5),COLORWHITE,LINETHICK1;。
艾略特波浪划线通达信指标公式源码
艾略特波浪划线主图:艾略特波浪理论的五浪划线,方便看盘和技术分析X:=5;D:=10;M5:MA(C,X);M10:MA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(CONST(M5)>CONST(M10),HHV(H,T+1),REF(HHV(H,T+1),ST));L1:=IF(CONST(M5)<CONST(M10),LLV(L,ST+1),REF(LLV(L,ST+1),T));H2:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST1-1),REF(HHV(H,T+1),ST2-1)); L3:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T1-1),REF(LLV(L,ST+1),T2-1)); TJ1:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T2) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ2:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ3:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ4:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ5:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T)+1 AND CURRBARSCOUNT<=CONST(ST)+1 AND L=CONST(L1);TJ6:=CONST(M5)>CONST(M10) AND H=CONST(H1) ANDCURRBARSCOUNT<=CONST(ST2);TJ7:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST2) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ8:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ9:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ10:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ11:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST)+1 AND CURRBARSCOUNT<=CONST(T)+1 AND H=CONST(H1);TJ12:=CONST(M5)<CONST(M10) AND L=CONST(L1)ANDCURRBARSCOUNT<=CONST(T2);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=CONST(MAX(MAX(H1,H2),H3));LL:=CONST(MIN(MIN(L1,L2),L3));Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,DOTLINE;DRAWTEXT(TJ7,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z),2)),'元')),COLORGREEN;HH1:=CONST(MAX(H1,MAX(H2,H3)));LL1:=CONST(MIN(MIN(L1,L2),L3));Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,DOTLINE;DRAWTEXT(TJ1,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z1),2)),'元')),COLORMAGENTA;近高:H1,COLORMAGENTA,NODRAW;近低:L1,COLORGREEN,NODRAW;中高:H2,COLORMAGENTA,NODRAW;中底:L2,COLORGREEN,NODRAW;远高:H3,COLORMAGENTA,NODRAW;远底:L3,COLORGREEN,NODRAW;。
通达信指标公式源码(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);。
极致波浪理论主图指标通达信指标公式源码
极致波浪理论主图指标通达信指标公式源码一个波浪理论,手上的指标会在大家的建议之下慢慢的完善指标这东西就要一点点的精细改进,虽然不可能达到百分百的正确率但是综合几个起来看,准确率就有保障了对指标的编写一直没有放弃过,不管大盘怎么变,找到方法才能够赚钱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); PL10:=ZIG(3,13);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); PL20:=ZIG(3,26);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); PL40:=ZIG(3,55);走强一:=BARSLAST(PL5REF(PL5,1)); 走强二:=BARSLAST(PL10REF(PL10,1)); 走强三:=BARSLAST(PL20REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0); ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0); DTJZ5:=IF(PL10REF(PL20,1),COUNT(EN2,走强三),0); ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0); DTJZ10:=IF(PL20REF(PL10,1) AND ZTJD5=1,HIGH*1.02,’⑴’),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,’⑵’),COLOR0000FF; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,’⑶’),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,’⑷’),COLOR0000FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,’⑸’),COLOR0000FF; DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,’【A】’),COLOR00FF00; DRAWT EXT(EX2 AND DTJD10=2,HIGH*1.03,’【B】’),COLOR00FF00; DRAWTEXT(EN3 ANDZTJZ10=1,LOW*0.94,’【C】’),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,’①’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.94,’②’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,’③’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.94,’④’),LINETHICK3,COLOR00FFFF; DMLJ:=HHV(HI GH,120); TY:=CLOSE;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);A:=REF(CLOSE,BARSLAST(HD)); B:=REF(CLOSE,BARSLAST(LD));T1:=BARSLAST(HD)BARSLAST(LD) AND NOT(LD); 波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2; STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2; V AR3:=LLV(HIGH,240);V AR4:=100*(CLOSE-V AR3)/V AR3;V AR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;V AR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;V AR7:=0;V AR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)),7)*100; V AR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)),13)*100; V ARA:=BARSCOUNT(CLOSE);V ARB:=V AR835; V ARC:=V ARB AND COUNT(V ARB,1)=1; V ARD:=EMA(CLOSE,21)-EMA(CLOSE,8); V ARE:=EMA(V ARD,5);V ARF:=TROUGH(3,6,1)LOW+0.04,4,0);V AR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);V AR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);V AR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);V AR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3); V AR19:=EMA(CLOSE,2)-EMA(CLOSE,150); V AR1A:=EMA(V AR19,100); V AR1B:=2*(V AR19-V AR1A);V AR1C:=POW(V AR1B,3)*0.1+POW(V AR1B,1);V AR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE)); V AR1E:=EMA(V AR1D*0.97,3); V AR1F:=(HIGH+LOW+CLOSE)/3;V AR20:=(V AR1F-MA(V AR1F,14))/(0.015*A VEDEV(V AR1F,14));V AR21:=CROSS(V AR1E,LOW); 买点一:=V AR10;买点二:=(V AR11+V AR13+V AR15+V AR17); 卖点一:=(V AR12+V AR14+V AR16+V AR18);V AR22:=买点一AND V ARF AND V ARC AND V AR21 AND V AR40,LOW-0.01,’▲买!’),COLORRED;DRAWTEXT(买点二>0,LOW-0.01,’▲买入待涨’),COLORYELLOW; DRAWTEXT(卖点一>0,HIGH+0.1,’▼快卖欲跌’), COLORWHITE; A1:=BARSCOUNT(CLOSE); AH:=HHV(HIGH,72); AL:=LLV(LOW,72); A0:=(AH-AL)/21; B1:=LOW-A0;DRAWTEXT((A1+0)/15=FLOOR((A1+0)/15),B1-2.5*A0,’▲时窗’),COLORWHITE; V AR51:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1) AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);STICKLINE(V AR51=2,LOW*0.95,LOW*0.98,8,0),COLOR0000FF;DRAWTEXT(V AR51=2,LOW*0.95,’3天’),COLORWHI TE;STICKLINE(V AR51=4,HIGH*1.05,HIGH*1.02,8,0),COLOR9966FF;DRAWTEXT(V AR51=4,HIGH*1.06,’5天’),COLORWHITE; STICKLINE(V AR51=7,LOW*0.95,LOW*0.98,8,0),COLOR00FFFF;DRAWTEXT(V AR51=7,LOW*0.95,’8天’),COLORWHITE;STICKLINE(V AR51=12,HIGH*1.05,HIGH*1.02,8,0),COLORFF33FF;DRAWTEXT(V AR51=12,HIGH*1.06,’13天’),COLORWHITE;STICKLINE(V AR51=20,LOW*0.95,LOW*0.98,8,0),COLOR0066FF;DRAWTEXT(V AR51=20,LOW*0.95,’21天’),COLORWHITE;STICKLINE(V AR51=33,HIGH*1.05,HIGH*1.02,8,0),COLORFFFF00;DRAWTEXT(V AR51=33,HIGH*1.06,’34天’),COLORWHITE; STICKLINE(V AR51=54,LOW*0.95,LOW*0.98,8,0),COLORWHITE;DRAWTEXT(V AR51=54,LOW*0.95,’55天’),COLORWHITE; STICKLINE(V AR51=88,HIGH*1.05,HIGH*1.02,8,0),COLOR00FF00;DRAWTEXT(V AR51=88,HIGH*1.06,’89天’),COLORWHITE; STICKLINE(V AR51=143,LOW*0.95,LOW*0.98,8,0),COLORCCFFFF;DRAWTEXT(V AR51=143,LOW*0.95,’144天’),COLORWHITE; STICKLINE(V AR51=232 ,HIGH*1.05,HIGH*1.02,8,0),COLORFF0033; DRAWTEXT(V AR51=232,HIGH*1.06,’233天’),COLORWHITE; STICKLINE(V AR51=376,LOW*0.95,LOW*0.98,8,0),COLORFF9966;DRAWTEXT(V AR51=376,LOW*0.95,’377天’),COLORWHITE; 立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2); 雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2); 惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2); 春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2); 清明:=FILTER(MONTH=4 AND (DAY=3 OR DAY=6 ),2); 谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2); 立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2); 小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2); 芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2); 夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2); 小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2); 大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2); 立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2); 处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2); 白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2); 秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2); 寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2); 霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2); 立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2); 小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2); 大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2); 冬至:=FILTER(MONTH=12AND (DAY=21 OR DAY=23),2); 小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2); 大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=21),2); DRAWTEXT(立春,HIGH*1.02,’立春’); DRAWTEXT(雨水,HIGH*1.02,’雨水’);DRAWTEXT(惊蛰,HIGH*1.02,’惊蛰’); DRAWTEXT(春分,HIGH*1.02,’春分’); DRAWTEXT_FIX(1,0.00,0.00,0,’送’),COLORYELLOW;。
通达信指标公式源码 低进高出 波段指标 主图源码
{低进高出(主图)}A1 : (EMA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/3,colorwhite; a2 : (EMA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/3,coloryellow; A3 : (EMA(CLOSE,9)+MA(CLOSE,18)+MA(CLOSE,36))/3,colorff00ff; Var2:=1/WINNER(CLOSE);Var3:MA(CLOSE,13);Var4:=100-ABS((CLOSE-Var3)/Var3*100);Var5:=LLV(LOW,75);Var6:=HHV(HIGH,75);Var7:=(Var6-Var5)/100;Var8:=SMA((CLOSE-Var5)/Var7,20,1);Var9:=SMA((OPEN-Var5)/Var7,20,1);VarA:=3*Var8-2*SMA(Var8,15,1);VarB:=3*Var9-2*SMA(Var9,15,1);VarC:=100-VarB;看(我)实力:=(100-VarA);散户:=MA(WINNER(CLOSE*0.95)*100,3);新庄:=(100-IF(Var2>5,IF(Var2<100,Var2,Var4-10),0));VarD:=散户>Var4;VarE:=REF(LOW,1)*0.9;VarF:=LOW*0.9;Var10:=(VarF*VOL+VarE*(CAPITAL-VOL))/CAPITAL;Var11:=EMA(Var10,30);Var12:=CLOSE-REF(CLOSE,1);Var13:=MAX(Var12,0);Var14:=ABS(Var12);Var15:=SMA(Var13,7,1)/SMA(Var14,7,1)*100;Var16:=SMA(Var13,13,1)/SMA(Var14,13,1)*100;Var17:=BARSCOUNT(CLOSE);Var18:=SMA(MAX(Var12,0),6,1)/SMA(ABS(Var12),6,1)*100;Var19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; Var1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;Var1B:=SMA((SMA(Var1A,4,1)-50)*2,3,1);Var1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; Var1D:=SMA(Var1C,4,1);Var1E:=SMA(Var1D,3,1);Var1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;Var20:=Var18<=25 AND Var19<-95 AND Var1F>20 AND Var1B<-30 AND Var1E<30 AND Var11-CLOSE>=-0.25 AND Var15<22 AND Var16<28 AND Var17>50;Var21:=(HIGH+LOW+CLOSE)/3;Var22:=(Var21-MA(Var21,14))/(0.015*AVEDEV(Var21,14));Var23:=(Var21-MA(Var21,70))/(0.015*AVEDEV(Var21,70));Var24:=IF(Var22>=150 AND Var22<200 AND Var23>=150 ANDVar23<200,10,0);Var25:=IF(Var22<=-150 AND Var22>-200 AND Var23<=-150 ANDVar23>-200,-10,Var24);断子绝生:= IF(Var23>=200 AND Var22>=150,15,IF(Var23<=-200 ANDVar22<=-150,-15,Var25))+50;drawtext(Var20,c,'★'),coloryellow;DRAWTEXT(CROSS(Var20,0.5) AND COUNT(Var20=1,10)=1,c*1.01,'有钱不赚傻'), COLORYELLOW;DRAWTEXT(CROSS(VarD,0.5) AND COUNT(VarD=1,10)=1,high*1.01,'高走'),color00ff00;Var26:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;Var27:=REVERSE(Var26);Var28:=SMA(Var26,3,1);波段王:= SMA(Var28,3,1);波段鬼:= SMA(波段王,3,1);DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,low*0.97,'低进'), COLORYELLOW;DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,low*0.99,'★'), COLORYELLOW;DRAWTEXT(CROSS(波段鬼,波段王) AND 波段鬼>75,high*1.01,'高出'),color00ff00;。
通达信指标公式源码 主图趋势画线 源码主图
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) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=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);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 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;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2 AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);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);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T;VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; 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),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。
波浪主图通达信指标公式源码
K:=1;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0); 高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0); AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW; DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORLIRED; DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORYELLOW; DRAWNUMBER(极点保留=1,H,局部极点);DRAWNUMBER(极点保留=-1,L,局部极点),DRAWABOVE;。
通达信指标公式源码 一个非常有用的操盘主图(操盘主图 四方力道 波段主图 先知主图)
趋势线:MA(C,30),DOTLINE COLORFF00CC;IF(趋势线>=REF(趋势线,1),趋势线,DRAWNULL),DOTLINE,COLORYELLOW;回归斜率线A:EMA(SLOPE(C,21)*20+C,42);回归斜率线B:REF(回归斜率线A,2);IF(回归斜率线A>REF(回归斜率线A,1),回归斜率线A,DRAWNULL),COLORRED; IF(回归斜率线A<REF(回归斜率线A,1),回归斜率线A,DRAWNULL),COLORGREEN;IF(回归斜率线B>REF(回归斜率线B,1),回归斜率线B,DRAWNULL),COLORRED; IF(回归斜率线B<REF(回归斜率线B,1),回归斜率线B,DRAWNULL),COLORGREEN;经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;经典K:=SMA(经典RL,3,1); 经典D:=SMA(经典K,3,1); 经典J:=3*经典K-2*经典D;MAHL1:=100*((EMA((H+L)/2,3)-LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L, 20))) /(LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20))));MAHL2:=IF(EMA(C,2)>回归斜率线A ANDMAHL1>0,EMA(C,3),LLV(EMA((H+L)/2,5),30));{A}MAHL3:=IF(EMA(C,2)>回归斜率线A ANDMAHL1>0,LLV(EMA((H+L)/2,5),30),EMA(C,5));{A}{回归斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线A,2),RGB(0,104,154));}{C>昨C红K柱+C>O红K柱C>昨C红K柱C=昨C是跟白色24线C<昨C蓝K柱+C>O红K柱C<昨C蓝K柱}{STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORRED; STICKLINE(C<O AND C>REF(C,1),C,O,3,0),COLORFFCC00;} {STICKLINE(CLOSE> REF(CLOSE,1) ANDC>O ,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) ,H,L,3,1 ),COLOR999999;STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,0 ),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(C<REF(C,1) AND C>O,C,O,3,0),COLORFFCC00;STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,3,0 ),COLOR990000; STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800; STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;}{经典KDJ买:IF(CROSS(经典K,经典D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;经典KDJ买:IF(CROSS(经典K,经典D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;} DRAWICON(CROSS(经典K,经典D),L*0.96,26);{高亮红}回归斜率买:IF(CROSS(EMA(C,3),回归斜率线A),(L-(H-L)/3),DRAWNULL),POINTDOT,COLOR0000FF;{高亮红}回归斜率买_:DRAWICON(CROSS(EMA(C,3),回归斜率线A),L*0.98,1),{买};回归斜率卖:IF(CROSS(回归斜率线A,EMA(C,2)),(H+(H-L)/3),DRAWNULL),POINTDOT,COLOR00CF00;{中绿} 卖:DRAWICON(CROSS(回归斜率线A,EMA(C,2)),H*1.03,2);经典KDJ卖:IF(CROSS(经典D,经典K),(H+(H-L)/2),DRAWNULL),CROSSDOT,LINETHICK3,COLOR00CF00;{中绿}; 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;X2:=LLV(J,2)=LLV(J,8);{DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.99,'★买'),COLORYELLOW; }DRAWICON(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.99,23); VAR6:=REF(C,1);VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100; DRAWTEXT(CROSS(84,VAR7),H*1.01,'逃顶'),COLORYELLOW ;AA:=(REF(H,1)-MAX(REF(C,1),REF(O,1)))/(REF(H,1)-REF(L,1))>0.6 AND (MIN(O,C)-L)/(H-L)>0.6 AND VOL<REF(VOL,1);DRAWTEXT(AA,L*0.99,'揉搓'),COLORRED;C3:=REF(C,1);跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;{DRAWTEXT(跌停,H+0.1,'跌停'),COLORGREEN;}涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;{DRAWTEXT(涨停,L-0.1,'板'),COLORYELLOW;}超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(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;M1:=EMA(EMA(C,21),3);M2:=EMA(EMA(C,34),3);TT2:=CROSS(C,M1)AND CROSS(C,M2);DRAWTEXT(TT2,L*0.96,'阳');四方力道{四方力道}V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);HY1:=REF(EMA(V1,3),1);实时线:MA(CLOSE,1),COLOR006400;神秘线:HY1,COLOR400080;DRAWTEXT(CROSS(CLOSE,HY1),LOW*0.95,'B'),LINETHICK2,COLORYELLOW; DRAWTEXT(CROSS(HY1,CLOSE),HIGH*1.08,'S'),LINETHICK3,COLORWHITE; APP:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));ZL:=IF((CLOSE > OPEN),(APP * (HIGH - LOW)),IF((CLOSE < OPEN),(APP * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2)));SF:=IF((CLOSE > OPEN),(0 - (APP * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (APP * (HIGH - LOW))),(0 - (VOL / 2))));库存能量:=MA((ZL + SF),2);库存平均:=MA((ZL + SF),5);DRAWTEXT(CROSS(库存能量,库存平均),L*0.97,''),COLORFF00FF,LINETHICK4;{波段主图}工作线:=MA(CLOSE,1);趋势线:MA(CLOSE,18)COLORGREEN,LINETHICK2;强势线:MA(CLOSE,3)COLORRED,LINETHICK2;TT2:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);TT1:=REF(EMA(TT2,3),1);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;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA144:EMA(CLOSE,144),POINTDOT,COLORWHITE;MA318:EMA(C,318);AA1:=AMOUNT/VOL;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=VOL<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;F:=100*(C-REF(C,1))/REF(C,1);P1:=IF(C<REF(O,1) AND F<0,1,0);P2:=IF(C<REF(O,2) AND F<0,1,0);TT3:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1 ;TT4:=P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0 ;Z1:=MA(C,13);ZX:=REF(Z1,13/2+1);DRAWICON(CROSS(ZX,C),H*1.01,2);DRAWTEXT(CROSS(工作线,趋势线)AND J<55,LOW,'入')COLORWHITE; DRAWTEXT(CROSS(CLOSE,TT1)AND J<55,LOW,'买'),COLORRED; DRAWTEXT(CROSS(88,RSI),HIGH * 1.02,'顶'),COLOR00FFFF; DRAWTEXT(FF1,L*0.99,'超短'),COLOR00FF00;STICKLINE(TT3,OPEN,CLOSE,3,0),COLORFF00FF;STICKLINE(TT4,OPEN,CLOSE,3,0),COLORGREEN;TT5:=5;V1:=MA(HIGH,30)*1.15;V2:=MA(HIGH,3)*1.03;V3:=MA(LOW,3)*0.97;V4:=MA(LOW,30)*0.85;GET:ZIG(3,TT5)COLORWHITE,LINETHICK3;{先知主图}VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);VAR5:=LLV(LOW,30);VAR6:=HHV(VAR4,30);VAR7:=IF(MA(CLOSE,58),1,0);VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;VAR9:=IF(VAR8>100,100,VAR8);STICKLINE(VAR9>-150,0,VAR9,0.1,0), COLORFF00FF;吸筹指标:(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100,COLOR00FF00; STICKLINE(CROSS(吸筹指标,-24),100,0,1,0), COLORFFFFFF;先知: (CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100, COLORFF00FF;放量拉升:IF(CROSS(吸筹指标,-24),1,0), COLORFFFFFF;获利:STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,60,0,1,0),COLOR0000FF; VARK1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100; VARK2:=REVERSE(VARK1);VARK3:=SMA(VARK1,3,1);波段王:SMA(VARK3,3,1), COLORRED,LINETHICK2;波段鬼:SMA(波段王,2.5,1),COLORYELLOW,LINETHICK2;趋势线:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SM A(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),C OLORFF6666,LINETHICK2;RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K1:SMA(RSV9,3,1);DK1:K1-REF(K1,1),COLORSTICK;出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);STICKLINE( CROSS(趋势线,10),0,73,3,0), COLOR3366FF;DRAWTEXT(IF(CROSS(趋势线,10),100,0),68,'底'),COLORWHITE ; DRAWTEXT(IF(CROSS(10,趋势线),1,0), 10,'钱'),COLOR33FFCC; DRAWTEXT(REF("KDJ.J",1)<0 AND "KDJ.J">0,50,'买'),COLORRED ; DRAWTEXT(CROSS(吸筹指标,-24),80,'底'),COLORWHITE ;RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);短期底部:=LLV(OPEN,30);K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=((3 * K) - (2 * D));AA10:=MA(CLOSE,10);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);VARB:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VARC:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VARD:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VARE:=(((VARB + (2 * VARC)) + (3 * VARD)) / 6);VARF:=MA(VARE,3);STICKLINE((CROSS(J,0) AND (VARF <= (0 - 7))),0,88,2,0),COLORBLUE; DRAWICON((CROSS(J,0) AND (VARF <= (0 - 7))),88,9);VARO2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100; VARO3:=SMA(SMA(VARO2,3,1),3,1);VARO4:=EMA(VARO3,5);VARO5:=LLV(LOW,26);VARO6:=HHV(HIGH,34);VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;STICKLINE(CROSS(VARO4,10) AND VARO4>10,25,0,1,0),COLORYELLOW; 建仓区: IF((VARO7<10),0,20),LINETHICK3 ,COLORRED;。
波浪主图+财务副图指标通达信指标公式源码
波浪主图+财务副图指标波浪主图:K:=1;N:=3;巨浪H:DRAWLINE(H=HHV(H,270),H,L=LLV(L,270),L,0),POINTDOT,LINETHICK4,COLORMAGE NTA;巨浪L:DRAWLINE(L=LLV(L,270),L,H=HHV(H,270),H,0),POINTDOT,LINETHICK4,COLORMAGE NTA;大浪H:DRAWLINE(H=HHV(H,90),H,L=LLV(L,90),L,0),LINETHICK3,COLORRED;大浪L:DRAWLINE(L=LLV(L,90),L,H=HHV(H,90),H,0),LINETHICK3,COLORRED;中浪H:DRAWLINE(H=HHV(H,30),H,L=LLV(L,30),L,0),LINETHICK2,COLORLIBLUE;中浪L:DRAWLINE(L=LLV(L,30),L,H=HHV(H,30),H,0),LINETHICK2,COLORLIBLUE;小浪H:DRAWLINE(H=HHV(H,10),H,L=LLV(L,10),L,0),COLORWHITE;小浪L:DRAWLINE(L=LLV(L,10),L,H=HHV(H,10),H,0),DOTLINE,COLORWHITE;ZLH:=STRCAT('顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,30))),0));ZLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,30))),0));ZLTS:=STRCAT('中浪:',STRCAT(ZLH,ZLL));DLH:=STRCAT(' 顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,90))),0));DLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,90))),0));DLTS:=STRCAT('大浪:',STRCAT(DLH,DLL));LXTS:=STRCAT('浪型天数:',STRCAT(ZLTS,DLTS));DRAWTEXT_FIX(ISLASTBAR=1,0,0,0,LXTS),COLORWHITE;T:=10*3*N;A:=H=HHV(H,T) AND HHV(H,T)>REF(HHV(H,T),1);B:=L=LLV(L,T) AND LLV(L,T)<REF(LLV(L,T),1);WAVE1:=DRAWLINE(A,H,B,L,0);WAVE2:=DRAWLINE(B,L,A,H,0);ZG:=IF(WAVE1<REF(WAVE1,1) OR WAVE1=WAVE2,WAVE1,WAVE2),COLORMAGENTA; 峰:=WAVE2=WAVE1 AND A;谷:=WAVE2=WAVE1 AND B;峰峰天:=BARSLAST(峰)+1;谷谷天:=BARSLAST(谷)+1;D1:=HHV(H,T)>REF(HHV(H,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D2:=LLV(L,T)<REF(LLV(L,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D3:=IF(谷OR D2,峰峰天,IF(峰OR D1,谷谷天,DRAWNULL));D4:=IF(谷OR D2,L*0.99,IF(峰OR D1,H*1.01,DRAWNULL));DRAWNUMBER(D3>0 AND K=1,D4,SUM("HSL.HSL",D3)),COLORGREEN;财务副图:DRAWRECTREL(0,0,990,990,RGB(20,18,12));DRAWTEXT_FIX(1,0.14,0.01,1,'股东股份:'),COLORRED;品种类型:=FINANCE(3);所属板块:=HYBLOCK;上市天数:=FINANCE(42);股总市值:=ROUND(FINANCE(41)/100000000);流通市值:=ROUND(FINANCE(40)/100000000);股东人数:=FINANCE(8);人均持股:=ROUND(FINANCE(7)/FINANCE(8));DRAWTEXT_FIX(1,0.14,0.15,1,'品种类型:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.25,1,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.35,1,'上市天数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.45,1,'股总市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.55,1,'流通市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.65,1,'股东人数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.75,1,'人均持股:'),COLORYELLOW;DRAWTEXT_FIX(1,0.23,0.25,1,HYBLOCK),COLORLIGREEN;DRAWNUMBER_FIX(1,0.2,0.35,1,上市天数),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.45,1,股总市值),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.55,1,流通市值),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.65,1,股东人数),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.75,1,人均持股),COLORWHITE;DRAWTEXT_FIX(品种类型=1,0.23,0.15,1,'沪深A 股'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=2,0.23,0.15,1,' 中小板'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=3,0.23,0.15,1,' 创业板'),COLORMAGENTA; DRAWTEXT_FIX(1,0.23,0.35,1,'天'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.45,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.55,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.65,1,'人'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.75,1,'股'),COLORCYAN;DRAWTEXT_FIX(1,0.326,0.01,1,'业绩指标:'),COLORRED;净资收益率:=(FINANCE(33)/FINANCE(34)*100);销售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);净利润比率:=(FINANCE(30)/FINANCE(20)*100);主营利润率:=(FINANCE(23)/FINANCE(20)*100);优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};净利同增率:=FINANCE(43);DRAWTEXT_FIX(1,0.34,0.15,1,'净资收益率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.25,1,'销售毛利率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.35,1,'净利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.45,1,'主营利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.55,1,'优质资产率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.65,1,'现金负债比:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.75,1,'净利同增率:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.4,0.15,1,净资收益率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.25,1,销售毛利率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.35,1,净利润比率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.45,1,主营利润率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.55,1,优质资产率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.65,1,现金负债比),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.75,1,净利同增率),COLORWHITE;DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;市净率:=CONST(DYNAINFO(7) / FINANCE(34));市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));每股收益年:=CONST(FINANCE(33));每股现金流:=CONST((FINANCE(25)/FINANCE(1)));每股未分配:=CONST(FINANCE(32));每股公积金:=CONST(FINANCE(18));DRAWTEXT_FIX(1,0.51,0.15,1,'市净率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.25,1,'市销率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.35,1,'每股收益季:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.45,1,'每股收益年:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.55,1,'每股现金流:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.65,1,'每股未分配:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.75,1,'每股公积金:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.57,0.15,1,市净率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.25,1,市销率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.35,1,每股收益季),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益年),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.55,1,每股现金流),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.65,1,每股未分配),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.75,1,每股公积金),COLORWHITE;{风险系数}X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替} X3:=FINANCE(23)/FINANCE(10)*3.3;X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}X5:=FINANCE(20)/FINANCE(15)*0.999;Z值:=X1+X2+X3+X4+X5;DRAWTEXT_FIX(1,0.85,0.01,1,'财务预警:'),COLORRED;DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重警●'),COLORLIRED;DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻警○'),COLOR0099FF; DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无警◎'),COLORLIGREEN;LC:=REF(CLOSE,1);WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;获利筹码:=CONST(WINNER(C)*100);SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=(IF(SAT>1,1,SAT)*100);WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃:=(WRSI-WR10);活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));DRAWTEXT_FIX(1,0.74,0.15,1,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.35,1,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.55,1,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORYELLOW;DRAWRECTREL(970,340,580,270,RGB(150,10,250));DRAWRECTREL(970,470,580,540,RGB(150,10,250));DRAWRECTREL(970,670,580,740,RGB(150,10,250));DRAWRECTREL(970,340,580+CONST(量能饱和*(970-580)/100),270,RGB(0,100,0)); DRAWRECTREL(970,470,580+CONST(活跃度比*(970-580)/100),540,RGB(0,100,0)); DRAWRECTREL(970,670,580+CONST(获利筹码*(970-580)/100),740,RGB(0,100,0)); DRAWTEXT_FIX(1,0.96,0.01,1,'大盘趋势:'),COLORRED;DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.16,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.11,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.16,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.11,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX(1,0.87,0.85,1,''),COLORYELLOW;。
波段线主图源码通达信指标公式源码
神奇的波段指标红绿线表示多空波段包含了短期支撑压力提示BS和止损价还加入了一个单阳不破的提示会提示用到未来数据,是画线时使用的,不影响其他{波段线(通达信主图)}N:=20;N1:=7;N2:=79;MA7:MA(C,7),COLORMAGENTA,LINETHICK2;MA89:MA(C,89),COLORBLUE,LINETHICK2;VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;A1:=(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4; A2:=EMA(A1,2);A3:=EMA(A2,2);A4:=EMA(A3,2);A5:=EMA(A4,2);A6:=EMA(A5,2);A7:=EMA(A6,2);IF(A1>REF(A1,1),A1,DRAWNULL),COLORRED;IF(A1<REF(A1,1),A1,DRAWNULL),COLORGREEN;IF(A2>REF(A2,1),A2,DRAWNULL),COLORRED;IF(A2<REF(A2,1),A2,DRAWNULL),COLORGREEN;IF(A3>REF(A3,1),A3,DRAWNULL),COLORRED;IF(A3<REF(A3,1),A3,DRAWNULL),COLORGREEN;IF(A4>REF(A4,1),A4,DRAWNULL),COLORRED;IF(A4<REF(A4,1),A4,DRAWNULL),COLORGREEN;IF(A5>REF(A5,1),A5,DRAWNULL),COLORRED;IF(A5<REF(A5,1),A5,DRAWNULL),COLORGREEN;IF(A6>REF(A6,1),A6,DRAWNULL),COLORRED;IF(A6<REF(A6,1),A6,DRAWNULL),COLORGREEN;IF(A7>REF(A7,1),A7,DRAWNULL),COLORRED;IF(A7<REF(A7,1),A7,DRAWNULL),COLORGREEN;压力:HHV(MA((L+H+C)/3,5),60),COLORCYAN,LINETHICK2;JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);DRAWICON(REF(A<B,1) AND A>B,L*0.98,1);{DRAWTEXT(REF(A<B,1) AND A>B,L,'--------------B'), COLORYELLOW;}M3:=EMA(CLOSE,3);M8:=EMA(CLOSE,8);M13:=EMA(M8,13);M55:=EMA(M8,55);VAR1B:=EMA(M13,55);M81:=EMA(M55,81);M6:=EMA(VAR1B,144), COLORRED,LINETHICK2;VAR2B:=(REF(HIGH,1)+REF(LOW,1))/2;VAR3B:=MA(CLOSE,N)+2*STD(CLOSE,N);DRAWICON(CROSS(VAR2B,VAR3B),HIGH+0.1,2);VAR4B:=REF(CLOSE,1);VAR5B:=SMA(MAX(CLOSE-VAR4B,0),N1,1)/SMA(ABS(CLOSE-VAR4B),N1,1)*100; VAR6B:=CROSS(N2,VAR5B);VAR7B:=FILTER(VAR6B,4);DRAWICON(VAR7B,HIGH+0.1,2);ZTJZ:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(ZTJZ AND COUNT(ZTJZ,13)>=1,C,O,1,0),COLORYELLOW; DRAWTEXT(ZTJZ AND COUNT(ZTJZ,13)>=1,H*1.015,''),COLORYELLOW,LINETHICK1; DRAWTEXT(ZTJZ AND COUNT(ZTJZ,13)>=1,H*1.028,''),COLORYELLOW;YZFZ:=4;YBLZ:=1.90;DYKX:=C>O*(1+YZFZ/100) AND VOL>REF(VOL,1)*YBLZ;LS0:=BARSLAST(DYKX);BPJZ:=REF(L,LS0);DRAWTEXT(DYKX,L-L*0.02,'阳'),COLOR00FFFF;WZX1:=BPJZ *0.998;WZX2:=BPJZ *0.98;LS11:=IF(1,LS0=1,DYKX);LS21:=IF(1,LLV(L,1)>REF(L,1),1);DYBP:=LS11 AND LS21;STICKLINE(DYBP,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP,WZX2,'1'),COLORGREEN;LS12:=IF(2,LS0=2,DYKX);LS22:=IF(2,LLV(L,2)>REF(L,2),1);DYBP2:=LS12 AND LS22;STICKLINE(DYBP2,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP2,WZX2,'2'),COLORGREEN;LS13:=IF(3,LS0=3,DYKX);LS23:=IF(3,LLV(L,3)>REF(L,3),1);DYBP3:=LS13 AND LS23;STICKLINE(DYBP3,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP3,WZX2,'3'),COLORGREEN;LS14:=IF(4,LS0=4,DYKX);LS24:=IF(4,LLV(L,4)>REF(L,4),1);DYBP4:=LS14 AND LS24;STICKLINE(DYBP4,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP4,WZX2,'4'),COLORGREEN;LS15:=IF(5,LS0=5,DYKX);LS25:=IF(5,LLV(L,5)>REF(L,5),1);DYBP5:=LS15 AND LS25;STICKLINE(DYBP5,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP5,WZX2,'5'),COLORGREEN;LS16:=IF(6,LS0=6,DYKX);LS26:=IF(6,LLV(L,6)>REF(L,6),1);DYBP6:=LS16 AND LS26;STICKLINE(DYBP6,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP6,WZX2,'6'),COLORGREEN;LS17:=IF(7,LS0=7,DYKX);LS27:=IF(7,LLV(L,7)>REF(L,7),1);DYBP7:=LS17 AND LS27;STICKLINE(DYBP7,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP7,WZX2,'7'),COLORGREEN;LS18:=IF(8,LS0=8,DYKX);LS28:=IF(8,LLV(L,8)>REF(L,8),1);DYBP8:=LS18 AND LS28;STICKLINE(DYBP8,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP8,WZX2,'8'),COLORGREEN;LS19:=IF(9,LS0=9,DYKX);LS29:=IF(9,LLV(L,9)>REF(L,9),1);DYBP9:=LS19 AND LS29;STICKLINE(DYBP9,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP9,WZX2,'9'),COLORGREEN;LS110:=IF(10,LS0=10,DYKX);LS210:=IF(10,LLV(L,10)>REF(L,10),1);DYBP10:=LS110 AND LS210;STICKLINE(DYBP10,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP10,WZX2,'10'),COLORGREEN;DIF:=EMA(CLOSE,8)-EMA(CLOSE,13);DEA:=EMA(DIF,6);TCMACD:=2*(DIF-DEA);GD1:=EVERY(DIF>REF(DIF,1),BARSLASTCOUNT(DIF>DEA))AND DIF>DEA;GD2:=EVERY(TCMACD>REF(TCMACD,1),BARSLASTCOUNT(DIF>DEA))AND DIF>DEA; GD:=MAX(GD1,GD2);GDWZ1:=REF(MAX(C,O),BARSLAST(GD1)+1);GDWZ2:=REF(MAX(C,O),BARSLAST(GD2)+1);GDWZ:=IF(GDWZ2>=GDWZ1,GDWZ2,GDWZ1);AA:=HHV(IF(C>O,C,MAX(C,O)),BARSLASTCOUNT(GDWZ)+1)=HHV(IF(C>O,C,MAX(C,O)) ,BARSLASTCOUNT(BBI>REF(BBI,1)AND C>BBI));AA1:=REF(CLOSE,1);压力2:DRAWLINE(BARSLAST(AA)=0,IF(C>O,C,MAX(C,O)),BARSNEXT(AA),REF(IF(C>O,C,MAX (C,O)),BARSLAST(AA)),1),DOTLINE,COLORYELLOW;LD1:=EVERY(DIF<REF(DIF,1),BARSLASTCOUNT(DIF<DEA))AND DIF<DEA;LD2:=EVERY(TCMACD<REF(TCMACD,1),BARSLASTCOUNT(DIF<DEA))AND DIF<DEA; LD:=MIN(LD1,LD2);DDWZ1:=REF(MIN(C,O),BARSLAST(LD1)+1);DDWZ2:=REF(MIN(C,O),BARSLAST(LD2)+1);DDWZ:=IF(DDWZ2<=DDWZ1,DDWZ1,DDWZ2);BB:=LLV(IF(C<O,C,MIN(C,O)),BARSLASTCOUNT(LD)+1)=LLV(IF(C<O,C,MIN(C,O)),BARS LASTCOUNT(DIF<REF(DIF,1) AND BBI<REF(BBI,1)}AND L<BBI));ZCWZ:DRAWLINE(BARSLAST(BB)=0,IF(C<O,C,MIN(C,O)),BARSNEXT(BB),REF(IF(C<O,C, MIN(C,O)),BARSLAST(BB)),1),DOTLINE,COLORGREEN;DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95*1.015,HHV(C,5)*0.95),COLORWHITE; STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,50,0),COLORWHITE;DRAWTEXT(ISLASTBAR,HHV(C,5)*0.95*0.99,'止损价位'),COLORWHITE;MA60:=MA(C,60);GLV60:=(C-MA60)/MA60*100;DRAWTEXT_FIX(1,0.05,0.1,0,STRCAT('乖离率: ',CON2STR(GLV60,2))),COLORYELLOW; DRAWTEXT_FIX(1,0.15,0.1,0,STRCAT(DYBLOCK,STRCAT('--',STRCAT(HYBLOCK,STRCAT( '--',GNBLOCK))))),COLORYELLOW;DRAWTEXT_FIX(1,0.05,0.15,0,STRCAT('市盈率:',CON2STR(DYNAINFO(39),2))),COLORRED;DRAWTEXT_FIX(1,0.15,0.15,0,STRCAT('市净率:',CON2STR(C/FINANCE(34),2))),COLORRED;。
波浪买卖主图通达信指标公式源码
波浪理论的理论基础相当简单,但投资者常常困惑的是如何定位和实际运用。
本技术指标利用移动平均线、随机指标、指数平滑异同移动平均指标,帮助投资者分辨调整浪与攻击浪的形态。
对于已经具有波浪理论基础的投资者,透过这个指标将可以更深入地了解波浪理论,并能将其熟练地运用于实际交易中。
均衡:=IF (YEAR<=2017,IF(YEAR<2017, EMA(EMA(CLOSE,5),5),IF(YEAR=2017 AND MONTH<10, EMA(EMA(CLOSE,5),5),1000)),1000);中轨:=HHV(MA(HIGH,13),13);趋势:=LLV(MA(HIGH,13),1);VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*10 0;VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;VAR2:=REF(VAR1,1);VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;VAR4:=(IF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1=LLV(VAR1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0));VAR5:=(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND CLOSE>REF(CLOSE,1));趋势向上:=IF (MA(CLOSE,1)>MA(CLOSE,2) AND MA(CLOSE,2)>MA(CLOSE,3),1,0);出击A:=IF (VAR5 AND 趋势向上,100,0);均衡A:=BARSLAST(出击A>0);A:=REF(均衡A,1)>5 AND 出击A>0;CALF:=EMA((C/REF(C,10)-1)*100,5);CALF1:=EMA((C/REF(C,10)-1)*100,30);CALF2:=EMA((C/REF(C,10)-1)*100,120);CALF3:=CROSS(CALF,CALF1);B1F:=IF (YEAR>2005 AND CALF3>0,1,0);D1F:=IF(REF(CLOSE,1)<REF(OPEN,1),1,0);C1F:=IF((CLOSE-REF(CLOSE,1))/CLOSE*100>3.6,1,0);AFF:=IF(B1F AND C1F AND D1F ,1,0);FLY1:=FORCAST(CLOSE,8);FLY2:=HHV(FLY1,18);FLY3:=EMA(COST(5),17);FLY4:=(CLOSE+OPEN)*0.75/2;FLY5:=CROSS(FLY3,FLY4);CBPZ:=IF (A OR AFF OR FLY5,1,0);CBPYY:=BARSLAST(CBPZ>0);ZJMR1:=REF(CBPYY,1)>5 AND CBPZ>0;ZJMR2:=IF (CROSS(ZIG(3,7),REF(ZIG(3,7),1)),1,0);HHH:=30;CCVAR2:=REF(LOW,1);CCVAR3:=SMA(ABS(LOW-CCVAR2),3,1)/SMA(MAX(LOW-CCVAR2,0),3,1)*100; CCVAR4:=EMA(IF(CLOSE*1.2,CCVAR3*10,CCVAR3/10),3);CCVAR5:=LLV(LOW,HHH);CCVAR6:=HHV(CCVAR4,HHH);CCVAR7:=IF(LLV(LOW,58),1,0);CCVAR8:=EMA(IF(LOW<=CCVAR5,(CCVAR4+CCVAR6*2)/2,0),3)/618*CCVAR7; DY11:=(2*CLOSE+HIGH+LOW)/4;DY12:=LLV(LOW,34);DY13:=HHV(HIGH,13);A11:=MA((DY11-DY12)/(DY13-DY12)*100,13);B11:=EMA((0.668*REF(A11,1)+0.333*A11),2);DY1:=(2*CLOSE+HIGH+LOW)/4;DY2:=LLV(LOW,34);DY3:=HHV(HIGH,13);DYA:=EMA((DY1-DY2)/(DY3-DY2)*100,30);DYB:=EMA(DYA,7);A1:=EMA((DY1-DY2)/(DY3-DY2)*100,9);B1:=EMA((0.667*REF(A1,2)+0.333*A1),2);买入:=IF(CROSS(A1,B1)AND A1<25,35,0);关注A:=IF (YEAR<=2017,IF(YEAR<2017, IF(CROSS(A11,B11)ANDA11<25,40,20),IF(YEAR=2017 AND MONTH<10, IF(CROSS(A11,B11)AND A11<25,40,20),1000)),1000);CCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);CCCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);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(AF>BF,AF,BF,6,0),COLORYELLOW;STICKLINE(AF<BF,AF,BF,6,0),COLORGREEN;。
波段主图指标通达信指标公式源码
青云直上的主图指标里添加了波段,对操作有一定的指导意义。
在此分享给大家。
AA05:MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=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),LINETHICK0;STICKLINE(BB05>30 AND AA05>REF(AA05,1),AA05,REF(AA05,1),3,1),COLORCYAN;AA10:MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416; STICKLINE(BB05<0AND AA05<REF(AA05,1),AA05,REF(AA05,1),3,1),COLORYELLOW;AA30:MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;VAR1:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR2:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) ANDAA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;STICKLINE(BB30>15 ANDAA30>REF(AA30,1),AA30,REF(AA30,1),3,1),COLORFF00FF;强势狙击:=FILTER(BB30>30 AND BB10>45 ANDCROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 ANDAA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) ANDAA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10);清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) ANDAA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10<REF(AA10,1),10);DRAWTEXT(加仓,LOW*0.98,'←加仓'),COLORRED;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10>REF(AA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) ANDAA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;买入:=FILTER(MR,10);DRAWTEXT(减仓,HIGH*1.02,'←减仓'),COLORCYAN; DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;DRAWTEXT(清仓,HIGH*1.02,'←清仓'),COLORGREEN;DRAWTEXT(强势狙击,LOW*0.98,'←强势狙击'),COLORYELLOW;VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL* 100*50;。
通达信指标公式源码极品主图(主图 源码)
PT := REF(HIGH,1)-REF(LOW,1);重心:(HIGH + LOW + CLOSE)/3,NODRAW;压力Ⅰ: 2*重心-LOW,NODRAW;压力Ⅱ:重心+ PT,NODRAW;支撑Ⅰ:2*重心-HIGH,NODRAW;支撑Ⅱ: 重心- PT,NODRAW;MA5:MA(C,5),COLOR888899;MA20:MA(C,20),COLOR0099FF;MA30:MA(C,30),COLORYELLOW;MA60:MA(C,60),COLOR00FF00;MA250:MA(C,250),COLOR0099FF;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),'B'),COLORBDB76B;X1:=(C+L+H)/3;DD:=TOTALCAPITAL;SS:=FINANCE(7);GG:=FINANCE(33);TH:=DYNAINFO(39);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),'S'),COLORGREEN;双线持币:HHV(MA(HIGH,(3)),2),LINETHICK2,COLOR00FF00;单线持股:LLV(MA(HIGH,(3)),1),LINETHICK2,COLOR0000FF;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-2 0;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 ANDVAR14<200,10,0);VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 ANDVAR14>-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 ANDVAR13<=-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;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=60,AAA-(AAA*0.03),'量能理想,明显走强,中线参与,仓位在2/3左右'),COLORFF00FF ; DRAWTEXT(T2=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'走势趋强,还显不足,短线进场,仓位在1/2左右'),COLORFF00FF ; DRAWTEXT(T3=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'量价良好,没有明显走强,短线进场,仓位1/2左右'),COLORFF00FF ; DRAWTEXT(T4=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'形态尚可,量能不足,未完全走强,短线参与,仓位1/3左右'),COLORFF00FF ; DRAWTEXT(T5=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'形态变坏,重仓者减持大半,清仓者观望'),COLORFF00FF ;DRAWTEXT(T6=1 AND CURRBARSCOUNT=60,AAA*0.98,'随大盘一起下跌,明显缩量走势,考虑到风险,减持或清仓'),COLORFF00FF ; DRAWTEXT(T7=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'该股放量下跌,走势明显偏弱,离场观望'),COLORFF00FF ;DRAWTEXT(T8=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'该股缩量下跌,走势偏弱,离场观望。
通达信通道主图指标通达信指标源码公式
MID_TDMS:=(3*C+L+H)/5;波动中枢:=EMA(EMA(EMA(MID_TDMS,20),2),2),POINTDOT;BDUP:=REF(HHV(100*(HIGH-波动中枢)/波动中枢,120),1),NODRAW; BDDN:=REF(LLV(100*(LOW-波动中枢)/波动中枢,120),1),NODRAW;顶:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDUP/100),2),2),2);底:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDDN/100),2),2),2);地线:=底;中线:=REF(波动中枢,1);天线:=顶;绘图范围:=IFF(BARSCOUNT(CLOSE)>120,1,0);STICKLINE(绘图范围,地线,地线+(中线-地线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,地线,地线+(中线-地线)*(19/20),11,0),COLOR000008; STICKLINE(绘图范围,地线,地线+(中线-地线)*(18/20),11,0),COLOR000010; STICKLINE(绘图范围,地线,地线+(中线-地线)*(17/20),11,0),COLOR000018; STICKLINE(绘图范围,地线,地线+(中线-地线)*(16/20),11,0),COLOR000020; STICKLINE(绘图范围,地线,地线+(中线-地线)*(15/20),11,0),COLOR000028; STICKLINE(绘图范围,地线,地线+(中线-地线)*(14/20),11,0),COLOR000030; STICKLINE(绘图范围,地线,地线+(中线-地线)*(13/20),11,0),COLOR000038; STICKLINE(绘图范围,地线,地线+(中线-地线)*(12/20),11,0),COLOR000040; STICKLINE(绘图范围,地线,地线+(中线-地线)*(11/20),11,0),COLOR000048; STICKLINE(绘图范围,地线,地线+(中线-地线)*(10/20),11,0),COLOR000050; STICKLINE(绘图范围,地线,地线+(中线-地线)*(9/20),11,0),COLOR000058; STICKLINE(绘图范围,地线,地线+(中线-地线)*(8/20),11,0),COLOR000060; STICKLINE(绘图范围,地线,地线+(中线-地线)*(7/20),11,0),COLOR000068; STICKLINE(绘图范围,地线,地线+(中线-地线)*(6/20),11,0),COLOR000070; STICKLINE(绘图范围,地线,地线+(中线-地线)*(5/20),11,0),COLOR000078; STICKLINE(绘图范围,地线,地线+(中线-地线)*(4/20),11,0),COLOR000080; STICKLINE(绘图范围,地线,地线+(中线-地线)*(3/20),11,0),COLOR000088; STICKLINE(绘图范围,地线,地线+(中线-地线)*(2/20),11,0),COLOR000090; STICKLINE(绘图范围,地线,地线+(中线-地线)*(1/20),11,0),COLOR000098; STICKLINE(绘图范围,天线,天线-(天线-中线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(19/20),11,0),COLOR080800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(18/20),11,0),COLOR101000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(17/20),11,0),COLOR181800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(16/20),11,0),COLOR202000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(15/20),11,0),COLOR282800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(14/20),11,0),COLOR303000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(13/20),11,0),COLOR383800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(12/20),11,0),COLOR404000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(11/20),11,0),COLOR484800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(10/20),11,0),COLOR505000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(9/20),11,0),COLOR585800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(8/20),11,0),COLOR606000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(7/20),11,0),COLOR686800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(6/20),11,0),COLOR707000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(5/20),11,0),COLOR787800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(4/20),11,0),COLOR808000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(3/20),11,0),COLOR888800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(2/20),11,0),COLOR909000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(1/20),11,0),COLOR989800;回归上限:IFF(绘图范围,天线,DRAWNULL),COLOR989800,LINETHICK2;回归下限:IFF(绘图范围,地线,DRAWNULL),COLOR000098,LINETHICK2;上涨偏离度:=100*(HIGH-波动中枢)/波动中枢,NODRAW;下跌偏离度:=100*(LOW-波动中枢)/波动中枢,NODRAW;STICKLINE(绘图范围AND CLOSE>OPEN,HIGH,CLOSE,0,0),COLORRED;STICKLINE(绘图范围AND CLOSE>OPEN,LOW,OPEN,0,0),COLORRED;STICKLINE(绘图范围AND CLOSE>OPEN,CLOSE,OPEN,3,1),COLORRED;STICKLINE(绘图范围AND CLOSE==OPEN,HIGH,LOW,0,0),COLORWHITE; STICKLINE(绘图范围AND CLOSE==OPEN,CLOSE,OPEN,3,0),COLORWHITE; STICKLINE(绘图范围AND CLOSE<OPEN,HIGH,LOW,0,0),COLORGREEN;STICKLINE(绘图范围AND CLOSE<OPEN,CLOSE,OPEN,3,0),COLORGREEN;波动敞口:((回归上限-波动中枢)/波动中枢+(波动中枢-回归下限)/波动中枢)*100,NODRAW,COLOR00C6FF;涨过头:=IFF(HIGH>回归上限,1,0);跌过头:=IFF(LOW<回归下限,1,0);风险标记:IFF(涨过头,CLOSE,DRAWNULL),NODRAW,COLORCYAN;机会标记:IFF(跌过头,CLOSE,DRAWNULL),NODRAW,COLORYELLOW;DRAWICON(涨过头,HIGH*1.01,2);DRAWICON(跌过头,LOW*0.99,1);VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*10 0;逃顶:=IFF(CROSS(84,VARC) AND 上涨偏离度>20,1,0),NODRAW;VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;VAR2:=REF(VAR1,1);VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;VAR4:=FILTER(IFF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1==LLV(VAR1,10),10)>=1AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0),5);抄底:=IFF(VAR4 AND EXIST(下跌偏离度*(-1)>15,3),1,0);DRAWICON(绘图范围AND 逃顶,HIGH*1.02,14);DRAWICON(绘图范围AND 抄底,LOW*0.98,13);DRAWTEXT(绘图范围AND 逃顶,MAX(H*1.05,回归上限*1.03),'逃'),COLORCYAN; DRAWTEXT(绘图范围AND 抄底,MIN(LOW*0.995,回归下限),'抄'),COLORYELLOW;。
波浪操作主图公式通达信指标公式源码
通达信主图公式,公式的名称叫做”波浪操作主图“,买点、卖点都有标注,基金入场,基金清仓都有提示,根据提示来操作,当然,还要结合大盘环境,成交量等其它指标综合分析,一个指标公式做不到尽善尽美,美中不足的是,这个指标有未来函数,信号有漂移{波浪操作主图公式};波浪线:ZIG(C,13),LINETHICK1,COLORYELLOW;DRAWTEXT(CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1)) ,LOW*0.999,'↖买'),COLORYELLOW; DRAWTEXT(CROSS(REF(ZIG(3,5),1),ZIG(3,5)) ,HIGH*1.002,'↙卖'),COLORGREEN;ZJ1953:=ZIG(C,15);粉丝:=MA(ZJ1953,3);DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'↖基金入场'),COLORMAGENTA; DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'←基金清仓'),COLORFFFFFF;阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*RE F(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,1 4)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;主力成本线:EMA(X,13),COLORMAGENTA,LINETHICK0;DRAWTEXT_FIX(1,0.00,0.920,0,'操作前先来回敲敲电脑的↑↓键'),COLOR00EEFF;{加入,轨迹主图};UR:=2;{调节轨迹宽度}; LR:=4;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)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}LR1:=FORCAST(C,NOD+1);NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,M IN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8,NODRAW;{近点}{隐藏}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;{远点}{隐藏}EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;{隐藏}AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC1!=DRAWNULL)+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)) );{限制高}RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)) );{限制低}中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR66666 6,LINETHICK2;上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR6666 66,LINETHICK2;下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLOR6666 66,LINETHICK2;VAR1:=(C+H+O+L)/4;顶阴影线:=XMA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'↙逃'),COLORGREEN;。
通达信波浪顶箱体主图指标公式
通达信波浪顶箱体主图指标公式TY:=H;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),1 0),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10), 10+1),10);A:=REF(H,BARSLAST(HD));B:=REF(H,BARSLAST(LD));T1:=BARSLAST(HD);T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORGREEN,POINTDOT,LINETHICK1;DRAWNUMBER(波浪顶!=REF(波浪顶,1),H,波浪顶),COLORF00FF0;STICKLINE(T1,A,A,9,0){,POINTDOT},COLORF00FF0,LINETHIC K1;波浪底:=IF(T2,B,B),COLORGREEN{,POINTDOT},LINETHICK1;STICKLINE(T2,B,B,9,0){,POINTDOT},COLORCYAN,LINETHICK1;QA12:=REF(CLOSE,6)=LLV(CLOSE,2*6+1);QB12:=BACKSET(QA12,6+1);QC12:=FILTER(QB12,6) AND CLOSE=LLV(CLOSE,6+1);QD12:=BARSLAST(QC12);QE12:=IF(QC12,CURRBARSCOUNT,0);QF12:=IF(QD12,REF(QE12,QD12),QE12);QG12:=CONST(QF12);支撑1:=DRAWLINE(CURRBARSCOUNT=QG12,CLOSE,ISLASTBAR,REF( CLOSE,QG12-1),1),COLOR00FF00,LINETHICK1;DRAWNUMBER(支撑1!=REF(支撑1,1),C,支撑1),COLOR00FF00;DRAWNUMBER(ISLASTBAR,支撑1,支撑1),COLOR00FF00;QA14:=REF(CLOSE,3)=LLV(CLOSE,2*3+1);QB14:=BACKSET(QA14,3+1);QC14:=FILTER(QB14,3) AND CLOSE=LLV(CLOSE,3+1);QD14:=BARSLAST(QC14);QE14:=IF(QC14,CURRBARSCOUNT,0);QF14:=IF(QD14,REF(QE14,QD14),QE14);QG14:=CONST(QF14);支撑2:=DRAWLINE(CURRBARSCOUNT=QG14,CLOSE,ISLASTBAR,REF( CLOSE,QG14-1),1),COLOR00FF00,LINETHICK1;{DRAWNUMBER(支撑2!=REF(支撑2,1),L,支撑2),COLOR00FF00;};STICKLINE(C>支撑1,支撑1,波浪顶,15,1),COLOR005599,LINETHICK2;{箱体画框}STICKLINE(C>支撑2,支撑2,波浪顶,5,1),COLOR005599,LINETHICK2;{箱体画框}STICKLINE(C>支撑1,支撑1,(波浪顶+支撑1)/2,15,1),COLOR005599,LINETHICK2;{箱体画框}QA11:=REF(CLOSE,6)=HHV(CLOSE,2*6+1);QB11:=BACKSET(QA11,6+1);QC11:=FILTER(QB11,6) AND CLOSE=HHV(CLOSE,6+1);QD11:=BARSLAST(QC11);QE11:=IF(QC11,CURRBARSCOUNT,0);QF11:=IF(QD11,REF(QE11,QD11),QE11);QG11:=CONST(QF11);颈线2:DRAWLINE(CURRBARSCOUNT=QG11,CLOSE,ISLASTBAR,REF(C ,QG11-1),1),COLORFFDD00,LINETHICK1;STICKLINE(C>支撑1,支撑1,颈线2,5,1),COLORFFAA33;{箱体画框}STICKLINE(C>支撑1,支撑1,(颈线2+支撑1)/2,5,1),COLORFFAA33;{箱体画框}DRAWKLINE(H,O,L,C);DRAWNUMBER(颈线2!=REF(颈线2,1),C,颈线2),COLOR00FF00;DRAWNUMBER(ISLASTBAR,波浪顶,波浪顶),COLOR005599;DRAWNUMBER(ISLASTBAR,(波浪顶+支撑1)/2,(波浪顶+支撑1)/2),COLOR005599;DRAWNUMBER(ISLASTBAR,颈线2,颈线2),COLORFFAA33;DRAWNUMBER(ISLASTBAR,(颈线2+支撑1)/2,(颈线2+支撑1)/2),COLORFFAA33;T1B:=CONST(LLVBARS(LOW,10));T1HIGH:=CONST(REF(HIGH,T1B));CCC:=CONST(CURRBARSCOUNT);T2B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T1B AND H>T1HIGH));T2HIGH:=CONST(REF(HIGH,T2B));T3B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T2B AND HIGH>T2HIGH));T3HIGH:=CONST(REF(HIGH,T3B));抢钱10:DRAWLINE(CURRBARSCOUNT=T3B+1, T3HIGH, ISLASTBAR, T3HIGH, 1),COLORYELLOW,LINETHICK1;{,LINETHICK2,COLOR0000FF;}DRAWTEXT(ISLASTBAR, T3HIGH, '过线')LINETHICK1,COLORYELLOW;DRAWNUMBER(抢钱10!=REF(抢钱10,1),H,抢钱10),COLORYELLOW;STICKLINE(C>支撑1,(抢钱10+支撑1)/2,(抢钱10+支撑1)/2,5,1),COLORYELLOW;{箱体画框};。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
通达信主图公式,公式的名称叫做”波浪操作主图“,买点、卖点都有标注,基金入场,基金清仓都有提示,根据提示来操作,当然,还要结合大盘环境,成交量等其它指标综合分析,一个指标公式做不到尽善尽美,美中不足的是,这个指标有未来函数,信号有漂移
{波浪操作主图公式};
波浪线:ZIG(C,13),LINETHICK1,COLORYELLOW;
DRAWTEXT(CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1)) ,LOW*0.999,'↖买'),COLORYELLOW; DRAWTEXT(CROSS(REF(ZIG(3,5),1),ZIG(3,5)) ,HIGH*1.002,'↙卖'),COLORGREEN;
ZJ1953:=ZIG(C,15);
粉丝:=MA(ZJ1953,3);
DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'↖基金入场'),COLORMAGENTA; DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'←基金清仓'),COLORFFFFFF;
阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*RE F(A,6)+13*REF(A,7)+12*REF
(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,1 4)+5*REF(A,15)+4*REF
(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
主力成本线:EMA(X,13),COLORMAGENTA,LINETHICK0;
DRAWTEXT_FIX(1,0.00,0.920,0,'操作前先来回敲敲电脑的↑↓键'),COLOR00EEFF;
{加入,轨迹主图};
UR:=2;{调节轨迹宽度}; LR:=4;
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)));
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}
LR1:=FORCAST(C,NOD+1);
NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,M IN(TC2,BC2)-
1))),DRAWNULL),POINTDOT,COLOR93BDA8,NODRAW;{近点}{隐藏}
LR2:=SLOPE(C,NOD+1);
LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));
FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;{远点}{隐藏}
EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;{隐藏}
AD:=ABS(NP-FP);{高差};
DBL:=BARSLAST(BC1!=DRAWNULL)+1;
DBH:=BARSLAST(TC1!=DRAWNULL)+1;
BSP:=IF(BC2>TC2,DBL,DBH)-1;
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=CONST(BARSLAST(AT1-LRL=AT2));
AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));
AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=CONST(BARSLAST(LRL-UT1=UT2));
UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));
UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)) );{限制高}
RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)) );{限制低}
中
轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR66666 6,LINETHICK2;
上
轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR6666 66,LINETHICK2;
下
轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLOR6666 66,LINETHICK2;
VAR1:=(C+H+O+L)/4;
顶阴影线:=XMA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;
DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'↙逃'),COLORGREEN;。