手机端
当前位置:爱约股 > 公式技巧 > (短线高手)为通达信可用指标

(短线高手)为通达信可用指标

 网友求助:

求助高手将这个飞狐短线高手》公式改成通信达能用的。谢谢了。

这个公式放在通信达里。图形压缩了。。看不清楚。。

RSVK:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSVK,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
MA3:=MA(C,3);

买入1:=CROSS(C,MA3) AND MA3>=REF(MA3,1)*0.99 ;{日收盘价上穿MA3 }
买入2:=C>MA3 AND (C-MA3)/MA3<0.035 AND MA3>REF(MA3,1)*0.998 ;{收盘价在MA3上方不远 }
买入3:=C>MA3 AND REF(MA3,1)<REF(MA3,2) AND REF(MA3,2)<REF(MA3,3);{MA3刚刚向上 }
买入4:= C>MA3 AND J<80 AND CROSS(J,D) ;{KDJ的J值在低位,或者J线已经向上行,或者J与D即将或刚刚发生金叉}
不买入1:= J>80 OR COUNT( CROSS(D,J),2)>0;{KDJ的J值处于高位,或者J线高位并向下行,或者J与D即将或已经发生死叉}
不买入2:=(C-MA3)/MA3>=0.035;{ 收盘价高于MA3太远}
不买入3:=O>C*1.02 ;{长阴线不买}
不买入4:="CCI.CCI">100;{日CCI向上过100}
不买入5:=REF(C,1)>REF(MA3,1) AND REF(C,2)>REF(MA3,2);{股价两天占在MA3之上}
不买入6:=COUNT(MA3>REF(MA3,1)*1.0015,4)>=3;{MA3向上多日}
判断买入:= NOT(不买入1 OR 不买入2 OR 不买入3 OR 不买入4 OR 不买入5 OR 不买入6) AND (买入1 OR 买入2 OR 买入3 OR 买入4);
买入条件:=FILTER(判断买入,1);
买入: (COUNT( REF(买入条件,1),3)=0 OR CROSS(J,D)) AND COUNT( REF(买入条件,1),1)=0 AND 买入条件,COLORRED;
买入天数:=BARSLAST(买入);
买入价:REF(C,买入天数),LINETHICK0;

手续费:=0.003;
盈亏:100*((C-买入价)/买入价-手续费),LINETHICK0,COLORE66878;
百分之5止赢:买入价*(1+0.05+手续费),LINETHICK0,COLOR000999;
百分之2止损:买入价*(1-0.025+手续费),COLORGREEN,LINETHICK0;

止赢条件:=H>百分之5止赢;
止赢天数:=BARSLAST(止赢条件);
止损条件:=C<百分之2止损;
止损天数:=BARSLAST(止损条件);
止赢:=买入天数> 止赢天数 AND 止赢天数<止损天数;
止赢天数2:=BARSLAST(止赢条件 AND 止赢 AND COUNT(REF(止赢,1),1)=0);
止损:=买入天数>止损天数 AND 止赢天数>止损天数;
止损天数2:=BARSLAST(止损 AND COUNT(REF(止损,1),1)=0);
DRAWTEXT(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买入天数<止损天数2,0.8,'止赢');
DRAWICON(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买入天数<止损天数2,0.5,1);
DRAWTEXT(止损 AND COUNT(REF(止损,1),1)=0 AND 买入天数<止赢天数2,-0.4,'止损');
DRAWICON(止损 AND COUNT(REF(止损,1),1)=0 AND 买入天数<止赢天数2,-0.6,2);
-1;
逃命价:hhv(h,买入天数)*0.905,linethick0;
逃命条件:=c<逃命价;
逃命天数:=barslast(逃命条件);
逃命:=买入天数>逃命天数;
逃命天数2:=barslast(逃命 and count(ref(逃命,1),1)=0);
drawtext(逃命条件 and 逃命天数2=0,-0.3,'逃命');图形压缩了。。看不出来。。(
 

 

解答如下:

RSVK:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSVK,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
MA3:=MA(C,3);

买入1:=CROSS(C,MA3) AND MA3>=REF(MA3,1)*0.99 ;{日收盘价上穿MA3 }
买入2:=C>MA3 AND (C-MA3)/MA3<0.035 AND MA3>REF(MA3,1)*0.998 ;{收盘价在MA3上方不远 }
买入3:=C>MA3 AND REF(MA3,1)<REF(MA3,2) AND REF(MA3,2)<REF(MA3,3);{MA3刚刚向上 }
买入4:= C>MA3 AND J<80 AND CROSS(J,D) ;{KDJ的J值在低位,或者J线已经向上行,或者J与D即将或刚刚发生金叉}
不买入1:= J>80 OR COUNT( CROSS(D,J),2)>0;{KDJ的J值处于高位,或者J线高位并向下行,或者J与D即将或已经发生死叉}
不买入2:=(C-MA3)/MA3>=0.035;{ 收盘价高于MA3太远}
不买入3:=O>C*1.02 ;{长阴线不买}
不买入4:="CCI.CCI">100;{日CCI向上过100}
不买入5:=REF(C,1)>REF(MA3,1) AND REF(C,2)>REF(MA3,2);{股价两天占在MA3之上}
不买入6:=COUNT(MA3>REF(MA3,1)*1.0015,4)>=3;{MA3向上多日}
判断买入:= NOT(不买入1 OR 不买入2 OR 不买入3 OR 不买入4 OR 不买入5 OR 不买入6) AND (买入1 OR 买入2 OR 买入3 OR 买入4);
买入条件:=FILTER(判断买入,1);
买入: (COUNT( REF(买入条件,1),3)=0 OR CROSS(J,D)) AND COUNT( REF(买入条件,1),1)=0 AND 买入条件,COLORRED;
买入天数:=BARSLAST(买入);
买入价:REF(C,买入天数),NODRAW;

手续费:=0.003;
盈亏:100*((C-买入价)/买入价-手续费),NODRAW,COLORE66878;
百分之5止赢:买入价*(1+0.05+手续费),NODRAW,COLOR000999;
百分之2止损:买入价*(1-0.025+手续费),COLORGREEN,NODRAW;

止赢条件:=H>百分之5止赢;
止赢天数:=BARSLAST(止赢条件);
止损条件:=C<百分之2止损;
止损天数:=BARSLAST(止损条件);
止赢:=买入天数> 止赢天数 AND 止赢天数<止损天数;
止赢天数2:=BARSLAST(止赢条件 AND 止赢 AND COUNT(REF(止赢,1),1)=0);
止损:=买入天数>止损天数 AND 止赢天数>止损天数;
止损天数2:=BARSLAST(止损 AND COUNT(REF(止损,1),1)=0);
DRAWTEXT(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买入天数<止损天数2,0.8,'止赢');
DRAWICON(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买入天数<止损天数2,0.5,1);
DRAWTEXT(止损 AND COUNT(REF(止损,1),1)=0 AND 买入天数<止赢天数2,-0.4,'止损');
DRAWICON(止损 AND COUNT(REF(止损,1),1)=0 AND 买入天数<止赢天数2,-0.6,2);
-1;
逃命价:HHV(H,买入天数)*0.905,NODRAW;
逃命条件:=C<逃命价;
逃命天数:=BARSLAST(逃命条件);
逃命:=买入天数>逃命天数;
逃命天数2:=BARSLAST(逃命 AND COUNT(REF(逃命,1),1)=0);
DRAWTEXT(逃命条件 AND 逃命天数2=0,-0.3,'逃命');
 

TAG:
分享至:

相关推荐