欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]飞狐公式---(麻烦修改为金字塔公式)谢谢

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有5849人关注过本帖树形打印复制链接

主题:[求助]飞狐公式---(麻烦修改为金字塔公式)谢谢

帅哥哟,离线,有人找我吗?
zjswty
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:20 威望:0 精华:0 注册:2011/8/3 0:19:52
[求助]飞狐公式---(麻烦修改为金字塔公式)谢谢  发帖心情 Post By:2011/8/3 0:26:27    Post IP:221.213.110.29[只看该作者]

飞狐公式---抄底组合(麻烦修改为金字塔公式)

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 阳线买;

 

 


 回到顶部
帅哥哟,离线,有人找我吗?
just
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2011/8/3 10:10:02    Post IP:58.246.57.26[只看该作者]

正在修改中 请稍等



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
fly
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/8/3 11:42:39    Post IP:58.246.57.26[只看该作者]

尊敬的楼主,您好

不知道,您在发这个飞狐公式的时候,有没有在飞狐上,看一看,他的运行效果.

您这个公式,分别是由几个公式组成,并且各自独立.

 

以前两个为例

(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编辑过]


金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
zjswty
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:20 威望:0 精华:0 注册:2011/8/3 0:19:52
  发帖心情 Post By:2011/8/3 13:10:06    Post IP:221.213.110.29[只看该作者]

谢谢帅哥哟,离线,有人找我吗?

fly确实是几个指标组成,所以叫(抄底组合),
直接黏贴显示:语句:drawtext(底部反转,1,'底部反转'),,color1373c0;
为无法识别的算术表达式。前面都没有问题。

 回到顶部
帅哥哟,离线,有人找我吗?
just
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2011/8/3 13:16:15    Post IP:58.246.57.26[只看该作者]

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');

 

试试这样行不行



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
zjswty
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:20 威望:0 精华:0 注册:2011/8/3 0:19:52
  发帖心情 Post By:2011/8/3 23:58:52    Post IP:221.213.1.206[只看该作者]

感谢just,可以导入,但是显示不正确。麻烦修改一下

 回到顶部