当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:飓风眼附图,画线主图,资金均线主图

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

飓风眼附图:

{飓风眼副图}

{趋势转强}
VAR5X:=(CLOSE-LLV(LOW, 100))/(HHV(HIGH, 100)-LLV(LOW, 100))*200;
VAR6X:=SMA(VAR5X, 3, 1);
VAR7X:=SMA(VAR6X, 3, 1);
VAR8X:=3*VAR6X-2*VAR7X;
VAR11:=EMA((CLOSE-LLV(LOW, 5))/(HHV(HIGH, 5)-LLV(LOW, 5))*100, 4)*2;
VAR12:=EMA(0.667*REF(VAR11, 1)+0.333*VAR11, 2);
VAR13:=3*VAR11-2*VAR12;
VAR14:=POW(MA(CLOSE, 5), 2)+MA(CLOSE, 5);
VAR15:=POW(MA(LOW, 5), 2)+MA(LOW, 5);
VAR16:=POW(MA(HIGH, 5), 2)+MA(HIGH, 5);
VAR17:=(VAR14-LLV(VAR15, 64))/(HHV(VAR16, 64)-LLV(VAR15, 64))*150+65-10;
VAR18:=SMA(VAR17, 3, 1)*1.5-100;
VAR19:=SMA(VAR18, 3, 1);
VAR20:=3*VAR18-2*VAR19;
VAR21:=(HIGH+LOW+CLOSE*2)/4;
VAR22:=EMA(VAR21, 13);
VAR23:=STD(VAR21, 13);
VAR24:=(VAR21-VAR22)*100/VAR23;
VAR25:=EMA(VAR24, 5);
VAR26:=EMA(VAR25, 13);
VAR27:=EMA(VAR25, 13)+200-100;
VAR28:=EMA(VAR27, 10);
VAR29:=3*VAR27-2*VAR28;
VAR30:=VAR6X+VAR11+VAR18+VAR27;
VAR31:=VAR7X+VAR12+VAR19+VAR28;
VAR32:=VAR8X+VAR13+VAR20+VAR29;
VAR33:=(HIGH+LOW+CLOSE)/3;
VAR34:=AMOUNT/VOL/100;
VAR35:=SUM(AMOUNT, 5)/SUM(VOL, 5)/100;
VAR36:=(VAR33-MA(VAR33, 34))/(0.015*AVEDEV(VAR33, 34));
VAR41:=(VAR33-EMA(VAR33, 24))/STD(VAR33, 24)*100;
VAR42:=(VAR33-MA(VAR33, 24))/(0.015*AVEDEV(VAR33, 24));
VAR43:=EMA(VAR41, 5);
VAR44:=(VAR34-MA(VAR34, 21))/(0.015*AVEDEV(VAR34, 21));
VAR45:=(VAR35-MA(VAR35, 90))/(0.015*AVEDEV(VAR35, 90));
VAR46:=((VAR45+VAR44+VAR43+VAR42+VAR36)/5+165)/4;
VAR47:=(EMA(EMA(EMA(VAR46, 15), 10), 5)-25)*2+DMA(AMOUNT/VOL/100, VOL/CAPITAL);
VAR48:=(VAR30+VAR31+VAR32*30)/32/5-15;
VAR49:=EMA(VAR48, 13);
VAR51:=(VAR47+VAR49)/2;
VAR52:=EMA(VAR51, 1);
ZX:EMA(VAR52, 2),LINETHICK0, COLORFF7710;
{STICKLINE(ZX-REF(ZX, 2)<0, ZX, 10, 9, 0),COLORBROWN;{COLOR9CA010;}
STICKLINE(ZX-REF(ZX, 2)>0, ZX, 10, 9, 0),COLORLIRED;{LINETHICK0, COLOREEEEEE;}
VAR1:=IF(YEAR>=2038 AND MONTH>=1,0,1);
VAR2:=REF(LOW,1)*VAR1;
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100*VAR1;
GG:=100*(1-WINNER(C))>99.8 AND V/CAPITAL*100<5 AND 100*(WINNER(1.1*C)-WINNER(0.9*C))<3.9;
最佳建仓点:=C>REF(C,1) AND REF(GG,1)>0 AND VAR3,COLORRED;
STICKLINE(C>REF(C,1) AND REF(GG,1)>0 AND VAR3,0,80,4,0),COLORRED;
{DRAWTEXT(C>REF(C,1) AND REF(GG,1)>0 AND VAR3,85,'★低位建仓'),COLORYELLOW;}
{1指.能量线}
能量线:=EMA(100*(C-LLV(L,34))/(HHV(H,34)-LLV(L,34)),3),LINETHICK0;
{2指.RSI} RSI:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100,LINETHICK0;
{3指.KDJ} RSVF:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,LINETHICK0;
KF:=SMA(RSVF,3,1);
DF:=SMA(KF,3,1);
 
 
 
JF:=3*KF-2*DF;
威廉WR:=(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))*100;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),LINETHICK0;
五指A:WMA((能量线+RSI+JF-威廉WR+CCI)/2.5,5);
五指B:WMA((能量线+RSI+JF-威廉WR+CCI)/4,13);
KC:=FORCAST(((2*C+H+L)/4*0.618+C*0.382),3);
AAX:=(KC-MA(KC,9))/MA(KC,9)*100;
 VAR0:=MIN(EXIST(KC,55),9);
AAX1:=EMA(AAX,VAR0)*VAR0; 
AAX2:=MA(AAX1,3);
AAX3:=MA(AAX1,5); 
卖:=AAX3>3 AND AAX1<REF(AAX1,1) AND CROSS(AAX2,AAX1);
VBA:=FILTER(卖,5);
VB2:=EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6)*100;
VB3:=IF(LLV(VB2,3)=LLV(VB2,11) AND COUNT(VB2<0,2) AND CROSS(VB2,MA(VB2,2)),1,0);
VB4:=FILTER(VB3=1,5);
 
 
DRAWBAND(五指A,RGB(255,200,0),五指B,RGB(0,40,55));{亮度}
{MA((能量线+RSI+JF-威廉WR+CCI)/5,5),COLORLICYAN,LINETHICK3;{淡青色线}
IF(五指A>REF(五指A,1),五指A,DRAWNULL),COLORRED,LINETHICK4;{红色线};
DRAWTEXT_FIX(1,0.02,0,0,'◆能量线,RSI3.KDJ,W&R,CCI,
【五个指标共振线.[红].[绿].变化是买卖信号.颜色及标记是配合信号】'),COLOR00FFFF,LINETHICK3;
DRAWTEXT(VB4,五指A*0.97,'★低买'),COLOR00FFFF;
{飓风眼,红色下叉带}
VAR11F:=(HHV(HIGH,8)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR33F:=100-3*SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1)
+2*SMA(SMA((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,20,1),15,1);{72}
冷气OAMV:=EMA(VAR33,2),COLORRED;
冷气南下:=EMA(EMA(SMA(VAR11,6,1)-7,2),2);
WR线:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),3),3),COLORWHITE,DOTLINE;
SBZLPA1:=BARSLAST(L=HHV(L,7));
SBZLPA2:=EMA(SBZLPA1*SBZLPA1,13);
暖气北上:=IF(SBZLPA2>88,88+SQRT(SBZLPA2-88),SBZLPA2);
TPV:=(暖气北上+冷气南下+冷气OAMV)/3;
T冷气南下:=(暖气北上+TPV)/2+8,COLORWHITE,DOTLINE;
T暖气北上:=(冷气南下+TPV)/2+8,COLORBLUE,DOTLINE;
T飓风形成:=(T暖气北上+T冷气南下)/2,COLORGRAY,DOTLINE;
WR慢:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),2),2);
ZLCQ:=EMA((WINNER(CLOSE) * 69),3);
SHCQ:=EMA(((WINNER((CLOSE * 1.1)) - WINNER((CLOSE * 0.93))) * 80),3);
主力控盘Q:=EMA(((ZLCQ / (ZLCQ+ SHCQ)) * 110),2),COLORFF11FF,LINETHICK2;
上限Q:=HHV(主力控盘Q,20),COLORGRAY,LINETHICK3;
下限Q:=LLV(主力控盘Q,20),COLORGRAY,LINETHICK3;
圈Q:=100*(HHV(HIGH,42)-C)/(HHV(HIGH,42)-LLV(LOW,42));
M圈Q:=EMA(EMA(圈Q,3),2);
MM圈Q:=EMA(EMA(EMA(圈Q,4),3),2);
控盘主升Q:=EMA(主力控盘Q,2);
KONGQ0:=(上限Q/控盘主升Q)*(下限Q/控盘主升Q)*50;
KONGQ:=IF(KONGQ0>100,100,IF(KONGQ0<1,1,KONGQ0));
MAXV:=MAX(T冷气南下,T暖气北上);
MINV:=MIN(T冷气南下,T暖气北上);
MMV0:=MAXV/MINV;
MMV1:=T冷气南下/REF(T冷气南下,1);
MMV2:=T暖气北上/REF(T暖气北上,1);
散筹集中度Q:=EMA(EMA((WINNER(C*1.1)-WINNER(C*0.9))*50/(WR慢/MM圈Q)/MMV0/MMV1/MMV2,3),2);
KKONG0:=KONGQ*KONGQ*5/SQRT(散筹集中度Q)/控盘主升Q;
KKONG:=IF(KKONG0>100,100,KKONG0);
KV0:=KKONG/KONGQ;
KV1:=KONGQ/REF(KONGQ,1);
KV2:=KKONG/REF(KKONG,1);
KV3:=EMA(KV0*KV0*KV1*KV2*30,2);
OKV:=IF(KV3>100,100,IF(KV3<0,0,KV3));
WVQ0:=1.18*(上限Q*下限Q+5)/(KONGQ+2)/SQRT(SQRT((OKV+2)/(KONGQ+5)));
WVQ1:=100-IF(WVQ0>70,70+SQRT(WVQ0-1),IF(WVQ0<1,1,WVQ0));{90}
WVVQ:=(IF(WVQ1<05,0.5,WVQ1));
EVVQ:=EMA(EMA(WVVQ*0.97,3),3);
DRAWBAND(WVVQ,RGB(11,60,55),EVVQ,RGB(240,11,33));{红色下叉变色}
{要拉一波}
VAR1A:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);
VAR4AA:=CLOSE/(REF(CLOSE,1))>1.05 AND (HIGH/CLOSE<1.01);{1.05;1.01}
游资进场:=(FILTER(VAR4AA>0,34)AND DYNAINFO(4)>0)*8,COLORYELLOW;
A10:10,COLORYELLOW;
{STICKLINE(XYSHSL>2.1 AND CYS13>5,53,86,5,0 ),COLOR000055;}
STICKLINE(游资进场,10,66,6,0),COLORBLUE;
LS:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
拉升:=FILTER(LS,28);
M:=10;
N:=9;
散户线:100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORGREEN,LINETHICK2;{COLORFFFF00青线}
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
庄筹线:EMA(J,6),COLORRED,LINETHICK3;{粉线COLORFF00FF}
IF(散户线<庄筹线,散户线,DRAWNULL),COLORRED,LINETHICK3;
IF(庄筹线<散户线,庄筹线,DRAWNULL),COLORCYAN,LINETHICK2;
IF(散户线>A10,散户线,DRAWNULL),COLORCYAN,LINETHICK2;
XG1P:=CROSS(散户线,A10);
{DRAWICON(XG1,OPEN+1,18);}
{STICKLINE(XG1P,L*4.40,L*1.05,1,0),COLORWHITE;
DRAWTEXT(XG1P,L*3.89,'--主图空仓'),COLORBLUE;}
STICKLINE(拉升,10,58,0.5,0)COLORGREEN;
DRAWTEXT(拉升,40,' 芝麻开花'),COLORGREEN;
DRAWICON(拉升,66,9);
DRAWICON(游资进场=8,44,34);
DRAWICON(游资进场=8,30,33);
DRAWICON(游资进场=8,14,18);
DRAWTEXT(游资进场=8,66,' 要拉一波'),COLORCYAN;
DRAWTEXT(C>REF(C,1) AND REF(GG,1)>0 AND VAR3,85,'★低位建仓'),COLORYELLOW;
DRAWTEXT(VBA,五指A*1.08,'★顶背离警惕'),COLORGREEN;
 




画线主图:

压力支撑线都画出

TYP := (HIGH + LOW + CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));
差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAAB:=(3*C+H+L+O)/6;
VVAR1:=(8*AAAB+7*REF(AAAB,1)+6*REF(AAAB,2)+5*REF(AAAB,3)+4*REF(AAAB,4)+3*REF(AAAB,5)+2*REF(AAAB,6)+REF(AAAB,8))/36;
VVAR6:=(LLV(VVAR1,2)+LLV(VVAR1,4)+LLV(VVAR1,6))/3;
短线:IF(K=0, VVAR1, DRAWNULL),COLORWHITE;
中线:IF(K=0,VVAR6, DRAWNULL),COLORYELLOW;
下跌:IF(K=0 AND VVAR1=VVAR6,VVAR6, DRAWNULL),COLORGREEN;
中:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
上轨:=IF(K=1,中+3*STD(中,10),DRAWNULL),COLOR000088,LINETHICK5;
IF(K=1,2*MA(上轨,12)-MA(C,21),DRAWNULL),COLOR666666;
XXX1:=(C+L+H)/3;
XXX2:=EMA(XXX1,6),LINETHICK0;
XXX3:=EMA(XXX2,5),LINETHICK0;
牛背:=MA(C,21);
牛逼:=牛背+2*STD(C,21);
熊样:=牛背-2*STD(C,21);
熊样1:=IF(K=1,牛背-2*STD(C,21),DRAWNULL);
牛背2:=IF(K=1 AND C>牛背,牛背,DRAWNULL),LINETHICK3;
DRAWBAND(牛背2,RGB(58,58,58),熊样1,RGB(0,0,0));
IF(K=1,熊样1,DRAWNULL),COLOR666666;
STICKLINE(XXX2>=XXX3 AND K=1,XXX2,XXX3,4,1),COLOR557799;
STICKLINE(XXX2<XXX3 AND K=1,XXX2,XXX3,4,1),COLORAA5500;
JRH:=HHV(C,2);
JRL:=LLV(C,2);
ZGD:=HHV(REF((C*2-REF(C,3)),3),60)*0.99,COLOR008888;
ZDD:=LLV(REF((C*2-REF(C,3)),3),60),COLOR008888;
ZGD2:=IF(K=0,CONST(ZGD),DRAWNULL);
ZDD2:=IF(K=0,CONST(ZDD),DRAWNULL);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
短买春:=R19,NODRAW,COLOR00DD00;
秋离场:=R1A,NODRAW,COLOR2288DD;
红持股:=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,NODRAW;
离场:=IF(红持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:=REF(离场,1)COLOR0000FF,NODRAW;
进:=IF(阴观望,JRH,DRAWNULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;
短买:=R19,COLOR33AACC,NODRAW;
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
KOH:=L>REF(H,1);
KOL:=H<REF(L,1);
HIF:=L>REF(H,BARSLAST(KOH)+1);
NHIF:=L<=REF(H,BARSLAST(KOH)+1);
LIF:=H<REF(L,BARSLAST(KOL)+1);
NLIF:=H>=REF(L,BARSLAST(KOL)+1);
下档线:=(((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;
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
STICKLINE(ISLASTBAR AND (红持股 OR REF(红持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (阴观望 OR REF(阴观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;
STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;
STICKLINE(ISLASTBAR,今日阻力,今日阻力,10,1),COLORAAAAAA;
DRAWTEXT(ISLASTBAR,今日阻力,'       阻'),COLOR0000FF;
STICKLINE(ISLASTBAR,今日支撑,今日支撑,10,1),COLORAAAAAA;
DRAWTEXT(ISLASTBAR,今日支撑,'       支'),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,H ,L,0,1 ),COLORFFAA00;
STICKLINE(CLOSE>OPEN,H,L,0,1) ,COLOR0000CC;
CO:=(C-O);
STICKLINE(红持股,C,O,2.8,0),COLOR0000BB;
STICKLINE(红持股,C,O,2,0),COLOR0000DD;
STICKLINE(阴观望,C,O,2.8,0),COLORBBBB00;
STICKLINE(阴观望,C,O,2,0),COLOREEEE00;
STICKLINE(急速超跌关注,O,C-CO/2,2.8,0),COLOR999999;
STICKLINE(短买,O,O+CO/3,2.8,0),COLOR008800;
STICKLINE(短买,O,O+CO/3,2,0),COLOR00EE00;
STICKLINE(秋离场,O,O+CO/3,2.8,0),COLORDD3300;
STICKLINE(秋离场,O,O+CO/3,2,0),COLORFF3300;
STICKLINE(C>0,O,C,0,0),COLORFFFFFF;
DRAWTEXT(秋离场,HHV(H,3),'→→→→'),COLORFF99FF;
DRAWTEXT(短买春,LLV(L,3),'←←←←'),COLOR00FF00;
 
 
AA:=REF(H,N)=HHV(H,2*N+1);  AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1);  QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);  CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC);  DD1:=BARSLAST(CC1);
GDTS:=IF(CC,CURRBARSCOUNT,0);  DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);  DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(DINGBUTS);  DDCS1:=CONST(DDTS1);
GDCS13:=CONST(REF(HIGH,GDCS1-1));  DDCS13:=CONST(REF(L,DDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1);  DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=CONST(DINGBUTS1);  DDCS2:=CONST(DDTS2);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));  DDCS23:=CONST(REF(L,DDTS2-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);  XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);  XD2:=BACKSET(ISLASTBAR,DDTS2);
XDD:=IF(DDCS13<=DDCS23,XD1,XD2);
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDD+1);
GDCS22:=CONST(DINGBUTS11);
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
HH1:= REF(H,GDCS1-1),NODRAW;
HH2:= REF(H,GDCS2-1),NODRAW;
HH11:= REF(H,GDCS11-1),NODRAW;
HH22:= REF(H,GDCS22-1),NODRAW;
GHH:=MAX(MAX(REF(H,GDCS1-1),REF(H,GDCS2-1)),MAX(REF(H,GDCS11-1),REF(H,GDCS22-1))),NODRAW;
DLL:=MIN(MIN(REF(L,DDCS1-1),REF(L,DDCS2-1)),MIN(REF(L,DDCS11-1),REF(L,DDCS22-1))),NODRAW;
DX1:=(REF(H,GDCS1-1)-REF(H,GDCS2-1))/(GDCS2-GDCS1);
DDX1:=IF((REF(H,(GDCS1-1))+DX1*GDCS1)>ZGD2*1.02 OR (REF(H,(GDCS1-1))+DX1*GDCS1)<ZDD2*0.98,0,1);
DX2:=(REF(H,GDCS11-1)-REF(H,GDCS22-1))/(GDCS22-GDCS11);
DDDX1:=IF((REF(H,(GDCS11-1))+DX2*GDCS11)>ZGD2*1.02 OR (REF(H,(GDCS11-1))+DX2*DDCS11)<ZDD2*0.98,0,1);
LX1:=(REF(L,DDCS1-1)-REF(L,DDCS2-1))/(DDCS2-DDCS1);
LLX1:=IF((REF(L,(DDCS1-1))+LX1*DDCS1)<ZDD2*0.98 OR (REF(L,(GDCS1-1))+LX1*DDCS1)>ZGD2*1.02,0,1);
LX2:=(REF(L,DDCS11-1)-REF(L,DDCS22-1))/(DDCS22-DDCS11);
LLLX1:=IF((REF(L,(DDCS11-1))+LX2*DDCS11)<ZDD2*0.98 OR (REF(L,(DDCS11-1))+LX2*DDCS11)>ZGD2*1.02,0,1);
高压力:DRAWLINE(K=0 AND CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,DDX1),COLORYELLOW,LINETHICK1;
低支撑:DRAWLINE(K=0 AND CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,LLX1),COLORYELLOW,LINETHICK1;
DRAWLINE(K=0 AND CURRBARSCOUNT=GDCS22 ,H,CURRBARSCOUNT=GDCS11,H,DDDX1),COLORRED,LINETHICK1;
DRAWLINE(K=0 AND CURRBARSCOUNT=DDCS22 ,L,CURRBARSCOUNT=DDCS11,L,LLLX1),COLORRED,LINETHICK1;




资金均线主图:

1.股价高于平均线,视为强势;股价低于平均线,视为弱势
2.平均线向上涨升,具有助涨力道;平均线向下跌降,具有助跌力道;
3.二条以上平均线向上交叉时,买进;( 顶尖财经 股票学院: http://www.58188.com )
4.二条以上平均线向下交叉时,卖出;
5.移动平均线的信号经常落后股价,若以EXPMA 、VMA 辅助,可以改善。
 
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORLIRED;
DRAWTEXT_FIX(ISLASTBAR,0,0.03,0,EXTERNSTR(0,3)),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,EXTERNSTR(0,6)),COLORLIBLUE;
DRAWTEXT_FIX(ISLASTBAR,0,0.09,0,EXTERNSTR(0,12)),COLORLIGREEN;{老王}
DRAWTEXT_FIX(ISLASTBAR,0,0.15,0,FGBLOCK),COLORLIMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,0.12,0,EXTERNSTR(0,1)),COLORYELLOW;{融胜}
 
 
主力成本线:EMA(COST(9),250),COLORBROWN,DOTLINE;
 
{牛马线买点公式升级版}
 
 MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
 牛线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
 马线:MA(牛线,8),COLORWHITE;
 DRAWICON( FILTER(CROSS(牛线,马线),20),马线-0.002 ,1);
 DRAWTEXT(CROSS(牛线,马线),LOW*0.984,'买'),COLORRED,LINETHICK2;
 止损价:H*0.95,LINETHICK1,COLORRED; 
庄家:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
 13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
 10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
 7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
 4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
 IF(庄家>=REF(庄家,1),庄家,DRAWNULL),COLORRED,LINETHICK4;
 IF(庄家<=REF(庄家,1),庄家,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWBAND(牛线,RGB(255,87,22),马线,RGB(0,30,255));
 
MA60:MA(CLOSE,60),COLORGRAY;
 
N1:=10;
TK:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;
量能平台:IF(CURRBARSCOUNT<=N1+3,CONST(IF(TK=0,C,REF(C,TK))),DRAWNULL),COLORGRAY,LINETHICK1;
NOTEXT_新量能点:IF(CURRBARSCOUNT=TK+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK9;
DRAWTEXT(ISLASTBAR,量能平台,'量能平台'),COLORGRAY;
{稳涨}
  红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;
  轨道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;
  NOTEXT_升:IF(红轨道>=轨道,轨道,DRAWNULL),COLORMAGENTA,LINETHICK2;
 
 
机构:(L2_VOL(0,0) - L2_VOL(0,1))*10000/FINANCE(7),NODRAW,COLORRED;
大户:(L2_VOL(1,0) - L2_VOL(1,1))*10000/FINANCE(7),NODRAW,COLORMAGENTA;
主力:机构+大户,NODRAW,COLORYELLOW;
STICKLINE(主力>0,O,C,1.5,1),COLORRED;
STICKLINE(主力<0,O,C,1.5,1),COLORCYAN;
 
STICKLINE(大户>0,O,C,1,0),COLORMAGENTA;
STICKLINE(大户<0,O,C,1,0),COLORGREEN;
STICKLINE(机构>0 AND 大户>0,O,(O+C)/2,1,0),COLORRED;
STICKLINE(机构<0 AND 大户>0,C,(O+C)/2,1,0),COLORCYAN;
STICKLINE(机构>0 AND 大户<0,O,(O+C)/2,1,0)COLORMAGENTA;
STICKLINE(机构<0 AND 大户<0,C,O,1,0)COLORLICYAN;
 
累计:=SUM(主力,30),COLORMAGENTA;
均值:=EMA(累计,MIN(10,30)),COLORWHITE;
 
{红}
STICKLINE(CROSS(累计,均值),H,L,0,0),COLORRED,LINETHICK1;
STICKLINE(CROSS(累计,均值),CLOSE,OPEN,1.4,0),COLOR000088;
STICKLINE(CROSS(累计,均值),CLOSE,OPEN,1,0),COLOR0000BB;
STICKLINE(CROSS(累计,均值),CLOSE,OPEN,0.6,0),COLOR0000DD; 
STICKLINE(CROSS(累计,均值),CLOSE,OPEN,0,0),COLOR0000FF;
{蓝}
STICKLINE(CROSS(均值,累计),H,L,0,0),COLORFF8800,LINETHICK1;
STICKLINE(CROSS(均值,累计),CLOSE,OPEN,1.4,0),COLORBB4400;
STICKLINE(CROSS(均值,累计),CLOSE,OPEN,1,0),COLORCC5500;
STICKLINE(CROSS(均值,累计),CLOSE,OPEN,0.6,0),COLORDD6600;
STICKLINE(CROSS(均值,累计),CLOSE,OPEN,0,0),COLOREE7700;
 
 
{高低点定位}
G0:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))+XMA(XMA(H,30),30);
D0:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30));
G01:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5+XMA(XMA(H,30),30);
D01:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5;
GO0:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3+XMA(XMA(H,60),60);
DO0:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3;
 
STICKLINE(CURRBARSCOUNT=1,G0,G0,100,5),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,D0,D0,100,5),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=1,GO0,GO0,100,5),COLORLIBLUE;
STICKLINE(CURRBARSCOUNT=1,DO0,DO0,100,5),COLORRED;
DRAWTEXT(ISLASTBAR,G0,'卖'),COLORGREEN;
DRAWTEXT(ISLASTBAR,D0,'买'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,GO0,'顶'),COLORLIBLUE;
DRAWTEXT(ISLASTBAR,DO0,'底'),COLORRED;
 
{五线顺上的拐点定位线,有未来函数}
局部低点预选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,LINETHICK1;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORLICYAN,LINETHICK1;
DD1:=BARSLAST(ABS(极点保留)!=1);
DRAWTEXT(极点保留=1,局部极点,'卖'),COLORLIBLUE;
DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;
 
 
{一绝}
Q_1:=C-REF(C,1);
Q_2:=100*EMA(EMA(Q_1,6),6)/EMA(EMA(ABS(Q_1),6),6);
Q_3:=CROSS(EMA(C,19),EMA(C,7));
Q_4:=CROSS(EMA(C,7),EMA(C,19));
ZD1:=L=LLV(L,BARSLAST(Q_3)+1);
ZD2:=LLV(L,BARSLAST(Q_3)+1);
ZD3:=H=HHV(H,BARSLAST(Q_4)+1);
ZD4:=HHV(H,BARSLAST(Q_4)+1);
Q_A:=DRAWLINE(ZD1,ZD2,ZD3,ZD4,0);
U1:=H=HHV(H,BARSLAST(Q_4)+1);
U2:=HHV(H,BARSLAST(Q_4)+1);
U3:=L=LLV(L,BARSLAST(Q_3)+1);
U4:=LLV(L,BARSLAST(Q_3)+1);
Q_B:=DRAWLINE(U1,U2,U3,U4,0);
TJ:=IF(Q_B<REF(Q_B,1) AND Q_B=Q_A,1,0);
BB:=REF(TJ,1)=0 AND TJ>=1 ;
DRAWICON(BB,L*0.998,34);
SS:=REF(Q_A<REF(Q_A,1) AND Q_B=Q_A,1)=0 AND TJ<1; 
DRAWICON(SS,H*1.002,35);
 
 
{私募公式}
AAE:= WINNER(CLOSE+CLOSE*15/100)*100;
BBE:= WINNER(CLOSE+CLOSE*0/100)*100;
CCE:= AAE-BBE;
DDE:= (WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
EEE:= CCE<3 AND DDE<0.5 AND OPEN>LOW;
AE1:= DYNAINFO(6);
AE2:= IF(LOW>AE1,0,IF(HIGH<AE1,1,(AE1-LOW+0.01)/(HIGH-LOW+0.01)));
AE3:= VOL/WINNER(LOW);
AE4:= REF(HHV(CLOSE,120),1);
AE5:= REF(LLV(CLOSE,120),1);
AE6:= 100*(CLOSE-AE5)/(AE4-AE5);
AE7:= AE2>0 OR AE2=1;
AE8:= AE7 AND AE3/REF(AE3,3)>=3 AND AE6<80;
AE9:= REF(AE8,1) OR REF(AE8,2) OR REF(AE8,3) OR REF(AE8,4);
AE10:= AE8 AND AE9;
AE11:= IF(FILTER(AE8,3),5,0);
AE12:= FILTER(IF(FILTER(AE10,3) OR EEE,10,0),3);
DRAWICON(AE12,L-0.0018,13);
 
 
 {新趋势线};
AX1:=REF(H,8)=HHV(H,2*8+1);
BX1:=FILTER(AX1,8);
CX1:=BACKSET(BX1,8+1);
DX1:=FILTER(CX1,8);{高点}
RX1:=BACKSET(ISLASTBAR,BARSLAST(DX1)+1);
SX1:=RX1>REF(RX1,1);
DRAWLINE(DX1,H,SX1,H,1),COLORBLUE,DOTLINE;
AX2:=REF(L,8)=LLV(L,2*8+1);
BX2:=FILTER(AX2,8);
CX2:=BACKSET(BX2,8+1);
DX2:=FILTER(CX2,8);{低点}
TX1:=BACKSET(ISLASTBAR,BARSLAST(DX2)+1);
UX1:=TX1>REF(TX1,1);
DRAWLINE(DX2,L,UX1,L,1),COLORLIMAGENTA,DOTLINE;
M:=INTPART(3*8/5);
AV2:=REF(H,M)=HHV(H,2*M+1);
BV2:=FILTER(AV2,M);
CV2:=BACKSET(BV2,M+1);
DV2:=FILTER(CV2,M);{高点}
RV2:=BACKSET(ISLASTBAR,BARSLAST(DV2)+1);
SV2:=RV2>REF(RV2,1);
DRAWLINE(DV2,H,SV2,H,1),COLORLIBLUE,DOTLINE;
A22:=REF(L,M)=LLV(L,2*M+1);
B22:=FILTER(A22,M);
C22:=BACKSET(B22,M+1);
D22:=FILTER(C22,M);{低点}
T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1);
DRAWLINE(D22,L,U112,L,1),COLORMAGENTA,DOTLINE;
 
{伏击涨停}
T1:=MA(C,21)>REF(MA(C,21),1);
T2:=EXIST(C>REF(C,1)*1.093,21);
T3:=C<O AND C<REF(C,1) AND EVERY(MA(C,5)<REF(MA(C,5),1),3);
T5:=EVERY(V<REF(V,1),2) AND EVERY(V<MA(V,5),2);
T6:=MA(C,5)>MA(C,21);
DRAWTEXT(T1 AND T2 AND T3 AND T5 AND T6,L,'--伏击涨停');
 
 
 {红底绿顶}
 低:=REF(LLV(L,150),3);
 近期底:=REFDATE(低,DATE);
 最底:=REFDATE(近期底,DATE);
 入:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O));
 STICKLINE(入,O,(C+O)/2,3,0),COLORRED;
 STICKLINE(入,H,L,0.2,0),COLORRED;
 DRAWTEXT(入,L*1.0021,'-红底'),COLORLIMAGENTA;
 高:=REF(HHV(H,150),3); 
 近期顶:=REFDATE(高,DATE);
 最顶:=REFDATE(近期顶,DATE),NODRAW;
 出:=最顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;
 STICKLINE(出,O,(C+O)/2,3,0),COLORBLUE;
 STICKLINE(出,H,L,0.2,0),COLORBLUE;
 DRAWTEXT(出,H*0.998,'--蓝顶'),COLORGREEN;
 
 
 
A2:=REF(MA(C,20),1);J1:=(MA(C,20)-A2)/A2*100;MJ1:=MA(J1,3);
乖离2:=(MA(C,20)-MA(C,30))/MA(C,30)*100; 
VAC1:=IF(BETWEEN(乖离2,-2,5),2,0); 
 
XL1:=((LLV(LOW,3) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) >= 1.04)); 
XL2:=(((CLOSE - EMA(CLOSE,21)) / EMA(CLOSE,21)) * 100); 
XL3:=CROSS(XL2,(0 - 20)); 
DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),(LOW - 0.0014),'●买点'); 
DRAWTEXT((XL3 > 0),(LOW - 0.0011),'●绝对底部')COLORYELLOW; 
X6:=REF(CLOSE,1); 
X7:=((SMA(MAX((CLOSE - X6),0),7,1) / SMA(ABS((CLOSE - X6)),7,1)) * 100); 
X8:=CROSS(79,X7); 
X9:=FILTER(X8,4); 
DRAWTEXT(X9,(HIGH * 0.9989),'-●出货'),COLORGREEN; 
 
 
 
{金牛启动}
年:=MA(CLOSE,240);
涨幅%:=(C-REF(C,1))/REF(C,1)*100;
RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
VARB2:=(RSVV/2+22)*1;
量:=EMA(VOL,13);
资金:=EMA(AMOUNT,13);
过滤:=((资金 /量) / 100);
提纯:=(((CLOSE -过滤) / 过滤) * 100);
黄金:=((提纯 < (0)) AND ZXNH);
买:=IF(黄金 AND RSVV<VARB2-2,180,0) AND 涨幅%>0 AND C<年;
DRAWTEXT(买>0,L-0.0013,'-牛'),COLORFFFFFF;
DRAWTEXT(买>0,L-0.0018,'▲'),COLORFF00FF;
 
 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),NODRAW;
 AA10:=MA(C,10);
 AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
 AA30:=MA(C,30);
 三拾日乖离率:=(C-AA30)/AA30*100;
 VAR11:=(AA20-AA30)>REF((AA20-AA30),1) 
AND AA20>REF(AA20,1) AND AA30>REF(AA30,1); 
VAR22:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND 
AA30<REF(AA30,1); 
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
 强势狙击:=FILTER(BB30>30 AND BB10>45 AND 
CROSS(BB05,60),10);
 加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND 
AA05>REF(AA05,1)  AND 三拾日乖离率>REF(三拾日乖离率,1) AND 
AA10>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) AND 
AA05<REF(AA05,1)  AND 三拾日乖离率<REF(三拾日乖离率,1) AND 
AA10<REF(AA10,1),10);
 DRAWICON(加仓 ,LOW*0.997,21);
 DRAWICON(清仓 ,HIGH*1.005,12);
 DRAWICON(强势狙击 ,LOW*0.997,11);
 
{俊俊出击-选股}
S1:=MA((2*C+H+L)/4,5); 
S2:=S1*(200-102)/100;
S3:=(1-7/100)*DMA(C,ABS((2*C+H+L)/4-MA(C,20))/MA(C,20)); 
S4:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; 
S5:=3*SMA(S4,3,1)-2*SMA(SMA(S4,3,1),3,1); 
S6:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14)); 
DRAWTEXT(S2<S3&&S5>REF(S5,1)&&REF(S5,1)<REF(S5,2)&&S6<-100&&S6>REF(S6,1),L-0.0018,'俊'),COLORYELLOW;
 
{洗盘杀入线源码:}
T11:=CONST(LLVBARS(LOW,10));
 T11HIGH:=CONST(REF(HIGH,T11));
 CC1:=CONST(CURRBARSCOUNT);
 T22:=CONST(BARSLAST(CURRBARSCOUNT>CC1+T11 AND H>T11HIGH));
 T22HIGH:=CONST(REF(HIGH,T22));
 T33:=CONST(BARSLAST(CURRBARSCOUNT>CC1+T22 AND HIGH>T22HIGH));
 T33HIGH:=CONST(REF(HIGH,T33));
 {C>=T33HIGH AND REF(C,1)<T33HIGH AND DYNAINFO(17)>2;}
 N:=10;
 T1K:=CONST(LLVBARS(LOW,N));
 T1HIGH:=CONST(REF(HIGH,T1K));
 CC:=CONST(CURRBARSCOUNT);
 T2K:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1K)) AND (HIGH>T1HIGH)));
 T2HIGH:=CONST(REF(HIGH,T2K));
 T3K:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2K)) AND (HIGH>T2HIGH)));
 T3HIGH:=CONST(REF(HIGH,T3K));
洗盘杀入线:DRAWLINE(CURRBARSCOUNT=10+1,T3HIGH,ISLASTBAR, T3HIGH,1),LINETHICK1,COLORLIRED;
 DRAWTEXT(ISLASTBAR, T3HIGH,'杀入线')LINETHICK1,COLORLIRED; 
 
 AQ1:=REF(V,1);AQ2:=DVOL;AQ3:=AQ2/AQ1;
 LNX:=AQ3-REF(AQ3,1);
 E1:=REF(C,1);E2:=DCLOSE;E3:=(E2-E1)/E1*100;
 QMX:=E3-REF(E3,1);
 XG:=CROSS(LNX,500) AND CROSS(QMX,10);
 DRAWTEXT(XG=1,L*0.995,'--钻石'),COLORFFCC88;
 DRAWICON(XG=1,L*0.993,25);
 
{有庄控盘}
VAW1:=EMA(EMA(CLOSE,13),13);
控盘:=(VAW1-REF(VAW1,1))/REF(VAW1,1)*1000;
无庄控盘:=控盘<0;
有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;
 
{分时价格原码}
JJ:=DYNAINFO(11);
{波段买卖原码}
P:=21;S:=8;M1:=3;
财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*50;
神:=EMA(财,M1);
 
{股价与均线偏离买卖条件}
BTJ1:=(C-JJ)/JJ<-0.03;
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;
STJ1:=(C-JJ)/JJ>0.005;
{控盘买卖条件}
STJ01:=控盘<REF(控盘,1) AND 控盘>0.5;
STJ02:=控盘>0;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;
{波段买卖条件}
BTJ3:=CROSS(财,神) AND 财<-0.3;
BTJ32:=CROSS(财,神) AND 财<-0.1;
STJ31:=CROSS(神,财);
STJ32:=CROSS(神,财) AND 财>1.618;
{以下为信号};
BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);
 
STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);
STJ82:=FILTER(STJ02 AND STJ32 ,13);
STJ83:=STJ81 AND STJ82;
 
 
DRAWTEXT(STJ83,H*1.002,'↓庄出'),COLORGREEN;
DRAWICON(STJ83,H+0.003,24);
 
庄:= BTJ11 AND BTJ2 AND BTJ3;
有庄:=FILTER(庄,30);
DRAWTEXT(有庄,L-0.0011,'↖庄进'),COLORYELLOW;
DRAWICON(有庄,L*0.999,23);
 
 
 
{牛熊轨道上抓启爆点 适合抓爆涨股}
 AHC1:=CLOSE*VOL;
 AHC22:=EMA((EXPMA(AHC1,27)/EXPMA(VOL,27)+EXPMA(AHC1,54)/EXPMA(VOL,54)+EXPMA(AHC1,108)/EXPMA(VOL,108)+EXPMA(AHC1,316)/EXPMA(VOL,316))/4,34);
 上轨:=1.06*AHC22;
 下轨:=AHC22*0.94;
 ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
 启爆:=CROSS(C,上轨) OR CROSS(C,下轨) AND ZT;
 DRAWTEXT(启爆,L,'↖启爆'),COLORCYAN;
{STYLE:抄底钻石王--可以用于选股预警,也可以放到附图}
YY:=(REF(H,4)-REF(L,1))/C*100>10;{4天前的最高到昨天最低跌幅为10个点}
YY1:=(REF(L,1)-L)/C*100>=0;{昨天的最低价跟今天最低价相平或收下影线}
YY2:=REF(C<O,1) AND C>O;{昨天收阴,今天收阳线}
YY3:= CLOSE>REF(CLOSE,1)*1.03 ;{股价3个点预警}
YY4:=(H-C)/C*100<1.5;{上影线少于1.5个点}
YY5:=V<=LLV(V,5) OR V>=HHV(V,5);{成交量是五天最低或五天最高}
DRAWICON(YY AND YY1 AND YY2 AND YY3 AND YY4 AND YY5,L*0.988,26);{满足所有条件};
DRAWTEXT(YY AND YY1 AND YY2 AND YY3 AND YY4 AND YY5,L*0.988,'--钻石王'),COLORRED;

上一篇:通达信公式下载: 量价黑马线,借花献佛,非牛即妖

下一篇:通达信公式下载:神针起爆,妖股选股,超短集成