优化趋势操盘(副图、源码)
理想币不多了,发一个自己在用的指标。该指标是根据本论坛搜集的一些指标经组合、优化而成,具有界面清晰、指示明确、实用性强等特点。操盘线或趋势线在低位区勾头向上,或操盘线和趋势线在低位区附近金叉都是买入时机。反之,操盘线或趋势线在派发区掉头向下,或操盘线和趋势线在派发区附近死叉都是卖出时机。
源码如下:
{超级短线战神-尾盘进-30分钟周期}
TYP:=(H+L+C)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI修正1:=EMA(EMA(EMA(CCI,2),2),2);
CCI修正2:=EMA(EMA(EMA(CCI,3),2),2);
CCI选股:=(CROSS(CCI修正1,CCI修正2) OR (CCI修正1>=CCI修正2)) AND
CCI修正1>=-101 AND CCI修正1>=REF(CCI修正1,1)AND REF(CCI修正1,1)<-101;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
J1:=EMA(EMA(EMA(J,2),2),2);
KDJ选股:=J1>REF(J1,1);
尾盘进:CCI选股 AND KDJ选股,COLORYELLOW,NODRAW;
STICKLINE(尾盘进,10,40,0.5,0),COLORYELLOW;
派发区:80,LINETHICK1,COLOR00FF00;
低位区:10,,LINETHICK1,COLOREEEEEE;
{趋势操盘}
VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5:=SMA(VAR4,13,8);
操盘线:CEILING(SMA(VAR5,13,8)),LINETHICK2,COLOR0000FF;
趋势线:MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA(
(C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORBLUE;
{安全度}
CVAR2:=LLV(L,33);
CVAR3:=HHV(H,21);
CVAR4:=EMA((C-CVAR2)/(CVAR3-CVAR2)*100,10)*-1+100;
当前安全度:100-EMA(0.191*REF(CVAR4,1)+0.809*CVAR4,1),LINETHICK2,COLORFFFF00,NODRAW;
{}
乖离率:(C-MA(C,10))/MA(C,10)*100,COLOR0099FF,NODRAW;
201061311303670866.png
|