相关标签: macd 与均线 、 macd与均线的最佳设置 、 macd与均线的综合运用 、 macd+kd+20均线ea 、 macd套用均线八法 、 均线 趋势 60分macd 、 均线上macd红缩柱 、 均线发散macd拐点向上 、 macd均线的涨跌速度 、
大智慧KDJ+ MACD+均线结合解盘源码
- Var31:=SARTURN( 10,2 ,20 );
- Var32:=ref(HIGH,1)*1.1;
- Var33:=HIGH*1.1;
- Var34:=(Var33*VOL+Var32*(CAPITAL-VOL))/CAPITAL;
- Var35:=ref(LOW,1)*0.9;
- Var36:=LOW*0.9;
- Var37:=(Var36*VOL+Var35*(CAPITAL-VOL))/CAPITAL;
- Var38:=EMA(Var37,20);
- Var39:=EMA(Var34,20);
- VarA:=Var39-1.5;
- VarB:=IF(CLOSE<=Var38,VarA,Var39);
- 别样:= VarB;
- 红:= VarA;
- CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
- WARNING('http://www.cxh99.com',CURRENTTIME>180000 and (CXH=3 OR CXH=8));
- DRAWTEXTREL(10 ,10 ,'');
- DRAWFLAGTEXT(别样=红,C ,'股价严重超跌,阶段底部可择机买入');
- 股价趋势:= 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);
- 买入:=IF(股价趋势<=10,30,0);
- DRAWFLAGTEXT(买入,C,'底部区域' );
- Var8:=LLV(LOW,26);
- Var6:=HHV(HIGH,34);
- Var7:=EMA((CLOSE-Var8)/(Var6-Var8)*4,4)*25;
- 派发:=IF((Var7>90),-30,0);
- DRAWFLAGTEXT(派发,C,'派发区域');
- b1:=AMOUNT/VOL/500;
- b2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
- d3:=SUM(AMOUNT,13)/b1/500;
- e4:=DMA(b2,VOL/d3);
- A1:=(CLOSE-e4)/e4*500 ;
- A2:=(CLOSE-e4)/e4*1000 ;
- 吸筹:=(CLOSE-MA(CLOSE,60))/MA(CLOSE,60)*500;
- DRAWFLAGTEXT((ref(a1,1)<-80 and a1>ref(a1,1)or ref(吸筹,1)<-80 and 吸筹>ref(吸筹,1)), C,'历史大底全仓买入');
- Var3o:=ref(CLOSE,1);
- Var4o:=SMA(MAX(CLOSE-Var3o,0),6,1)/SMA(ABS(CLOSE-Var3o),6,1)*100;
- 卖出:=CROSS(80,Var4o);
- DRAWFLAGTEXT(卖出, C,'高度危险,清仓');
- 生命指数:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),Color00FFFF;
- DRAWFLAGTEXT(IF(生命指数>92,生命指数,0),生命指数 ,'危险,清仓');
- DRAWFLAGTEXT((VOL/CAPITAL)>0.075 ,C,
- '换手过大,小心主力出逃,短期头部');
- K:="KD.K"(17,4,4);
- D:="KD.D"(17,4,4);
- K:="KD.K"(17,4,4);
- D:="KD.D"(17,4,4);
- DRAWFLAGTEXT(K>80 AND CROSS(D,K)=0,C,'KD指标提示该股已经处于超买状态,如果KD指标死叉应及时卖出。');
- DRAWFLAGTEXT(K<20 AND CROSS(K,D)=0,C,'KD指标提示该股已经处于超卖状态,如果KD指标金叉应及时买入。');
- DRAWFLAGTEXT(CROSS(K,D) AND LLV(K,3)<20,C,'KD低位金叉,建议买入。');
- DRAWFLAGTEXT(CROSS(D,K) AND HHV(K,3)>80,C,'KD高位死叉,建议卖出。');
- 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;
- DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
- DEA :=EMA(DIFF,9);
- MACD:=2*(DIFF-DEA);
- DRAWFLAGTEXT(cross("kdj.k"(9,3,3),"kdj.d"(9,3,3)) and"kdj.k"(9,3,3)<=20,C,'KDJ在20以下金叉,可关注!');
- DRAWFLAGTEXT(cross("kdj.d"(9,3,3),"kdj.k"(9,3,3)) and"kdj.k"(9,3,3)>=80,C,'KDJ在80以上死叉,注意风险!');
- DRAWFLAGTEXT("MAcd.MAcd"(12,26,9)>ref("MAcd.MAcd"(12,26,9),1) and "MAcd.MAcd"(12,26,9)>0,C,'MACD的红柱增长。');
- DRAWFLAGTEXT("MAcd.MAcd"(12,26,9)<ref("MAcd.MAcd"(12,26,9),1) and "MAcd.MAcd"(12,26,9)>0,C,'MACD的红柱缩短。');
- DRAWFLAGTEXT("MAcd.MAcd"(12,26,9)<ref("MAcd.MAcd"(12,26,9),1) and "MAcd.MAcd"(12,26,9)<0,C,'MACD的绿柱增长。');
- DRAWFLAGTEXT("MAcd.MAcd"(12,26,9)>ref("MAcd.MAcd"(12,26,9),1) and "MAcd.MAcd"(12,26,9)<0,C,'MACD的绿柱缩短。');
- DRAWFLAGTEXT(cross("MAcd.diff"(12,26,9),"MAcd.dea"(12,26,9)) and "MAcd.MAcd"(12,26,9)<=0,C,'MACD的DIFF与DEA在0轴或0轴下金叉。');
- DRAWFLAGTEXT(cross(MA(c,10),MA(c,20)) and MA(c,5)>MA(c,10) and MA(c,10)>MA(c,20),C,'短期均线今日多头排列。');
- DRAWFLAGTEXT(cross(MA(c,20),MA(c,10)) and MA(c,5)<MA(c,10) and MA(c,10)<MA(c,20),C,'短期均线今日空头排列。');
- DRAWFLAGTEXT(MA(c,5)>=ref(MA(c,5),1) and count(ref(MA(c,5),1)<ref(MA(c,5),2),5)=5,C,'5日均线已开始走平或勾头向上,股价有可能走出低部,密切关注!');
- DRAWFLAGTEXT(cross(c,MA(c,5)),C,'今日股价站上5日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,10)),C,'今日股价站上10日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,20)),C,'今日股价站上20日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,30)),C,'今日股价站上30日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,60)),C,'今日股价站上60日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,120)),C,'今日股价站上120日均线!');
- DRAWFLAGTEXT(cross(c,MA(c,240)),C,'今日股价站上240日均线!');
- DRAWFLAGTEXT(cross(MA(c,5),c),C,'今日股价下穿5日均线!');
- DRAWFLAGTEXT(cross(MA(c,10),c),C,'今日股价下穿10日均线!');
- DRAWFLAGTEXT(cross(MA(c,20),c),C,'今日股价下穿20日均线!');
- DRAWFLAGTEXT(cross(MA(c,30),c),C,'今日股价下穿30日均线!');
- DRAWFLAGTEXT(cross(MA(c,60),c),C,'今日股价下穿60日均线!');
- DRAWFLAGTEXT(cross(MA(c,120),c),C,'今日股价下穿120日均线!');
- DRAWFLAGTEXT(cross(MA(c,240),c),C,'今日股价下穿240日均线!');
- DRAWFLAGTEXT(MA(c,30)>MA(c,20) and MA(c,20)>MA(c,10) and MA(c,10)>MA(c,5) and c<MA(c,5) ,C,'5日、10日、20日、30日均线空头排列,并且股价在5日均线之下,持币观望!');
- DRAWFLAGTEXT(MA(c,5)>MA(c,10) and MA(c,10)>MA(c,20) and MA(c,20)>MA(c,30) and c>MA(c,5) ,C,'5日、10日、20日、30日均线多头排列,并且股价在5日均线之上,可继续持有!');
- c1:=c/ref(eMA(c,30),30);
- c2:=indexc/ref(eMA(indexc,30),30);
- l1:=c1/c2*10-10;
- c3:=c/MA(c,60);
- c4:=indexc/MA(indexc,60);
- l2:=c3/c4*10-10;
- c5:=c/MA(c,120);
- c6:=indexc/MA(indexc,120);
- l3:=c5/c6*10-10;
- L4:=MA(L1+L2+L3,5);
- DRAWFLAGTEXT(ref(L4,1)>0 AND ref(L4,1)>ref(L4,2),C,'该股中长期走势强于大盘,且近期继续走强。');
- DRAWFLAGTEXT(ref(L4,1)>0 AND ref(L4,1)<=ref(L4,2),C,'该股中长期走势强于大盘,但近期有所走弱。');
- DRAWFLAGTEXT(ref(L4,1)<=0 AND ref(L4,1)>ref(L4,2),C,'该股中长期走势弱于大盘,但近期有所转强。');
- DRAWFLAGTEXT(ref(L4,1)<=0 AND ref(L4,1)<=ref(L4,2),C,'该股中长期走势弱于大盘,且近期继续走弱。');
- 半年线:=EMA(C,148);
- 年线:=EMA(C,250);
- DRAWFLAGTEXT(C>=半年线,C,'股价在半年线之上');
- DRAWFLAGTEXT(C>=年线,C,'股价在年线之上');
- DRAWFLAGTEXT(C<半年线,C,'股价在半年线之下');
- DRAWFLAGTEXT(C<年线,C,'股价在年线之下');
- DRAWFLAGTEXT(半年线>=ref(半年线,1),C,'半年线趋势向上'); {内容来至程序化交易网 CXH99.COM}
- DRAWFLAGTEXT(年线>=ref(年线,1),C,'年线趋势向上');
- DRAWFLAGTEXT(半年线<ref(半年线,1),C,'半年线趋势向下');
- DRAWFLAGTEXT(年线<ref(年线,1),C,'年线趋势向下');
- TYP := (HIGH + LOW + CLOSE)/3;
- 货币比:=SUM(IF(TYP>ref(TYP,1),TYP*VOL,0),14)/SUM(IF(TYP<ref(TYP,1),TYP*VOL,0),14);
- MFI:=100-(100/(1+货币比));
- a1:=count(cross(mfi,80),20);
- a2:=count(cross(20,mfi),20);
- DRAWFLAGTEXT(mfi<20,C,'mfi指标在20以下处于超卖信号区,不久将要上涨') ;
- DRAWFLAGTEXT(mfi>80,C,'mfi指标在80以上处于超买信号区,股价将要下跌') ;
- DRAWFLAGTEXT(a1,C,'mfi指标在两月前曾发出超买信号,表明股价将会下跌') ;
- DRAWFLAGTEXT(a2,C,'mfi指标在两月前曾发出超卖信号,表明股价将会上涨') ;
- {盖印}
- DRAWRECTABS(0,0,30,35,rgb(250,60,80)),color000099;
- DRAWRECTABS(0,30,30,45,rgb(250,250,80)),color009999;
- DRAWTEXTABS(2,5,'金城'),colorFFFFFF,LINETHICK1;
- DRAWTEXTABS(2,18,'特别'),colorFFFFFF,LINETHICK1;
- DRAWTEXTABS(2,30,'优化'),color0000FF,LINETHICK1;
复制代码
|