灏然天空
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2009-02-15 15:35:00
公式简介:
灏然天空
MA5:=MA(CLOSE,5);
B1:=CLOSE/INDEXC;
B2:=MA(B1,5);
B3:=MA(B1,10);
B4:=MA(CLOSE,20);
B5:=CLOSE>MA(CLOSE,5);
B6:=MA(CLOSE,5)>MA(CLOSE,10);
B7:=CLOSE>MA(CLOSE,10);
B8:=MA(CLOSE,5)>MA(CLOSE,20);
B9:=CLOSE>MA(CLOSE,20);
B10:=REF(B4,1);
B11:=B4>B10;
B12:=IF(B5,10,-10)+IF(B6,10,-10)+IF(B7,10,-10)+IF(B8,10,-10)+IF(B9,10,-10)+IF(B11,10,-10);
DRAWBKBMP(B12>0 OR B2>B3,'sun');
DRAWBKBMP(B12<=0,'moon');
FA:=MA(CLOSE,10);
FB:=MA(CLOSE,30);
FC:=BARSLAST(CROSS(FA,MA5)) AND CROSS(MA5,FA);
FD:=FC AND MA5>FB AND FA>FB AND FA>REF(FA,1);
DRAWBKBMP(FD>0,'xxht');
MA3:=MA(CLOSE,3);
MA14:=MA(CLOSE,14);
MA25:=MA(CLOSE,25);
YX1:=SYSPARAM(1);
YX2:=SYSPARAM(3);
YX3:=YX2-YX1;
MA10:=FA;
MA30:=MA(CLOSE,30);
MA55:=MA(CLOSE,55);
MA60:=MA(CLOSE,60);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCIDY:=CCI>REF(CCI,1);
冲涨回调:=FD AND NOT(CROSS(MA3,MA10) AND LOW<MA3) AND NOT(CROSS(MA3,MA60) AND LOW<MA3);
DRAWTEXT(冲涨回调,HIGH*1.02,'小心回头'),colorCC00;
MMV:=EMA(SLOPE(CLOSE,22)*20+CLOSE,55);
HJX:=IF(DATATYPE>5 AND DATATYPE<9,MA(MMV,1),IF(DATATYPE=5,MA(MMV,4),IF(DATATYPE=4,MA(MMV,8),IF(DATATYPE=3,MA(MMV,16),IF(DATATYPE=2,MA(MMV,32),MMV)))));
HJXCS:=(EMA(CLOSE,3)+MA(CLOSE,3))/2>HJX;
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;
RSV13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K13:=SMA(RSV13,3,1);
D13:=SMA(K13,3,1);
J13:=3*K13-2*D13;
RSV55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:=SMA(RSV55,3,1);
D55:=SMA(K55,3,1);
J55:=3*K55-2*D55;
ZD:=IF(CROSS(J55,J13),HIGH,REF(HIGH,BARSLAST(CROSS(J55,J13))));
XC:=LLV(HIGH,30);
VA:=CLOSE/REF(CLOSE,1)>=1.045 OR OPEN=LOW AND HIGH=CLOSE OR CLOSE/OPEN>=1.07;
SJ1:=BARSLAST(VA=1);
JC:=IF(VA=1,LOW*1,REF(LOW,SJ1));
VA1:=CLOSE/REF(CLOSE,1)>=1.095 OR CLOSE/OPEN>=1.1;
SJ2:=BARSLAST(VA1=1);
ZCYL:=IF(VA1=1,LOW,REF(LOW,SJ2));
VAR1:=(LOW+HIGH+CLOSE)/3;
VAR2:=MA(VAR1,5);
VAR3:=HHV(VAR2,13);
VAR4:=HHV(HIGH,27)*0.995;
VAR5:=LLV(LOW,27)*1.006;
VAR6:=LLV(VAR2,13);
VAR7:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
VAR8:=SMA(VAR7,3,1);
VAR9:=SMA(VAR8,2,1);
VAR10:=3*VAR8-2*VAR9;
VAR11:=MA(VAR10,2);
VAR12:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR13:=BARSLAST(REF(CROSS(VAR10,VAR11),1) AND VAR11<20);
VAR14:=REF(VAR11,VAR13+1)<VAR11 AND CROSS(VAR10,VAR11) AND VAR11<50 AND REF(VAR10,1)>REF(REF(VAR10,VAR13+1),1) AND REF(VAR11,1)>REF(REF(VAR11,VAR13+1),1) AND VAR13<20 AND BARSLAST(REF(CROSS(50,VAR10),1))<3;
VAR15:=COUNT(CROSS(VAR10,VAR11),BARSLAST(VAR11>=20));
VAR16:=CROSS(VAR10,VAR11) AND VAR11<20 AND (COUNT(VAR15=2,21))=1;
VAR17:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
VAR18:=CROSS(VAR17,3);
VAR19:=MA("KDJ.J#week"(9,3,3),5);
VAR20:=CROSS(J,REF(J,1)) AND VAR19-REF(VAR19,1)>0.2 AND J<60 AND VAR19<50;
VAR21:=CROSS(J13,1) AND CROSS(J55,1) AND (CROSS(K55,1) OR K55>REF(K55,1) AND D55<5) OR VAR17<5 AND CROSS(J13,3) AND CROSS(J55,3) AND CROSS(K55,3);
VAR22:=VAR17<3 AND J13<1 AND J55<1 AND K55<2 OR VAR18 AND VAR17<6 AND REF(D55<20,3) OR VAR20 OR VAR21;
TP1:=LLV(LOW,60)*1.01;
TP2:=LLV(HIGH,30)*1.01;
TP3:=VAR5;
TP4:=BARSLAST(CROSS(TP1,TP3));
TP5:=REF(LOW,TP4);
TP6:=BARSLAST(CROSS(TP3,TP1));
TP7:=REF(LOW,TP6);
TP8:=BARSLAST(CROSS(TP3,TP2));
TP9:=REF(LOW,TP8);
TP10:=IF(TP4>TP6,TP7,TP5);
TP:=IF(TP8<TP6 AND TP8<TP4,TP9,TP10);
IF YX3<1 OR YX3>2 THEN BEGIN
五天:MA5,colorFFFFFF;
十天:FA,colorFFEE;
操作:MA14,colorFF00FF;
牛熊:MA25,colorCC00;
六零:MA60,LINETHICK2,colorFAABEC;
黄金线:HJX,LINETHICK2,color9999;
PARTLINE(HJXCS,HJX),LINETHICK2,color88;
短顶:VAR4,colorFF6699;
短底:VAR5,color999999;
END;
IF YX3=1 THEN BEGIN
突破:TP,LINEDOT,colorAA66AA;
进出:JC,color99FF;
支撑压力:ZCYL,colorFF66FF;
上轨:MA(HIGH,6),SHIFT2,colorAA00;
下轨:MA(LOW,6),SHIFT2,colorAA;
阻挡:ZD,LINETHICK2,colorAAAAAA;
底部:XC,LINETHICK1,colorD0D000;
END;
MA5DY:=MA5>REF(MA5,1);
MA10DY:=MA10>REF(MA10,1);
MA14DY:=MA14>REF(MA14,1);
MA25DY:=MA25>REF(MA25,1);
MA20DY:=B4>REF(B4,1);
MA60DY:=MA60>REF(MA60,1);
HJXDY:=HJX>REF(HJX,1);
MADY:=MA5DY AND MA14DY AND MA25DY AND HJXDY;
MXA:=LOW<REF(MAX(CLOSE,OPEN),1);
XGDY1:=K13>REF(K13,1);
XGDY2:=D13>REF(D13,1);
XGDY3:=J13>REF(J13,1);
XGDY4:=K55>REF(K55,1);
XGDY5:=D55>REF(D55,1);
XGDY6:=J55>REF(J55,1);
XGDY7:=VAR10>REF(VAR10,1);
XGDY8:=VAR11>REF(VAR11,1);
XGDY9:=XGDY1 AND XGDY2 AND XGDY3 AND XGDY4 AND XGDY5 AND XGDY6;
XGDY10:=XGDY1 AND XGDY3 AND XGDY4 AND XGDY6;
XGDY:=VAR5=REF(VAR5,1) AND XC=REF(XC,1);
XGSC1:=CROSS(K13,D13);
XGSC2:=CROSS(K55,D55);
XGSC3:=CROSS(VAR10,VAR11) AND XGDY7;
XGSC4:=(BARSLAST(CROSS(J13,0) OR CROSS(J13,K55) AND CROSS(J13,D55) OR XGSC1))<2 AND (CROSS(J55,0) OR J55<0 AND XGDY6);
LK:=CROSS(CLOSE,TP) AND VA=1;
YS1:=DMA(CLOSE,VOL/MA(VOL,4)/4);
YS2:=DMA(CLOSE,VOL/MA(VOL,32)/32);
YS3:=(CLOSE-YS1)/YS1*100<-8;
YS4:=(YS1-YS2)/YS2*100<-21;
逆势出招:=YS3 AND YS4 AND VAR22 AND (OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05 OR CROSS(VAR17,1) AND XGSC1 AND D55<5 AND (XGSC3 OR XGDY7 AND XGDY8) AND (CROSS(VAR11,50) OR VAR10<50);
CD1:=REF(CLOSE,2)*0.865;
CD2:=REF(CLOSE,13)*0.772;
CD3:=100*VOL/CAPITAL;
CD4:=REF((CLOSE-MIN(CD1,CD2))/CLOSE<0.1 AND SUM(CD3,5)/5<1.8,1);
CD5:=VAR20 AND (CROSS(J55,0) AND D55<20 OR CROSS(VAR17,10) OR CROSS(VAR17,1) AND D55<3 OR VAR21) AND XGDY8;
CD6:=VAR18 AND REF(D55<20,3) AND (CROSS(J,0) AND CROSS(J13,0) AND CROSS(J55,0) OR CROSS(VAR17,10) OR VAR20) AND VAR12>99.5;
CD7:=J<-24 AND J13<-24 AND VAR17<18 OR CROSS(VAR17,10) AND CROSS(K13,D13) AND CROSS(K55,D55) AND D55<VAR17;
CD8:=REF(D55<20,3) AND CROSS(J,0) AND CROSS(J13,0) AND CROSS(J55,0) AND VAR17<5 AND D55<3 AND K13<10;
CD9:=CROSS(J,-4) AND CROSS(J13,-4) AND CROSS(J55,-4) AND (CROSS(VAR17,0) OR VAR18);
CD10:=VAR18 AND REF(CROSS(20,VAR11),1) AND CROSS(VAR11,20);
CD11:=CROSS(VAR10,20) AND CROSS(VAR11,20) AND VAR10<36 AND REF(CROSS(20,VAR10) AND CROSS(20,VAR11),1);
CD12:=LOW<=VAR5 AND CLOSE>REF(OPEN,1) AND CROSS(VAR11,20) AND REF(CROSS(VAR10,20),1) AND REF(CROSS(20,VAR10) AND CROSS(20,VAR11),2);
抄底:=逆势出招=0 AND VAR11<20 AND (CD4 AND (VAR22 AND VAR12>99.5 OR CD11) OR CD5 OR CD6 OR CD7 OR CD8 OR CD9 OR CD10 OR CD12) AND (XGSC3 OR XGDY7 AND XGDY8) AND (CROSS(VAR11,50) OR VAR10<50) OR XGSC3 AND CROSS(VAR11,20) AND REF(XGDY8,1) AND REF(XGDY8,2) AND VAR5=REF(VAR5,9);
DRAWTEXT(FILTER(抄底,3) AND REF(逆势出招=0,1),LOW-0.05,'抄底'),colorFF00;
DRAWTEXT(FILTER(逆势出招,3),LOW*0.96,'逆势出招'),colorF0F000;
ZZ1:=MA5DY AND MA10DY AND VAR17>REF(VAR17,1) AND (CROSS(CLOSE,MA14) AND HJXCS OR MA5>MA14 AND XGDY7) AND VAR10>REF(VAR10,3);
ZZ2:=CROSS(MA5,HJX) AND (CROSS(CLOSE,MA25) AND REF(CLOSE>=OPEN,1) OR MA10DY) AND HJXCS AND (CROSS(MA5,MA60) OR CROSS(MA5,MA14) AND (MA14DY OR HJXDY) OR XGDY9 AND D55<20);
ZZ3:=XGSC1 AND CROSS(MA10,MA25) AND CROSS(K55,20) AND XGDY9 AND VAR10<80 AND VAR10<85;
ZZ4:=(XGSC3 OR VAR10/VAR11>REF(VAR10/VAR11,1)) AND CROSS(MA5,MA25) AND CROSS(MA10,MA14-0.01) AND XGDY9 AND D55<20 AND MA14DY AND HJXDY AND HJXCS;
ZZ5:=XGSC3 AND CROSS(VAR10,85) AND XGDY9 AND MA5DY AND MA10DY AND MA14DY AND HJXDY AND CLOSE>OPEN AND D55<20;
ZZ6:=CROSS(VAR17,REF(VAR17,1)) AND J-REF(J,1)>10 AND BARSLAST(CROSS(J13,0))<5 AND CROSS(K13,20) AND CROSS(VAR17,20) OR VAR20 AND CROSS(VAR17,50) AND D55>REF(D55,1) OR CROSS(D,VAR17) AND CROSS(K13,20);
追涨:=D55>REF(D55,2) AND D55>REF(D55,6) AND J13<110 AND J13>REF(J13,3) AND (ZZ6 OR VAR5<=REF(VAR5,3) AND 冲涨回调=0 AND VAR10>REF(VAR10,4) AND (ZZ1 OR ZZ2 OR ZZ3 OR ZZ4 OR ZZ5)) AND OPEN<REF(HIGH,1);
DRAWTEXT(FILTER(追涨,3),LOW*0.96,'追涨'),color99FF;
DX1:=REF(B4,1);
DX2:=(B4-DX1)/DX1*100;
DX3:=MA(DX2,3);
DX4:=(B4-MA30)/MA30*100;
DX5:=IF(BETWEEN(DX4,-2,5),2,0);
DX6:=MAX(B4,MA30);
DX7:=MAX(DX6,MA55);
DX8:=MIN(B4,MA30);
DX9:=MIN(DX8,MA55);
DX10:=(DX7/DX9-1)*100;
DX11:=IF(DX10<=8,1,0);
DX12:=FILTER((DX5 OR DX11) AND MA10>REF(MA10,1) AND (COUNT(MA30>REF(MA30,1),3))=3 AND MA30>MA55 AND COUNT(CROSS(MA5,MA30),3) AND DX2>DX3 AND MA(VOL,5)>MA(VOL,60) AND LOW<=REF(HIGH,1) AND MA(VOL,60)>REF(MA(VOL,60),1),5) AND (XGDY9 OR XGSC3 AND XGDY8) AND VAR5=REF(VAR5,3) AND J55<100;
DRAWTEXT(DX12,MA5*0.98,'还会涨'),colorDDBB;
ZM1:=CROSS(MA3,MA55) AND CROSS(CLOSE,HJX) AND CROSS(CLOSE,MA60) AND CROSS(CLOSE,MA10) AND CROSS(CLOSE,B4) AND CROSS(CLOSE,MA30) AND CROSS(CLOSE,ZD);
ZM2:=BARSLAST(CROSS(CLOSE,LLV(HIGH,30)))<5 AND BARSLAST(CROSS(HJX,MA60))<5 AND (EMA(CLOSE,3)+MA(CLOSE,3))/2>HJX;
ZM3:=MA(VOL,34)>REF(MA(VOL,34),1) AND MA(VOL,5)>REF(MA(VOL,5),1) AND VOL>REF(VOL,1) AND MA(VOL,20)>REF(MA(VOL,20),1) AND MA(VOL,20)>MA(VOL,34);
ZM4:=ZM1 AND ZM2 AND ZM3 AND (XGDY9 OR XGSC3 AND XGDY8);
DRAWTEXT(ZM4,LOW*0.98,'坚决买'),colorDD00DD;
钱袋:=B4>MA30 AND B4>REF(B4,1) AND MA30>REF(MA30,1) AND B4-MA30>REF(B4-MA30,1);
进钱:=FILTER(钱袋 AND "MACD.DIFF"<0.15 AND "MACD.DIFF">REF("MACD.DIFF",1) AND MA(VOL,60)>REF(MA(VOL,60),1) AND MA(VOL,5)>MA(VOL,10) AND DX2>REF(DX2,1) AND (LOW<=B4 AND CLOSE>B4 OR CROSS(MA5,B4)),5) AND XGDY7 AND XGDY8 AND XGDY9;
DRAWTEXT(进钱,MA5*0.96,'备钱袋'),color99DD;
LC:=REF(CLOSE,1);
RSI12:=(SMA(MAX(CLOSE-LC,0),12,1))/(SMA(ABS(CLOSE-LC),12,1))*100;
RS1:=REF(RSI12,3)=HHV(RSI12,2*3+1);
RS2:=BACKSET(RS1,3+1);
RS3:=FILTER(RS2,3) AND RSI12=HHV(RSI12,3+1);
RS4:=BARSTATUS=2 AND REF(RS3,BARSLAST(RS3));
RS5:=BACKSET(RS4,BARSLAST(RS3)+1);
RS6:=RS5>REF(RS5,1);
RS7:=REF(BARSLAST(RS3),1);
RS8:=BACKSET(RS6,RS7+2);
RS9:=RS8>REF(RS8,1);
RS10:=(REF(RSI12,BARSLAST(RS6))-REF(RSI12,BARSLAST(RS9)))/(BARSLAST(RS9)-BARSLAST(RS6));
阻力值:=REF(RSI12,BARSLAST(RS6))+BARSLAST(RS6)*RS10;
DRAWTEXT(CROSS(RSI12,阻力值),LOW*0.96,IF(阻力值<REF(阻力值,1),'阻力↓','阻力↑')),colorDD00;
RS11:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
RSIBL:=REF(CLOSE,RS11+1)>CLOSE AND REF("RSI.RSI1",RS11+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(FILTER(RSIBL>0,5),LOW,'Rsi底背'),colorFF00;
持股:=CROSS(CLOSE,TP) AND MXA AND TP=REF(TP,1) AND XGDY9 AND VAR10<20 AND VAR6=REF(VAR6,4) AND XC=REF(XC,4) AND VAR5=REF(VAR5,4) AND MA5DY AND MA14DY AND MA25DY AND HJXDY AND J13<105 AND J55<100;
DRAWTEXT(FILTER(持股,4),LOW*0.99,'持股'),colorFFFF;
选牛:IF(ZD<ZCYL AND XGDY10 AND XGDY AND CLOSE>REF(CLOSE,1) AND (CROSS(XC,MA5) OR CROSS(ZD,MA14)) OR CROSS(TP,MA5) AND ZCYL<VAR5 AND VAR5=REF(VAR5,1) AND XGSC4,1,0),LINETHICK0;
选股:IF(追涨 OR 选牛 OR RSIBL OR 进钱 OR 逆势出招 OR 抄底 OR 持股 OR ZM4 OR DX12 OR CROSS(RSI12,阻力值) AND 阻力值<REF(阻力值,1) AND (VAR11<50 OR VAR19<50) AND (XGDY7 OR XGDY8),19,0),LINETHICK0;
特选:IF((ZD=XC OR ZD/XC<1.01) AND (CLOSE<MA30 OR LOW<MA3 AND (CROSS(MA3,HJX) OR CROSS(MA5,HJX) OR CROSS(MA10,HJX) OR CROSS(MA10,MA30) OR CROSS(HJX,MA30) OR CROSS(MA10,MA60))) OR CROSS(CLOSE,XC) AND CROSS(CLOSE,ZD) OR CROSS(LOW,XC) AND CROSS(LOW,ZD),20,0),LINETHICK0;
KOH:=LOW>REF(HIGH,1);
KOL:=HIGH<REF(LOW,1);
HIF:=LOW>REF(HIGH,BARSLAST(KOH)+1);
NHIF:=LOW<=REF(HIGH,BARSLAST(KOH)+1);
LIF:=HIGH<REF(LOW,BARSLAST(KOL)+1);
NLIF:=HIGH>=REF(LOW,BARSLAST(KOL)+1);
上缺口:=HIF AND BARSLAST(KOH)<BARSLAST(NHIF) AND BARSLAST(HIF)<BARSLAST(NHIF);
下缺口:=LIF AND BARSLAST(KOL)<BARSLAST(NLIF) AND BARSLAST(LIF)<BARSLAST(NLIF);
MRZY:=ROUND(((REF(HIGH,1)-REF(LOW,1))*8/10+CLOSE)*100)/100;
MRZS:=ROUND((CLOSE-(REF(HIGH,1)-REF(LOW,1))*8/20)*100)/100;
STICKLINE(CLOSE>OPEN AND ISLASTBAR,MRZY,MRZS,8,1),SHIFT1,colorFF00FF;
STICKLINE(CLOSE<=OPEN AND ISLASTBAR,MRZY,MRZS,8,1),SHIFT1,colorFFFF00;
KX1:=CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1);
STICKLINE(KX1,CLOSE,OPEN,8,0),color11AA;
STICKLINE(KX1,CLOSE,OPEN,6,0),color22AA;
STICKLINE(KX1,CLOSE,OPEN,4,0),color33AA;
STICKLINE(KX1,CLOSE,OPEN,2,0),color44AA;
STICKLINE(KX1,HIGH,LOW,0,0),colorDD;
KX2:=CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1);
STICKLINE(KX2,CLOSE,OPEN,8,0),colorFF5511;
STICKLINE(KX2,CLOSE,OPEN,6,0),colorFF6611;
STICKLINE(KX2,CLOSE,OPEN,4,0),colorFF7711;
STICKLINE(KX2,CLOSE,OPEN,2,0),colorFF8811;
STICKLINE(KX2,HIGH,LOW,0,0),colorFF9911;
STICKLINE(VA=1,OPEN,(OPEN+CLOSE)/2,8,0),color99FF;
STICKLINE(VA=1,OPEN,(OPEN+CLOSE)/2,6,0),colorAAFF;
STICKLINE(VA=1,OPEN,(OPEN+CLOSE)/2,4,0),colorBBFF;
STICKLINE(VA=1,OPEN,(OPEN+CLOSE)/2,2,0),colorCCFF;
STICKLINE(VA=1,OPEN,(OPEN+CLOSE)/2,0,0),colorDDFF;
STICKLINE(MA(CLOSE,13)>OPEN AND CLOSE>MA(CLOSE,13),CLOSE,OPEN,0.8,1),colorFFFF;
DRAWICON(CROSS(JC,ZCYL),ZCYL*0.99,6);
DRAWTEXT(CLOSE/REF(CLOSE,1)>=1.095,CLOSE*0.998,'涨\n停'),ALIGN0,colorFFFFFF;
DRAWTEXT(FILTER(CROSS(VAR3,MA5-0.012),3),HIGH*1.06,'跑'),ALIGN0,colorF0F000;
AVX:=B12;
DSLX:=CLOSE/INDEXC;
DSLX1:=MA(DSLX,5);
DSLX2:=MA(DSLX,10);
V1:=MA(VOL,5);
V2:=MA(VOL,10);
阻力:=IF(CLOSE>200,CLOSE*1.01,CLOSE*1.07);
阻力位:=IF(CLOSE<10,CLOSE*1.05,阻力);
止损:=IF(CLOSE>200,CLOSE*0.99,CLOSE*0.93);
止损位:=IF(CLOSE<10,CLOSE*0.95,止损);
TS1:=BARSTATUS=2 AND CLOSE<200;
TS2:=BARSCOUNT(CLOSE)=SYSPARAM(1) AND CLOSE>200;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1>=V2 AND DSLX>=DSLX1,1,380,2,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1<V2 AND DSLX>=DSLX1,1,400,2,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1>V2 AND DSLX<DSLX1,1,310,2,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1<=V2 AND DSLX<DSLX1,1,380,2,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX>=DSLX1,1,370,2,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX>=DSLX1,1,420,2,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX<DSLX1,1,640,2,'该股放量下跌,走势明显偏弱,离场观望。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX<DSLX1,1,666,2,'该股缩量下跌,走势偏弱,离场观望。'),colorEE00;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX>=DSLX1,1,560,2,'该股形态良好,强势明显,量能充足,可以继续持有。'),colorFFFF;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX>=DSLX1,1,500,2,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险。'),colorEEEE;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX<DSLX1,1,580,2,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。'),colorDDDD;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX<DSLX1,1,620,2,'该股走势趋弱,量能不足,减持大部分筹码。'),colorCCCC;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX>=DSLX1,1,546,2,'该股形态不佳,注意成交量的变化,但目前不适合参与。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX>=DSLX1,1,526,2,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX<DSLX1,1,540,2,'该股有走强迹象,但量能不足,趋势不明,不适合操作。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX<DSLX1,1,726,2,'该股走势太弱,没有参与价值。'),colorAAAA;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1>=V2,1,400,1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右 '),ALIGN4,colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1>=V2,1,368,60,'如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎。'),colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1<V2,1,488,1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌 '),colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1<V2,1,456,60,'可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。'),colorFF;
DRAWTEXTEX(TS2 AND CROSS(1,AVX) AND V1>=V2,1,628,2,'大盘形态走坏,重仓者可以减去大部分仓位。'),colorFF00;
DRAWTEXTEX(TS2 AND CROSS(1,AVX) AND V1<V2,1,648,2,'大盘缩量调整,注意风险,短线清仓观望。'),colorFF00;
DRAWTEXTEX(TS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2,1,580,2,'大盘走势良好,量能理想,可以继续持有强势股。'),colorFFFF;
DRAWTEXTEX(TS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2,1,580,2,'大盘形态良好,但量能稍显不足,随时准备减仓。'),colorFFFF;
DRAWTEXTEX(TS2 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2,1,560,2,'大盘趋势不明,注意成交量变化,目前不适宜进场。'),colorDD00;
DRAWTEXTEX(TS2 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2,1,660,2,'大盘趋势向下,量能萎缩,不适合进场。'),colorCC00;
TS1:=BARSTATUS=2 AND CLOSE<200;
TS2:=BARSCOUNT(CLOSE)=SYSPARAM(1) AND CLOSE>200;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1>=V2 AND DSLX>=DSLX1,1,380,2,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1<V2 AND DSLX>=DSLX1,1,400,2,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1>V2 AND DSLX<DSLX1,1,310,2,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(AVX,1) AND V1<=V2 AND DSLX<DSLX1,1,380,2,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。'),colorDD;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX>=DSLX1,1,370,2,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX>=DSLX1,1,420,2,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX<DSLX1,1,640,2,'该股放量下跌,走势明显偏弱,离场观望。'),colorEE00;
DRAWTEXTEX(TS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX<DSLX1,1,666,2,'该股缩量下跌,走势偏弱,离场观望。'),colorEE00;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX>=DSLX1,1,560,2,'该股形态良好,强势明显,量能充足,可以继续持有。'),colorFFFF;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX>=DSLX1,1,500,2,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险。'),colorEEEE;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX<DSLX1,1,580,2,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。'),colorDDDD;
DRAWTEXTEX(TS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX<DSLX1,1,620,2,'该股走势趋弱,量能不足,减持大部分筹码。'),colorCCCC;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX>=DSLX1,1,546,2,'该股形态不佳,注意成交量的变化,但目前不适合参与。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX>=DSLX1,1,526,2,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX<DSLX1,1,540,2,'该股有走强迹象,但量能不足,趋势不明,不适合操作。'),colorDDAA;
DRAWTEXTEX(TS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX<DSLX1,1,726,2,'该股走势太弱,没有参与价值。'),colorAAAA;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1>=V2,1,400,1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右 '),ALIGN4,colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1>=V2,1,368,60,'如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎。'),colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1<V2,1,488,1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌 '),colorFF;
DRAWTEXTEX(TS2 AND CROSS(AVX,1) AND V1<V2,1,456,60,'可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。'),colorFF;
DRAWTEXTEX(TS2 AND CROSS(1,AVX) AND V1>=V2,1,628,2,'大盘形态走坏,重仓者可以减去大部分仓位。'),colorFF00;
DRAWTEXTEX(TS2 AND CROSS(1,AVX) AND V1<V2,1,648,2,'大盘缩量调整,注意风险,短线清仓观望。'),colorFF00;
DRAWTEXTEX(TS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2,1,580,2,'大盘走势良好,量能理想,可以继续持有强势股。'),colorFFFF;
DRAWTEXTEX(TS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2,1,580,2,'大盘形态良好,但量能稍显不足,随时准备减仓。'),colorFFFF;
DRAWTEXTEX(TS2 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2,1,560,2,'大盘趋势不明,注意成交量变化,目前不适宜进场。'),colorDD00;
DRAWTEXTEX(TS2 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2,1,660,2,'大盘趋势向下,量能萎缩,不适合进场。'),colorCC00;
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;
H1:=D1 AND NOT(D2 AND E1>=E2) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 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 BARSTATUS=2 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);
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J2:=J1>REF(J1,1);
A3:=HIGH;
B3:=REF(HIGH,REF(BARSLAST(HD),1)+1)>REF(HIGH,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD;
E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);
HH:=E3>REF(E3,1);
A4:=LOW>REF(LOW,REF(BARSLAST(LD),1)+1);
B4:=REF(LOW,REF(BARSLAST(LD),1)+1);
D4:=A4 AND B4 AND LD;
E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);
LL:=E4>REF(E4,1);
H3:=HH OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X3:=REF(BARSLAST(H3),1)+1;
F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,LOW,POW(10,20)),X3));
G3:=F3>REF(F3,1);
I3:=BACKSET(G3,2);
LZ:=I3>REF(I3,1);
L4:=LZ OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X4:=REF(BARSLAST(L4),1)+1;
F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,HIGH,-POW(10,20)),X4));
G4:=F4>REF(F4,1);
I4:=BACKSET(G4,2);
HZ:=I4>REF(I4,1);
K1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);
K2:=K1>REF(K1,1);
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
IF YX3=2 THEN BEGIN
DRAWLINE(XX,LOW,VV,LOW,1),POINTDOT,colorCC00;
YLZC1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
YLZC2:=CROSS(YLZC1,0.9);
YLZC3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
YLZC4:=CROSS(YLZC3,0.9);
压力:REF(HIGH,BARSLAST(YLZC2)),LINETHICK1,colorEA91B5;
支撑:REF(LOW,BARSLAST(YLZC4)),LINETHICK1,colorB4FF;
DRAWLINE(XX2,HIGH,VV2,HIGH,1),POINTDOT,colorFFFF;
前一低:REF(LOW,BARSLAST(VV)),LINEDASHDOT,color99FF66;
前二低:REF(LOW,BARSLAST(XX)),LINEDASHDOT,colorFF66FF;
前一高:REF(HIGH,BARSLAST(VV2)),LINEDASHDOT,color99FF66;
前二高:REF(HIGH,BARSLAST(XX2)),LINEDASHDOT,colorFF66FF;
短高:=REF(HIGH,BARSLAST(VV2));
短低:=REF(LOW,BARSLAST(VV));
短比:=(CLOSE-短低)/(短高-短低);
底:=REF(LOW,BARSLAST(VV));
頂:=REF(HIGH,BARSLAST(VV2));
STICKLINE(VV,頂,底,0,0),LINETHICK2,colorAA00;
DRAWLINE(VV2,HIGH,VV,LOW,0),LINETHICK2,colorAA00;
DRAWLINE(VV2,HIGH,VV,頂,0),LINETHICK2,colorAA00;
STICKLINE(VV2,頂,底,0,0),LINETHICK2,color99;
DRAWLINE(VV,LOW,VV2,HIGH,0),LINETHICK2,color99;
DRAWLINE(VV,LOW,VV2,底,0),LINETHICK2,color99;
END;
ZCZL:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
ZL:=IF(CLOSE=INDEXC,ZCZL+INDEXC-INDEXL,ZCZL+CLOSE-LOW);
ZC:=IF(CLOSE=INDEXC,INDEXL+INDEXC-ZCZL,LOW+CLOSE-ZCZL);
今压:=REF(ZL,1);
今撑:=REF(ZC,1);
明压:=ZL;
明撑:=ZC;
DRAWTEXTEX(BARSTATUS=2,1,562,999,'今压:'),colorCC00CC;
DRAWTEXTEX(BARSTATUS=2,1,606,999,NUMTOSTR(今压,2)),colorFFFFFF;
DRAWTEXTEX(BARSTATUS=2,1,662,999,'今撑:'),colorCC9900;
DRAWTEXTEX(BARSTATUS=2,1,706,999,NUMTOSTR(今撑,2)),colorFFFFFF;
DRAWTEXTEX(BARSTATUS=2,1,762,999,'明压:'),color99DD;
DRAWTEXTEX(BARSTATUS=2,1,806,999,NUMTOSTR(明压,2)),colorFFFFFF;
DRAWTEXTEX(BARSTATUS=2,1,862,999,'明撑:'),color9900;
DRAWTEXTEX(BARSTATUS=2,1,906,999,NUMTOSTR(明撑,2)),colorFFFFFF;
STICKLINE(REF(LOW,BARSLAST(XX)) AND BARSTATUS=2,REF(LOW,BARSLAST(XX)),REF(LOW,BARSLAST(XX)),20,0),color99AA;
DRAWTEXT(ISLASTBAR,REF(LOW,BARSLAST(XX)),NUMTOSTR(REF(LOW,BARSLAST(XX)),2)),SHIFT1,PXUP6,colorFFFFFF;
DRAWTEXT(ISLASTBAR,REF(HIGH,BARSLAST(VV2)),NUMTOSTR(REF(HIGH,BARSLAST(VV2)),2)),SHIFT1,PXUP6,colorFFFF;
[url=http://www.goodgupiao.com/gupiaogongshi/4828.html][B]灏然天空[/B][/url]