好公式网用指标公式为投资注入科技力量!
您的位置:好公式网其他公式文华财经交易模型合集[文华财经]公式 合集公式指标源码

文华财经交易模型合集[文华财经]公式 合集公式指标源码

  • 指标公式类型:其他公式
  • 公式推荐星级:
  • 指标公式安全:已通过5款杀毒软件查杀,请放心下载!
  • 公式更新时间:2018-04-30 20:32:48
  • 指标公式标签:合集 财经
  • 公式运行环境: WinXP/Win7/Win8/Win10/Win All
  • 指标公式语言:用简体中文编写

指标公式详细说明

好公式网(www.goodgongshi.com)告诉您:当前正要下载:文华财经交易模型合集[文华财经]公式 合集公式指标源码

程序化交易模型源码:
{k:10,m:5}
a:=sum( if(close>ref(close,1), vol/close,0), k); 当收大于昨收时成交量 / 收盘价的k周期的的总和
b:=sum( if(close<ref(close,1), vol/close,0), k); 当收小于昨收时成交量 / 收盘价的k周期的的总和
d:=(a - b); {两者之差值}
g:=ma( (a-b), m); { 的均线 }
cross(d,g),bk; {差值上穿其均线, 买开 }
cross(g,d),sp; { 下穿 卖开}
cross(g,d),sk; { 下穿 卖平 }
cross(d,g),bp; { 上穿 买平 }

=========================================================================

peakbars(ma(close,20),10,1,0)=1,spk;
troughbars(ma(close,20),10,1,0)=1,bpk;

h:=high;
l:=low;
a:=if(high>=ref(high,1)&&high>=ref(high,2)&&high>=ref(high,3),low,0);
b:=if(low<=ref(low,1)&&low<=ref(low,2)&&low<=ref(low,3),high,888888);
p1:=if(a>ref(l,1),ref(l,1),0);
p2:=if(a>ref(l,2)&&a<=ref(l,1),ref(l,2),0);
p3:=if(a>ref(l,3)&&a<=ref(l,1)&&a<=ref(l,2),ref(l,3),0);
p4:=if(a>ref(l,4)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3),ref(l,4),0);
p5:=if(a>ref(l,5)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4),ref(l,5),0);
p6:=if(a>ref(l,6)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4)&&a<=ref(l,5),ref(l,6),0);
p7:=if(a>ref(l,7)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4)&&a<=ref(l,5)&&a<=ref(l,6),ref(l,7),0);
p8:=if(a>ref(l,8)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4)&&a<=ref(l,5)&&a<=ref(l,6)&&a<=ref(l,7),ref(l,8),0);
p9:=if(a>ref(l,9)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4)&&a<=ref(l,5)&&a<=ref(l,6)&&a<=ref(l,7)&&a<=ref(l,8),ref(l,9),0);
p10:=if(a>ref(l,10)&&a<=ref(l,1)&&a<=ref(l,2)&&a<=ref(l,3)&&a<=ref(l,4)&&a<=ref(l,5)&&a<=ref(l,6)&&a<=ref(l,7)&&a<=ref(l,8)&&a<=ref(l,9),ref (l,10),0);
aa:=p1+p2+p3+p4+p5+p6+p7+p8+p9+p10;
pp1:=if(aa>ref(l,1),ref(l,1),0);
pp2:=if(aa>ref(l,2)&&aa<=ref(l,1),ref(l,2),0);
pp3:=if(aa>ref(l,3)&&aa<=ref(l,1)&&aa<=ref(l,2),ref(l,3),0);
pp4:=if(aa>ref(l,4)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3),ref(l,4),0);
pp5:=if(aa>ref(l,5)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4),ref(l,5),0);
pp6:=if(aa>ref(l,6)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4)&&aa<=ref(l,5),ref(l,6),0);
pp7:=if(aa>ref(l,7)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4)&&aa<=ref(l,5)&&aa<=ref(l,6),ref(l,7),0);
pp8:=if(aa>ref(l,8)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4)&&aa<=ref(l,5)&&aa<=ref(l,6)&&aa<=ref(l,7),ref(l,8),0);
pp9:=if(aa>ref(l,9)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4)&&aa<=ref(l,5)&&aa<=ref(l,6)&&aa<=ref(l,7)&&aa<=ref(l,8),ref (l,9),0);
pp10:=if(aa>ref(l,10)&&aa<=ref(l,1)&&aa<=ref(l,2)&&aa<=ref(l,3)&&aa<=ref(l,4)&&aa<=ref(l,5)&&aa<=ref(l,6)&&aa<=ref(l,7)&&aa<=ref(l,8)&&aa<=ref (l,9),ref(l,10),0);
aaa:=pp1+pp2+pp3+pp4+pp5+pp6+pp7+pp8+pp9+pp10;
c:=valuewhen(aaa>0,aaa);
t1:=if(b<ref(h,1),ref(h,1),0);
t2:=if(b<ref(h,2)&&b>=ref(h,1),ref(h,2),0);
t3:=if(b<ref(h,3)&&b>=ref(h,1)&&b>=ref(h,2),ref(h,3),0);
t4:=if(b<ref(h,4)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3),ref(h,4),0);
t5:=if(b<ref(h,5)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4),ref(h,5),0);
t6:=if(b<ref(h,6)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4)&&b>=ref(h,5),ref(h,6),0);
t7:=if(b<ref(h,7)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4)&&b>=ref(h,5)&&b>=ref(h,6),ref(h,7),0);
t8:=if(b<ref(h,8)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4)&&b>=ref(h,5)&&b>=ref(h,6)&&b>=ref(h,7),ref(h,8),0);
t9:=if(b<ref(h,9)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4)&&b>=ref(h,5)&&b>=ref(h,6)&&b>=ref(h,7)&&b>=ref(h,8),ref(h,9),0);
t10:=if(b<ref(h,10)&&b>=ref(h,1)&&b>=ref(h,2)&&b>=ref(h,3)&&b>=ref(h,4)&&b>=ref(h,5)&&b>=ref(h,6)&&b>=ref(h,7)&&b>=ref(h,8)&&b>=ref(h,9),ref (h,10),0);
bb:=if((t1+t2+t3+t4+t5+t6+t7+t8+t9+t10)=0,888888,t1+t2+t3+t4+t5+t6+t7+t8+t9+t10);
tt1:=if(bb<ref(h,1),ref(h,1),0);
tt2:=if(bb<ref(h,2)&&bb>=ref(h,1),ref(h,2),0);
tt3:=if(bb<ref(h,3)&&bb>=ref(h,1)&&bb>=ref(h,2),ref(h,3),0);
tt4:=if(bb<ref(h,4)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3),ref(h,4),0);
tt5:=if(bb<ref(h,5)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4),ref(h,5),0);
tt6:=if(bb<ref(h,6)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4)&&bb>=ref(h,5),ref(h,6),0);
tt7:=if(bb<ref(h,7)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4)&&bb>=ref(h,5)&&bb>=ref(h,6),ref(h,7),0);
tt8:=if(bb<ref(h,8)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4)&&bb>=ref(h,5)&&bb>=ref(h,6)&&bb>=ref(h,7),ref(h,8),0);
tt9:=if(bb<ref(h,9)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4)&&bb>=ref(h,5)&&bb>=ref(h,6)&&bb>=ref(h,7)&&bb>=ref(h,8),ref (h,9),0);
tt10:=if(bb<ref(h,10)&&bb>=ref(h,1)&&bb>=ref(h,2)&&bb>=ref(h,3)&&bb>=ref(h,4)&&bb>=ref(h,5)&&bb>=ref(h,6)&&bb>=ref(h,7)&&bb>=ref(h,8)&&bb>=ref (h,9),ref(h,10),0);
bbb:=tt1+tt2+tt3+tt4+tt5+tt6+tt7+tt8+tt9+tt10;
d:=valuewhen(bbb>0,bbb);
ud:=if(close>d&&ref(close,1)<=d,1,if(close<c&&ref(close,1)>=c,-3,0));
k:=valuewhen(ud<>0,ud);
g:=if(k=1,c,d);
cross(close,ref(g,1)),bpk;
cross(ref(g,1),close),spk;

而效果测试中可选择的测试价位都是当前周期的各个价位,二者的成交价差差距会比较大。(解决方法:将交易模型中的买卖条件判断数值均替换为上一周期的数值ref(a,1))
胶5分钟期货交易模型{有文华未知函数}

jj:=dma(((((((((high + low) + ref(high,1)) + ref(low,1)) + ref(high,2)) +
ref(low,2)) + ref(close,1)) + close) / 8),((vol * 240) / openint));
jj1:=ema(jj,7);
mj:=(((2 * (((((((high + low) + ref(high,1)) + ref(low,1)) + ref(high,2)) +
ref(low,2)) + ref(close,1)) + close)) / 8) - jj1);
mj2:=forcast(((2 * ema(mj,45)) - ema(ema(ema(mj,45),45),45)),43);
mj3:=forcast(mj2,145);
mj31:=ema(ema(ema(mj3,105),105),105);
exitlong:cross(mj31,jj1);
enterlong:cross(jj1,mj31);

{mj未知}
pp:=ma(close,26);
e:=between(abs(close-mj),0,10.5)&&time=1458;
b2:=every(close>pp,10)&&close-open>3.5;
s2:=(every(close<pp,10)&&open-close>3.5)||(ref(open,1)-close>8.8&&close<pp&&ref(open,1)>pp);
b3:=cross(close,pp)&&close-open>3.5&&time>0906&&time<1450;
s3:=cross(pp,close)&&open-close>3.5&&time>0906&&time<1450;
f:=time<1458&&abs(close-open)>1.2;
(b2||b3)&&f,bk;
(s2||s3)&&f,sk;
((b2||b3)&&f)||e,bp;
((s2||s3)&&f)||e,sp;

当diff下穿dea,并且价格向下突破ema15日线,就卖平同时等价等量卖开指令,
当diff上穿dea,并且价格向上突破ema15日线,就买平同时等价等量买开指令:
diff := ema(close,short) - ema(close,long);
dea:= ema(diff,m);
ema15:=ema(close,15);
diff>dea&&close>ema15,bpk;
dea>diff&&ema15>close,spk;

这样才比较靠谱:
diff := ema(close,short) - ema(close,long);
dea:= ema(diff,m);
ema15:=ema(close,15);
cross(diff,dea)&&close>ema15,bpk;
cross(dea,diff)&&ema15>close,spk;

hh:=hhv(high,n);
ll:=llv(low,n);
hh1:=barslast((hh > ref(hh,1)));
ll1:=barslast((ll < ref(ll,1)));
cross(hh1,ll1),spk;
cross(ll1,hh1),bpk;

var1:=(hhv(high,8)-llv(low,8));
var2:=(hhv(high,8)-close);
var3:=(close-llv(low,8));
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,30);
var9:=sma(var7,3,1)-sma(var4,9,1);
var10:= if(var9>100,var9-100,0);
vara:=hhv(high,30);
b:=ema((var6-var8)/(vara-var8)*100,8),colorcyan;
b1:=ema(b,5);
b-b1>0,bpk;
b-b1<0,spk;

sarline:=abs(sar(3,0.01,0.1));
close>sarline,bpk;
close<sarline,spk;

lc:=ref(close,1);
wrsi:=sum(max(close-lc,0),n)/sum(abs(close-lc),n)*100;
(cross(wrsi,ll)),bk;
(cross(lh,wrsi)),sp;

var1:=llv(low,34);
var2:=hhv(high,30);
var3:=ref(close,1);
var4:=ema((close-var1)/(var2-var1),3)*100;
zl:=sma(max(close-var3,0),7,1)/sma(abs(close-var3),7,1)*100;
cc:=zl;
sh:=var4;
var5:=(var4-llv(var4,21))/(hhv(var4,21)-llv(var4,21))*100;
q1:=if(cross(var5,90) && sh<40,18,10);
q2:=if(cross(zl,12) && ref(sh,5)<20 && ref(sh,3)<20,18,10);
p1:=if(cross(84,zl),82,90);
p2:=if(cross(84,sh),82,90);
vy:=sma((close-llv(low,18))/(hhv(high,18)-llv(low,18))*100,5,1);
l2:=sma(0.618*ref(vy,1)+0.382*vy,3,1);
l3:=ma(l2,5);
l2>l3,bpk;
l2<=l3,spk;

ma60:=ma(close,60);
ma20:=ma(close,20);
ma5:=ma(close,5);
close>ma60&&cross(ma5,ma20)||close<ma60&&cross(ma5,ma20)&&time<1455,bpk;
close>ma60&&cross(ma20,ma5)&&time<1455||close<ma60&&cross(ma20,ma5),spk;
close>ma60&&cross(ma20,ma5)&&time=1455,bp;
close<ma60&&cross(ma5,ma20)&&time=1455,sp;
修改后再看看
ma60:=ma(close,60);
ma20:=ma(close,20);
ma5:=ma(close,5);
close>ma60&&cross(ma5,ma20)||close<ma60&&cross(ma5,ma20)&&time<1455,bpk;
close>ma60&&cross(ma20,ma5)&&time<1455||close<ma60&&cross(ma20,ma5),spk;
close>ma60&&time=1455,bp;
close<ma60&&time=1455,sp;

h:=valuewhen(date<>ref(date,1),high);
close>h&&time>=0930,bk;
close>h||time>=1430,bp;
close<h&&time>=0930,sk;
close<h||time>=1430,sp;

{漂渺峰沪胶15分钟模型}
[n,1.000000,5.000000,1.000000]
[m,1.000000,20.000000,14.000000]
[b,1.000000,5.000000,2.000000]
a:=ema(close,n);
aa:=a-ref(a,m);
bb:=sma(aa,b,2);
bb>0,bpk;
bb<0,spk;

wroc:=(close-ref(close,n))/ref(close,n)*100;
(cross(wroc,0)),bk;
(cross(0,wroc)),sp;

自适应均线的交易模型:
di:=close-ref(close,n);
vo:=sum(abs((close-ref(close,1))),n);
er:=abs(di/vo);
fastsc:=2/(2 + 1);
slowsc:=2/(30 + 1);
ssc:=er*(fastsc-slowsc)+slowsc;
constant:=ssc*ssc;
amahigh:ref(ema(high,n),1)+constant*(high- ref(ema(high,n),1));
amalow:ref(ema(low,n),1)+constant*(low- ref(ema(low,n),1));
amaclose:=ref(ema(close,n),1)+constant*(close- ref(ema(close,n),1));
low>amahigh,bk;
close<amaclose,sp;
high<amalow,sk;
close>amaclose,bp;


  >>>使用本站搜索工具可以找到更多文华财经交易模型合集[文华财经]公式 合集公式指标源码

指标公式下载地址

点这下载软件
好公式网提供全网最全的指标公式软件,感谢您的支持!鼠标双击图片可看大图!
下载请点击右侧“立即下载”,如只有源码,请点击本页面右侧的导入方法按图导入!
本站指标基于网友分享,仅供研究自学,勿作他用,本站对下载使用不承担任何责任!

指标公式下载注意

    ☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!

    ☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。

    ☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;

    ☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;

    ☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;

    ☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;

    ☉ hxf格式指标公式,仅可以用同花顺软件引入使用。

    ☉ 如果您发现下载软件链接错误,请联系管理员报告错误。

    ☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!

    ☉ 本文文华财经交易模型合集[文华财经]公式 合集公式指标源码仅供学习研究。

猜你喜欢

学了又学