大智慧波段参考源码说明附图选股模式)自己编的一个指标
-
相关简介:在生命钱袋的指标基础上改编的,请各位指点: 扼要使用说明:K线图红柱且向上穿越生命线为买入点,相反绿柱且向下穿越生命线为卖出点 昨晚我研究了好久,终于搞定用该指标选股的代码了,重新建一个指标,加上代码: 量价线1:Vard,COLORgreen; 量价线2:Varc,COLORblue; 按如图显示选择:1.选择:指标线量价线2生命线(其余默认):这是对应源代码的:CROSS(Varc,Var11) 2.高级:组合条件:加入(如图5显示) 3:改:量价线线140(注意:量价线1数值越低一般的离底
-
文章来源:股海网作者:股海网发布时间:2013-08-22浏览次数:
在生命钱袋的指标基础上改编的,请各位指点:
扼要使用说明:K线图红柱且向上穿越生命线为买入点,相反绿柱且向下穿越生命线为卖出点
昨晚我研究了好久,终于搞定用该指标选股的代码了,重新建一个指标,加上代码:
量价线1:Vard,COLORgreen;
量价线2:Varc,COLORblue;
按如图显示选择:1.选择:指标线量价线2>生命线(其余默认):这是对应源代码的:CROSS(Varc,Var11)
2.高级:组合条件:加入(如图5显示)
3:改:量价线线1<40(注意:量价线1数值越低一般的离底部越近,筹码越分散,也可以改为小于30、20)这是对应源代码的:Vard<40
4.高级:组合条件:加入(如图6显示)、保存
选股开始:工具->条件选股->自编->组合条件->选中该选股条件:执行选股(如图7)
那么这时选出的股票就是我们所需要的
波段参考改良源码
N:=10;F:=21;
Var1:=HHV(HIGH,9)-LLV(LOW,9);
Var2:=HHV(HIGH,9)-CLOSE;
Var3:=CLOSE-LLV(LOW,9);
Var4:=Var2/Var1*100-70;
Var5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var6:=(2*CLOSE+HIGH+LOW)/4;
Var7:=SMA(Var3/Var1*100,3,1);
Var8:=LLV(LOW,34);
Var9:=SMA(Var7,3,1)-SMA(Var4,9,1);
VarA:=IF(Var9>100,Var9-100,0);
VarB:=HHV(HIGH,34);
VarC:=EMA((Var6-Var8)/(VarB-Var8)*100,13);
VarD:=EMA(0.667*REF(VarC,1)+0.333*VarC,2);
VarE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VarF:=MA(VarE,3);
Var10:=REF(VarF,1);
Var11:=EMA(VarD,N);
生命线:EMA(VarD,N), COLORyellow;
STICKLINE(CROSS(VarC,VarD) AND VarC>VarD AND VarC<18,25,0,1,0), COLORRED;
drawicon(CROSS(Varc,Var11)AND Vard<40,VarC-4,7);
DRAWTEXTABS(75 ,20 ,ifs(Vard>Var11 AND VarC>VarD,'建议持有',' ')),COLORred,LINETHICK5;
DRAWTEXTABS(75 ,20 ,ifs(Vard>Var11 AND VarC>VarD,' ','建议观望 ')),COLORblue,LINETHICK5;
DRAWTEXTABS(75 ,45 ,ifs(CROSS(Varc,Var11)AND Vard<40,'买入',' ')),COLORred,LINETHICK5;
DRAWTEXTABS(75 ,45 ,ifs(CROSS(Var11,Varc) AND Varc>60,'卖出 ',' ')),COLOrblue,LINETHICK5;
drawicon(CROSS(Var11,Varc) AND Varc>60,Vard+11,8);
STICKLINE(FILTER(CROSS(VarD,VarC),10) AND VarD>79 AND VarC>79,100,75,3,0), COLORGREEN;
STICKLINE(VarC-VarD>0,VarC,VarD,8,1), COLORRED;
STICKLINE(VarC-VarD<0,VarC,VarD,8,0), COLORGREEN;
20, COLORred;
80, COLORgreen;
选股:
N:=10;F:=21;
Var1:=HHV(HIGH,9)-LLV(LOW,9);
Var2:=HHV(HIGH,9)-CLOSE;
Var3:=CLOSE-LLV(LOW,9);
Var4:=Var2/Var1*100-70;
Var5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var6:=(2*CLOSE+HIGH+LOW)/4;
Var7:=SMA(Var3/Var1*100,3,1);
Var8:=LLV(LOW,34);
Var9:=SMA(Var7,3,1)-SMA(Var4,9,1);
VarA:=IF(Var9>100,Var9-100,0);
VarB:=HHV(HIGH,34);
VarC:=EMA((Var6-Var8)/(VarB-Var8)*100,13);
VarD:=EMA(0.667*REF(VarC,1)+0.333*VarC,2);
VarE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VarF:=MA(VarE,3);
Var10:=REF(VarF,1);
Var11:=EMA(VarD,N);
生命线:EMA(VarD,N), COLORyellow;
量价线1:Vard,COLORgreen;
量价线2:Varc,COLORblue;
STICKLINE(CROSS(VarC,VarD) AND VarC>VarD AND VarC<18,25,0,1,0), COLORRED;
drawicon(CROSS(Varc,Var11)AND Vard<40,VarC-4,7);
DRAWTEXTABS(75 ,20 ,ifs(Vard>Var11 AND VarC>VarD,'建议持有',' ')),COLORred,LINETHICK5;
DRAWTEXTABS(75 ,20 ,ifs(Vard>Var11 AND VarC>VarD,' ','建议观望 ')),COLORblue,LINETHICK5;
DRAWTEXTABS(75 ,45 ,ifs(CROSS(Varc,Var11)AND Vard<40,'买入',' ')),COLORred,LINETHICK5;
DRAWTEXTABS(75 ,45 ,ifs(CROSS(Var11,Varc) AND Varc>60,'卖出 ',' ')),COLOrblue,LINETHICK5;
drawicon(CROSS(Var11,Varc) AND Varc>60,Vard+11,8);
STICKLINE(FILTER(CROSS(VarD,VarC),10) AND VarD>79 AND VarC>79,100,75,3,0), COLORGREEN;
STICKLINE(VarC-VarD>0,VarC,VarD,8,1), COLORRED;
STICKLINE(VarC-VarD<0,VarC,VarD,8,0), COLORGREEN;
20, COLORred;
80, COLORgreen;