-- 作者:zjswty
-- 发布时间:2011/8/3 0:26:27
-- [求助]飞狐公式---(麻烦修改为金字塔公式)谢谢
飞狐公式---抄底组合(麻烦修改为金字塔公式)
VL:=REF(LOW,1); VAR1:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100; VAR2:=MA(VAR1,13); VAR3:=LLV(LOW,34); VAR4:=EMA(IF(LOW<=VAR3,VAR2,0),3); VAR5:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR6:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR5*10.9; 率先选股:FILTER(IF(VAR6<=VAR5 AND VAR4>REF(VAR4,1),VAR4*8,0),20); TYP:=(HIGH+LOW+CLOSE)/3; CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); 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; BOLL:=MA(CLOSE,20); UPPER:=BOLL+2*STD(CLOSE,20); LOWER:=BOLL-2*STD(CLOSE,20); MA1:=MA(CLOSE,5); 阳线买:CCI<-200 AND J<0 AND CLOSE<LOWER AND CLOSE<MA1/1.1; {抄底特准} VAR1:=REF(CLOSE,1); VAR2:=SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100; 抄底特准:FILTER(REF(VAR2,1)<20 AND VAR2>REF(VAR2,1),5); Var1B:=CLOSE/MA(CLOSE,40)*100 < 78; Var2B:=CLOSE/MA(CLOSE,60)*100 < 74; Var3B:=HIGH > LOW*1.051; Var4B:=Var3B AND COUNT(Var3B,5) > 1; var5B:=Var4B AND (Var1B OR Var2B); Xar1:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL); Xar2:=(CLOSE-xar1)/xar1*100+30-(REF(HIGH,13)/CLOSE-1.35)*100; Xar3:=(CLOSE-ref(CLOSE,5))/CLOSE*100<-9; 当前获利:=WINNER(CLOSE); 大盘涨跌:=ema((INDEXC-ma(INDEXC,10))/INDEXC*100,14)<-4.9; 换手率:=(ma(v,5)-VOL)/CAPITAL*100<0.8; 量能变化:=(vol-MA(vol,21))/vol*100; 买入信号:=大盘涨跌 AND Xar3 AND 当前获利<0.12 AND 换手率 AND 量能变化>18; AXXY:=大盘涨跌 AND Xar3 AND 当前获利<0.12 AND 换手率 AND 量能变化>18 and var5B; Var1:=MA(CLOSE,13); Var2:=MA(CLOSE,27); Var3:=(Var1-CLOSE)/CLOSE>2/100; Var4:=(Var2-Var1)/Var1>0.030; Var5:=LLV(CLOSE,32)=LLV(CLOSE,119); var6:=Var3 AND Var4 AND Var5 ; Var1a:=INDEXC; Var2a:=MA(Var1a,6); Var3a:=MA(Var1a,24); Var4a:=MA(Var1a,32); Var5a:=MA(Var1a,62); Var6a:=MA(Var1a,105); Var7a:=Var5a<REF(Var5a,1) AND Var6a<REF(Var6a,1) AND Var5a<Var6a*0.98; Var8a:=Var4a>Var2a*1.115 AND Var3a>Var2a*1.095; Var9a:=Var2a>Var1a*0.96; 赚个够:var6 and Var7a AND Var8a AND Var9a AND CLOSE/COST(8)<=0.790 AND (CLOSE>OPEN OR CLOSE<OPEN) AND (REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) OR AXXY; {底部反转} Var1:=MA(CLOSE,26); Var2:=Var1+2*STD(CLOSE,26); Var3:=Var1-2*STD(CLOSE,26); Var4:=CLOSE>OPEN; Var5:=(HIGH-CLOSE)/OPEN; Var6:=(CLOSE-OPEN)/OPEN; Var7:=Var4 AND Var5/Var6<0.5; Var8:=CROSS(CLOSE,Var3) AND LLV(Var3,3)=LLV(Var3,90) AND Var7; 底部反转:if(Var8 AND REF(BARSLAST(Var8),1)>10,1,0),linethick3,colorf0f000; drawtext(底部反转,1,\'底部反转\'),,color1373c0; drawtext(底部反转,1,\'★\'),colorred; {经典抄底} CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100; 经典抄底:IF((EMA(CS,2))*2>REF((EMA(CS,2))*2,1) AND REF((EMA(CS,2))*2,1)<REF((EMA(CS,2))*2,2) AND (EMA(CS,2))*2<26,1,0); XG:率先选股 AND 阳线买;
|
-- 作者:fly
-- 发布时间:2011/8/3 11:42:39
--
尊敬的楼主,您好
不知道,您在发这个飞狐公式的时候,有没有在飞狐上,看一看,他的运行效果.
您这个公式,分别是由几个公式组成,并且各自独立.
以前两个为例
(1)
VL:=REF(LOW,1); VAR1:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100; VAR2:=MA(VAR1,13); VAR3:=LLV(LOW,34); VAR4:=EMA(IF(LOW<=VAR3,VAR2,0),3); VAR5:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR6:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR5*10.9; 率先选股:FILTER(IF(VAR6<=VAR5 AND VAR4>REF(VAR4,1),VAR4*8,0),20);
之所以,\'率先选股\'没有正常显示,是因为此值会为0.
改为:率先选股:FILTER(IF(VAR6<=VAR5 AND VAR4>REF(VAR4,1),VAR4*8,0),20),noaxis;
即可正常显示.
(2) TYP:=(HIGH+LOW+CLOSE)/3; CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); 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; BOLL:=MA(CLOSE,20); UPPER:=BOLL+2*STD(CLOSE,20); LOWER:=BOLL-2*STD(CLOSE,20); MA1:=MA(CLOSE,5); 阳线买:CCI<-200 AND J<0 AND CLOSE<LOWER AND CLOSE<MA1/1.1; 此阳线买条件中的 CLOSE<MA1/1.1很少能成立
且该公式可以直接在金字塔中使用,最多象(1)一样,在最后需要输出的一句上加个noaxis
其余类似,希望您自己在金字塔里运行一下看看看
[此贴子已经被作者于2011-8-3 11:44:06编辑过]
|
-- 作者:just
-- 发布时间:2011/8/3 13:16:15
--
VL:=REF(LOW,1); VAR1:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100; VAR2:=MA(VAR1,13); VAR3:=LLV(LOW,34); VAR4:=EMA(IF(LOW<=VAR3,VAR2,0),3); VAR5:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR6:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR5*10.9; 率先选股:=FILTER(IF(VAR6<=VAR5 AND VAR4>REF(VAR4,1),VAR4*8,0),20); drawtext(率先选股,h+mindiff*5,\'选股\'); TYP:=(HIGH+LOW+CLOSE)/3; CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); 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; BOLL:=MA(CLOSE,20); UPPER:=BOLL+2*STD(CLOSE,20); LOWER:=BOLL-2*STD(CLOSE,20); MA1:=MA(CLOSE,5); 阳线买:=CCI<-200 AND J<0 AND CLOSE<LOWER AND CLOSE<MA1/1.1; drawtext(阳线买,h+mindiff*2,\'阳买\'),coloryellow; {抄底特准} VAR1:=REF(CLOSE,1); VAR2:=SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100; 抄底特准:=FILTER(REF(VAR2,1)<20 AND VAR2>REF(VAR2,1),5); drawtext(抄底特准,l-mindiff*2,\'抄底\'); Var1B:=CLOSE/MA(CLOSE,40)*100 < 78; Var2B:=CLOSE/MA(CLOSE,60)*100 < 74; Var3B:=HIGH > LOW*1.051; Var4B:=Var3B AND COUNT(Var3B,5) > 1; var5B:=Var4B AND (Var1B OR Var2B); Xar1:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL); Xar2:=(CLOSE-xar1)/xar1*100+30-(REF(HIGH,13)/CLOSE-1.35)*100; Xar3:=(CLOSE-ref(CLOSE,5))/CLOSE*100<-9; 当前获利:=WINNER(CLOSE); 大盘涨跌:=ema((INDEXC-ma(INDEXC,10))/INDEXC*100,14)<-4.9; 换手率:=(ma(v,5)-VOL)/CAPITAL*100<0.8; 量能变化:=(vol-MA(vol,21))/vol*100; 买入信号:=大盘涨跌 AND Xar3 AND 当前获利<0.12 AND 换手率 AND 量能变化>18; AXXY:=大盘涨跌 AND Xar3 AND 当前获利<0.12 AND 换手率 AND 量能变化>18 and var5B; Var1:=MA(CLOSE,13); Var2:=MA(CLOSE,27); Var3:=(Var1-CLOSE)/CLOSE>2/100; Var4:=(Var2-Var1)/Var1>0.030; Var5:=LLV(CLOSE,32)=LLV(CLOSE,119); var6:=Var3 AND Var4 AND Var5 ; Var1a:=INDEXC; Var2a:=MA(Var1a,6); Var3a:=MA(Var1a,24); Var4a:=MA(Var1a,32); Var5a:=MA(Var1a,62); Var6a:=MA(Var1a,105); Var7a:=Var5a<REF(Var5a,1) AND Var6a<REF(Var6a,1) AND Var5a<Var6a*0.98; Var8a:=Var4a>Var2a*1.115 AND Var3a>Var2a*1.095; Var9a:=Var2a>Var1a*0.96; 赚个够:=var6 and Var7a AND Var8a AND Var9a AND CLOSE/COST(8)<=0.790 AND (CLOSE>OPEN OR CLOSE<OPEN) AND (REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) OR AXXY; drawtext(赚个够,l-mindiff*4,\'赚\'); {底部反转} Var1:=MA(CLOSE,26); Var2:=Var1+2*STD(CLOSE,26); Var3:=Var1-2*STD(CLOSE,26); Var4:=CLOSE>OPEN; Var5:=(HIGH-CLOSE)/OPEN; Var6:=(CLOSE-OPEN)/OPEN; Var7:=Var4 AND Var5/Var6<0.5; Var8:=CROSS(CLOSE,Var3) AND LLV(Var3,3)=LLV(Var3,90) AND Var7; 底部反转:=if(Var8 AND REF(BARSLAST(Var8),1)>10,1,0); drawtext(底部反转,l,\'底部反转\'),color1373c0; drawtext(底部反转,l-mindiff*5,\'★\'),colorred; {经典抄底} CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100; 经典抄底:=IF((EMA(CS,2))*2>REF((EMA(CS,2))*2,1) AND REF((EMA(CS,2))*2,1)<REF((EMA(CS,2))*2,2) AND (EMA(CS,2))*2<26,1,0); drawtext(经典抄底,l-mindiff*8,\'经典抄底\'),colorf0f000; XG:=率先选股 AND 阳线买; drawtext(xg,h-mindiff*3,\'xg\');
试试这样行不行
|