趋势判断源码
-
相关简介:本人发贴不为其它,因为看到小散被各种消息搞晕了头脑,实在于心不忍,因为本人不会贴图,所以只发源码,再次发出趋势判断,本指标曾经发过也说明过用法,希望对大家有所帮助, DRAWGBK(DATE900101,COLORRGB(95,95,95),COLORRGB(0,0,0),1); STICKLINE(C0,0,0,20,0); 主力1:=REF(LOW,1);主力2:=(SMA(ABS(LOW-主力1),13,1))/(SMA(MAX(LOW-主力1,0),13,1)); 主力3:=EMA(主力
-
文章来源:股海网作者:股海网发布时间:2014-11-27浏览次数:
本人发贴不为其它,因为看到小散被各种消息搞晕了头脑,实在于心不忍,因为本人不会贴图,所以只发源码,再次发出趋势判断,本指标曾经发过也说明过用法,希望对大家有所帮助,
DRAWGBK(DATE>900101,COLORRGB(95,95,95),COLORRGB(0,0,0),1);
STICKLINE(C>0,0,0,20,0);
主力1:=REF(LOW,1);主力2:=(SMA(ABS(LOW-主力1),13,1))/(SMA(MAX(LOW-主力1,0),13,1));
主力3:=EMA(主力2,13);主力4:=LLV(LOW,34);主力5:=EMA(IF(LOW<=主力4,主力3,0),3);
主力潜入:STICKLINE(主力5,0,-(主力5)/2,6,1),COLORYELLOW;
W1:=EMA(C,4)-EMA(C,18),COLORRED;
W2:=EMA(W1,8),COLORGREEN;
W3:=MA(C,7)-MA(C,21);
W3A:=EMA(W3,5),COLORMAGENTA;
趋势:(eMA(C,10)+eMA(C,15))/2-(eMA(C,60)+eMA(C,89))/2,COLORWHITE,LINETHICK2;
长:EMA(趋势,28),COLORGRAY,LINETHICK2;;
中:EMA(趋势,7),COLOR00bb00,LINETHICK2;
势:2*(趋势-长),COLORSTICK;
动力线:EMA(势,5),COLOR9900FF,LINETHICK2;
PARTLINE(动力线<REF(动力线,1),动力线),COLORBLUE,LINETHICK2;
PARTLINE(趋势>中,趋势),COLORRED,LINETHICK2;
MACDFS:= IF(势<=0,势,0),COLOR00FF00,LINETHICK2;
STICKLINE(MACDFS>REF(MACDFS,1),MACDFS,0,3,0),COLORWHITE;
MACDZS:=IF(势>=0,势,0),COLORFF00FF,LINETHICK2;
STICKLINE(MACDZS>REF(MACDZS,1),MACDZS,0,3,0),COLORRED;
VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*10;
VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*10;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*10;
VAR5:=(VAR2+2*VAR3+3*VAR4)/6;
VAR6:=MA(VAR5,4)/3,COLORWHITE;
VAR7:=MA(VAR6,3),COLORYELLOW;
AB:=IF(STKTYPE=0,SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))+VAR5,7,1)*100,SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))+VAR5,7,1));
AC:=SMA(AB,3,1);
波:3*AB-2*AC,COLORRED,LINETHICK1;
段:EMA(SLOPE(AB,6)*20+AB,42),COLORGREEN;
波段线:=5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-3*SMA(SMA
((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-SMA(SMA(SMA
((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),2,1),LINETHICK1,COLORRED;
M1:=EMA(MA(波段线,5),3);
STICKLINE(波段线>108 AND 波段线>=M1,0,势*1.05,0.5,0),COLORF0F000;
STICKLINE(波段线<0 AND 波段线<M1,势,0,1,0),COLORRED;
XL1:=MA(LOW,2)*0.96;
XL2:=MA(LOW,26)*0.85;
XL3:REF(XL1,1)<XL2 AND REF(XL1,1)<XL1 AND REF(XL1,1)<REF(XL1,2);
STICKLINE(XL3,0,abs(势)/3,4,0),COLOR006EFF;
DRAWTEXT(XL3,abs(势)/1.5,'买'),COLOR0000FF,ALIGN0;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A:=REF(C,1);
RSI:=SMA(MAX(C-A,0),6,1)/SMA(ABS(C-A),6,1)*100;
A1:=(C/MA(C,5)-1)*100<-10;
A2:=(C/MA(C,13)-1)*100<-10;
A3:=(C/MA(C,34)-1)*100<-15;
A4:=RSI<18;
A5:=CCI<-120;
A6:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=1;
振幅:=(h-ref(l,5))/ref(l,5)*100;
X:=(波-段);
换手:=(v/CAPITAL*100);
活跃度:(振幅/5+换手/3+X/1),LINETHICK;
DIFF:=EMA(CLOSE,7)-EMA(CLOSE,21);
DEA:=EMA(DIFF,3);
MACD:=2*(DIFF-DEA);
DEA度:=IF(DEA>REF(DEA,1) AND DEA>0,2,IF(DEA>REF(DEA,1) AND DEA<0,1,0));
DIFF度:=IF(DIFF>DEA AND DEA>REF(DEA,1) AND DIFF>REF(DIFF,1),1,IF(DIFF>DEA AND DEA>REF(DEA,1) AND DIFF<REF(DIFF,1),0.5,0));
MACD度:=IF(MACD>REF(MACD,1) AND MACD>0,1,IF(MACD>REF(MACD,1) AND MACD<0,0.5,0));
M度:=DEA度+DIFF度+MACD度;
V35:=MA(V,35);
五日量:=SUM(V,5);
均量度:=IF(V>35 AND V35>REF(V35,1),2,IF(V<V35 AND V35>REF(V35,1),1,0));
增量度:=IF(五日量>REF(五日量,1),1,0);
量度:=均量度+增量度;
TR1:=SMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(L-REF(C,1))),14,1);
HD:=H-REF(H,1);
LD:=REF(L,1)-L;
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),6,1);
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),6,1);
PDI:=DMP*100/TR1;
MDI:=DMM*100/TR1;
PDI度:=IF(PDI>REF(PDI,1) AND PDI>MDI,1,IF(PDI>REF(PDI,1) AND PDI<MDI,0.5,0));
MDI度:=IF(MDI<REF(MDI,1) AND MDI<PDI,1,IF(MDI<REF(MDI,1) AND MDI>PDI,0.5,0));
DMI度:=PDI度+MDI度;
综合度:M度+量度+DMI度,COLORMAGENTA,PRECISION2,LINETHICK0;
底部:(A1 AND A2 AND A3 AND A4 and a5 AND A6)*2,COLOR00FFFF,LINETHICK2;
启动:(FILTER((CROSS((EMA(CLOSE,2)-EMA(CLOSE,10)),EMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2))
AND EMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2)<0 AND CROSS(C,MA(C,20))),90))*1;