以下是横盘源码和截图
分时横盘突破源码:
MA5:MA(CLOSE,5);
MA6:MA(CLOSE,6);
MA7:MA(CLOSE,7);
MA8:EMA(CLOSE,8);
MA9:EMA(CLOSE,9);
AA:=(MA5+MA6+MA7+MA8+MA9)/5;
MA12:MA(CLOSE,12);
MA13:MA(CLOSE,13);
MA14:MA(CLOSE,14);
MA15:MA(CLOSE,15);
MA16:MA(CLOSE,16);
BB:=(MA12+MA13+MA14+MA15+MA16)/5;
MA26:MA(CLOSE,26);
MA27:MA(CLOSE,27);
MA28:MA(CLOSE,28);
MA29:MA(CLOSE,29);
MA30:MA(CLOSE,30);
CC:=(MA26+MA27+MA28+MA29+MA30)/5;
MA68:MA(CLOSE,68);
MA69:MA(CLOSE,69);
MA70:MA(CLOSE,70);
MA71:MA(CLOSE,71);
MA72:MA(CLOSE,72);
DD:=(MA68+MA69+MA70+MA71+MA72)/5;
MA82:MA(CLOSE,82);
MA83:MA(CLOSE,83);
MA84:MA(CLOSE,84);
MA85:MA(CLOSE,85);
MA86:MA(CLOSE,86);
EE:=(MA82+MA83+MA84+MA85+MA86)/5;
:IF(AA MAX(BB,CC),AA,IF(AA MIN(BB,CC),BB,CC)),COLOR00FF00,LINETHICK4;
短强:IF(短线 REF(短线,1),短线,DRAWNULL),COLORYELLOW,LINETHICK4;
:IF(DD MAX(DD,EE),DD,IF(DD MIN(DD,EE),DD,EE)),COLORFFFF00,LINETHICK4;
长强:IF(长线 REF(长线,1),长线,DRAWNULL),COLORRED,LINETHICK4;
DRAWICON(短线 长线ANDL 长线ANDC 短线ANDC O,L*0.98,1);
DRAWICON(CROSS(MIN(短线,长线),C),H*1.02,2);
突破:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-突破)/突破*100;
多方:=IF(A1X =0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);
空方:=IF(A1X 0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);
STICKLINE(A1X =0,多方,突破,10,0),COLOR000099;
STICKLINE(A1X 0,空方,突破,10,0),COLOR00CC66;
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;
TT:=BARSCOUNT(CLOSE);
CC:=CLOSE;
:=SUM(AMOUNT,0)/SUM(VOL*100,0);
上均:=均线+AVEDEV(C,TT)*2;
下均:=均线-AVEDEV(C,TT)*2;
时长:=IF(HOUR =10ANDHOUR 15,1,0);
涨幅:=(CLOSE DYNAINFO(3)) 1.02;
跌幅:=(CLOSE/DYNAINFO(3)) 0.98;
横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE) 0.03;
YY:=SMA(VOL,30,1);
放量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30)) 0.92;
涨跌幅:=涨幅OR跌幅;
横涨:=涨跌幅=0AND横盘AND时长AND放量ANDCROSS(CC,上均);
突破:FILTER(横涨,100);
{通达信源码}
TT:=BARSCOUNT(CLOSE);
CC:=CLOSE;
均线:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0)));
上均:=(均线*1.007);
下均:=(均线/1.005);
时长:=IF(HOUR =10ANDHOUR 15,1,0);
涨幅:=(CLOSE DYNAINFO(3)) 1.02;
跌幅:=(CLOSE/DYNAINFO(3)) 0.98;
横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)
YY:=SMA(VOL,30,1);
放量:=SUM(VOL,6) REF(MA(VOL,30),1)*10;
涨跌幅:=涨幅OR跌幅;
横涨:=横盘AND放量AND(C
突破:FILTER(横涨,100);
M1:=5;
M2:=10;
AAA:C;
M3:=Ema(CLOSE,5);
M20:=EMA(CLOSE,10);
A:=BArslAst(crOSS(M3,M20));
A1:=REF(BARSLAST(CROSS(M3,M20)),A+1);
A2:=A+A1;
AA:=REF(BARSLAST(CROSS(M3,M20)),A2+2);
A3:=AA+A2;
B:=BARSLAST(CROSS(M20,M3));
B1:=REF(BARSLAST(CROSS(M20,M3)),B+1);
B2:=B+B1;
BB:=REF(BARSLAST(CROSS(M20,M3)),B2+2);
X1:=IF(A B,A2-B,A-B);
Y1:=IF(A2 B2,A3-B2,A2-B2);
GD0:=REF(HHVBARS(H,X1+3),B);
GD1:=REF(HHVBARS(H,Y1+3),B2);
GG0:=BacKSET(ISLASTBAR,GD0+B+1);
GG1:=BACKSET(ISLASTBAR,GD1+B2+1);
TJ3:=CROSS(GG0,0.5);
TJ4:=CROSS(GG1,0.5);
上轨:=DRAWLINE(TJ4,H,TJ3,H,1);
值3:=GG0 REF(GG0,1);
值4:=GG1 REF(GG1,1);
顶1:IF(GG0,REF(HIGH,BARSLAST(值3)),0);
突破1:CROSS(C,顶1);
突破2:COUNT(突破1,10);
突破:(突破1AND突破2=1);
分时横盘突破截图